13#include "indi/indicommon.h"
14#include "indi/indimount.h"
24 void setParameters(
double ccd_pix_width,
double ccd_pix_height,
double focalLengthMm,
25 int binX,
int binY, ISD::Mount::PierSide pierSide,
26 const dms &mountRA,
const dms &mountDec);
29 void setBinningUsed(
int x,
int y);
32 bool calculate1D(
double start_x,
double start_y,
33 double end_x,
double end_y,
int RATotalPulse);
36 double start_ra_x,
double start_ra_y,
double end_ra_x,
double end_ra_y,
37 double start_dec_x,
double start_dec_y,
double end_dec_x,
double end_dec_y,
38 bool *swap_dec,
int RATotalPulse,
int DETotalPulse);
43 void computeDrift(
const GuiderUtils::Vector &detection,
const GuiderUtils::Vector &reference,
44 double *raDrift,
double *decDrift)
const;
46 double getFocalLength()
const
50 double getAngle()
const
54 double getRAAngle()
const
56 return calibrationAngleRA;
58 double getDECAngle()
const
60 return calibrationAngleDEC;
65 GuiderUtils::Vector convertToArcseconds(
const GuiderUtils::Vector &input)
const;
69 GuiderUtils::Vector convertToPixels(
const GuiderUtils::Vector &input)
const;
70 void convertToPixels(
double xArcseconds,
double yArcseconds,
71 double *xPixel,
double *yPixel)
const;
76 GuiderUtils::Vector rotateToRaDec(
const GuiderUtils::Vector &input)
const;
77 void rotateToRaDec(
double dx,
double dy,
double *ra,
double *dec)
const;
81 double raPulseMillisecondsPerArcsecond()
const;
85 double decPulseMillisecondsPerArcsecond()
const;
88 double xPixelsPerArcsecond()
const;
89 double yPixelsPerArcsecond()
const;
90 double xArcsecondsPerPixel()
const;
91 double yArcsecondsPerPixel()
const;
97 bool restore(ISD::Mount::PierSide currentPierSide,
bool reverseDecOnPierChange,
98 int currentBinX,
int currentBinY,
99 const dms *declination =
nullptr);
101 bool restore(
const QString &encoding, ISD::Mount::PierSide currentPierSide,
102 bool reverseDecOnPierChange,
int currentBinX,
int currentBinY,
103 const dms *declination =
nullptr);
105 bool declinationSwapEnabled()
const
109 void setDeclinationSwapEnabled(
bool value);
121 void logCalibration()
const;
125 bool calculate1D(
double dx,
double dy,
int RATotalPulse);
126 bool calculate2D(
double ra_dx,
double ra_dy,
double dec_dx,
double dec_dy,
127 bool *swap_dec,
int RATotalPulse,
int DETotalPulse);
131 bool restore(
const QString &encoding);
134 double correctRA(
double raMsPerPixel,
const dms &calibrationDec,
const dms ¤tDec);
137 static double calculateRotation(
double x,
double y);
142 void setAngle(
double rotationAngle);
145 void setRaPulseMsPerArcsecond(
double rate);
146 void setDecPulseMsPerArcsecond(
double rate);
149 double binFactor()
const;
151 double inverseBinFactor()
const;
160 int subBinXused { 1 };
161 int subBinYused { 1 };
165 double ccd_pixel_width { 0.003 };
166 double ccd_pixel_height { 0.003 };
169 double focalMm { 500 };
177 GuiderUtils::Matrix ROT_Z;
181 double calibrationAngle { 0 };
182 double calibrationAngleRA = 0;
183 double calibrationAngleDEC = 0;
187 double raPulseMsPerArcsecond { 0 };
188 double decPulseMsPerArcsecond { 0 };
191 bool calibrationDecSwap {
false };
195 bool decSwap {
false };
202 ISD::Mount::PierSide calibrationPierSide { ISD::Mount::PIER_UNKNOWN };
204 bool initialized {
false };
205 friend class TestGuideStars;
An angle, stored as degrees, but expressible in many ways.