Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/guide/internalguide/gmath.h
Show All 17 Lines | |||||
18 | #include <QObject> | 18 | #include <QObject> | ||
19 | #include <QPointer> | 19 | #include <QPointer> | ||
20 | #include <QTime> | 20 | #include <QTime> | ||
21 | #include <QVector> | 21 | #include <QVector> | ||
22 | #include <QFile> | 22 | #include <QFile> | ||
23 | 23 | | |||
24 | #include <cstdint> | 24 | #include <cstdint> | ||
25 | #include <sys/types.h> | 25 | #include <sys/types.h> | ||
26 | #include "guidelog.h" | ||||
26 | 27 | | |||
27 | class FITSView; | 28 | class FITSView; | ||
28 | class FITSData; | 29 | class FITSData; | ||
29 | class Edge; | 30 | class Edge; | ||
30 | 31 | | |||
31 | typedef struct | 32 | typedef struct | ||
32 | { | 33 | { | ||
33 | int size; | 34 | int size; | ||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 108 | public: | |||
149 | // Star tracking | 150 | // Star tracking | ||
150 | void getStarDrift(double *dx, double *dy) const; | 151 | void getStarDrift(double *dx, double *dy) const; | ||
151 | void getStarScreenPosition(double *dx, double *dy) const; | 152 | void getStarScreenPosition(double *dx, double *dy) const; | ||
152 | Vector findLocalStarPosition(void) const; | 153 | Vector findLocalStarPosition(void) const; | ||
153 | bool isStarLost(void) const; | 154 | bool isStarLost(void) const; | ||
154 | void setLostStar(bool is_lost); | 155 | void setLostStar(bool is_lost); | ||
155 | 156 | | |||
156 | // Main processing function | 157 | // Main processing function | ||
157 | void performProcessing(void); | 158 | void performProcessing(GuideLog *logger = nullptr); | ||
158 | 159 | | |||
159 | // Math | 160 | // Math | ||
160 | bool calculateAndSetReticle1D(double start_x, double start_y, double end_x, double end_y, int RATotalPulse = -1); | 161 | bool calculateAndSetReticle1D(double start_x, double start_y, double end_x, double end_y, int RATotalPulse = -1); | ||
161 | bool calculateAndSetReticle2D(double start_ra_x, double start_ra_y, double end_ra_x, double end_ra_y, | 162 | bool calculateAndSetReticle2D(double start_ra_x, double start_ra_y, double end_ra_x, double end_ra_y, | ||
162 | double start_dec_x, double start_dec_y, double end_dec_x, double end_dec_y, | 163 | double start_dec_x, double start_dec_y, double end_dec_x, double end_dec_y, | ||
163 | bool *swap_dec, int RATotalPulse = -1, int DETotalPulse = -1); | 164 | bool *swap_dec, int RATotalPulse = -1, int DETotalPulse = -1); | ||
164 | double calculatePhi(double start_x, double start_y, double end_x, double end_y) const; | 165 | double calculatePhi(double start_x, double start_y, double end_x, double end_y) const; | ||
165 | 166 | | |||
Show All 18 Lines | 179 | private: | |||
184 | float *createFloatImage(FITSData *target=nullptr) const; | 185 | float *createFloatImage(FITSData *target=nullptr) const; | ||
185 | 186 | | |||
186 | void do_ticks(void); | 187 | void do_ticks(void); | ||
187 | Vector point2arcsec(const Vector &p) const; | 188 | Vector point2arcsec(const Vector &p) const; | ||
188 | void process_axes(void); | 189 | void process_axes(void); | ||
189 | void calc_square_err(void); | 190 | void calc_square_err(void); | ||
190 | const char *get_direction_string(GuideDirection dir); | 191 | const char *get_direction_string(GuideDirection dir); | ||
191 | 192 | | |||
192 | // Logging | 193 | // Old-stye Logging--deprecate. | ||
193 | void createGuideLog(); | 194 | void createGuideLog(); | ||
194 | 195 | | |||
195 | /// Global channel ticker | 196 | /// Global channel ticker | ||
196 | uint32_t ticks { 0 }; | 197 | uint32_t ticks { 0 }; | ||
197 | /// Pointer to image | 198 | /// Pointer to image | ||
198 | QPointer<FITSView> guideView; | 199 | QPointer<FITSView> guideView; | ||
199 | /// Video frame width | 200 | /// Video frame width | ||
200 | int video_width { -1 }; | 201 | int video_width { -1 }; | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |