Default angle function separated from usersFunctions

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@239 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi 2012-09-04 11:47:26 +00:00
parent 26b4b8a2a7
commit ca75754b83
3 changed files with 13 additions and 26 deletions

View File

@ -0,0 +1,12 @@
/*
contains the conversion channel-angle for a module channel
conv_r=pitch/radius
*/
double defaultAngleFunction(double ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction) {\
(void) tilt; \
return 180./PI*(center*conv_r+direction*atan((double)(ichan-center)*conv_r))+encoder+totalOffset+offset;\
};

View File

@ -99,11 +99,6 @@ int caput(chid ch_id, double value) {
#endif
@ -111,27 +106,6 @@ int caput(chid ch_id, double value) {
/*
contains the conversion channel-angle for a module channel
conv_r=pitch/radius
*/
double defaultAngleFunction(double ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction) {
(void) tilt; /* to avoid warning: unused parameter */
double ang;
ang=180./PI*(center*conv_r+direction*atan((double)(ichan-center)*conv_r))+encoder+totalOffset+offset;
return ang;
}
/* reads the encoder and returns the position */
double defaultGetPosition(void *d) {

View File

@ -14,6 +14,7 @@ Functions depending on the experimental setup should be defined here
#include <epicsEvent.h>
#endif
#include "detectorData.h"
#include "angleFunction.h"
#ifdef __cplusplus
extern "C" {