AHP® GT Controllers API
AHP GT Controllers
Loading...
Searching...
No Matches
ahp_gt.h
1
26
27#ifndef _AHP_GT_H
28#define _AHP_GT_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33#ifdef _WIN32
34#include <winsock2.h>
35#include <windows.h>
36#define DLL_EXPORT __declspec(dllexport)
37#else
38#define DLL_EXPORT extern
39#endif
40
41#include <stdio.h>
42#include <stdlib.h>
43#include <string.h>
44#include <math.h>
45#include <unistd.h>
46
67
79
80#ifndef AHP_DEBUG
81#define AHP_DEBUG
82#define AHP_DEBUG_INFO 0
83#define AHP_DEBUG_ERROR 1
84#define AHP_DEBUG_WARNING 2
85#define AHP_DEBUG_DEBUG 3
90DLL_EXPORT void ahp_set_debug_level(int value);
95DLL_EXPORT int ahp_get_debug_level(void);
100DLL_EXPORT void ahp_set_app_name(char* name);
105DLL_EXPORT char* ahp_get_app_name(void);
110DLL_EXPORT void ahp_set_stdout(FILE *f);
115DLL_EXPORT void ahp_set_stderr(FILE *f);
116#endif
117
121
123typedef enum {
125 AABB = 0,
127 ABAB = 1,
129 ABBA = 2,
131
133typedef enum {
141
143typedef enum {
145GpioUnused = 0x0000,
147GpioAsST4 = 0x0001,
152} GTFeature;
153
167
169typedef enum {
171inPPECTraining = 0x000010,
173inPPEC = 0x000020,
175hasEncoder = 0x000001,
177hasPPEC = 0x000002,
179hasHomeIndexer = 0x000004,
181isAZEQ = 0x000008,
183hasPolarLed = 0x001000,
189hasWifi = 0x008000,
191
192typedef enum {
193 START_PPEC_TRAINING_CMD = 0x00,
194 STOP_PPEC_TRAINING_CMD = 0x01,
195 TURN_PPEC_ON_CMD = 0x02,
196 TURN_PPEC_OFF_CMD = 0x03,
197 ENCODER_ON_CMD = 0x04,
198 ENCODER_OFF_CMD = 0x05,
199 DISABLE_FULL_CURRENT_LOW_SPEED_CMD = 0x0006,
200 ENABLE_FULL_CURRENT_LOW_SPEED_CMD = 0x0106,
201 RESET_HOME_INDEXER_CMD = 0x08,
202} SkywatcherSetFeatureCmd;
203
205typedef enum {
207isEQ6 = 0x00,
209isHEQ5 = 0x01,
211isEQ5 = 0x02,
213isEQ3 = 0x03,
215isEQ8 = 0x04,
217isAZEQ6 = 0x05,
219isAZEQ5 = 0x06,
221isGT = 0x80,
223isMF = 0x81,
225is114GT = 0x82,
227isDOB = 0x90,
229isCustom = 0xF0,
230} MountType;
231
232typedef enum {
233 Null = '\0',
234 Initialize = 'F',
235 InquireMotorBoardVersion = 'e',
236 InquireGridPerRevolution = 'a',
237 InquireTimerInterruptFreq = 'b',
238 InquireHighSpeedRatio = 'g',
239 InquirePECPeriod = 's',
240 InstantAxisStop = 'L',
241 NotInstantAxisStop = 'K',
242 SetAxisPositionCmd = 'E',
243 GetAxisPosition = 'j',
244 GetAxisStatus = 'f',
245 SetSwitch = 'O',
246 SetMotionMode = 'G',
247 SetGotoTargetIncrement = 'H',
248 SetBreakPointIncrement = 'M',
249 SetGotoTarget = 'S',
250 SetBreakStep = 'U',
251 SetStepPeriod = 'I',
252 StartMotion = 'J',
253 GetStepPeriod = 'D', // See Merlin protocol http://www.papywizard.org/wiki/DevelopGuide
254 ActivateMotor = 'B', // See eq6direct implementation http://pierre.nerzic.free.fr/INDI/
255 SetST4GuideRateCmd = 'P',
256 SetFeatureCmd = 'W', // EQ8/AZEQ6/AZEQ5 only
257 GetFeatureCmd = 'q', // EQ8/AZEQ6/AZEQ5 only
258 InquireAuxEncoder = 'd', // EQ8/AZEQ6/AZEQ5 only
259 SetVars = '@',
260 GetVars = '?',
261 ReloadVars = '$',
262 Flash = '#',
263 FlashEnable = '!',
264 SetAddress = '=',
265 SetAxis = '.',
266 GetAxis = ',',
267} SkywatcherCommand;
268
270typedef enum {
272 GetRaDec = 'E', // < '34AB,12CE#'
274 GetPreciseRaDec = 'e', // < 34AB0500,12CE0500#
276 GetAzAlt = 'Z', // < 12AB,4000#
278 GetPreciseAzAlt = 'z', // < 12AB0500,40000500#
280 GotoRaDec = 'R', // > 'R34AB,12CE' < #
282 GotoPreciseRaDec = 'r', // > r'34AB0500,12CE0500', < #
284 GotoAzAlt = 'B', // > 'B12AB,4000', < '#'
286 GotoPreciseAzAlt = 'b', // > 'b12AB0500,40000500', < #
288 SyncRaDec = 'S', // > 'S34AB,12CE', < '#'
290 SyncPreciseRaDec = 's', // > 's34AB0500,12CE0500', < #
292 GetTrackingMode = 't', // < chr:mode #
294 SetTrackingMode = 'T', // > chr:mode #
313 Slew = 'P',
315 GetLocation = 'w', // < chr:A & chr:B & chr:C & chr:D & chr:E & chr:F & chr:G & chr:H & '#'
317 SetLocation = 'W', // > & chr:A & chr:B & chr:C & chr:D & chr:E & chr:F & chr:G & chr:H '#'
319 GetTime = 'h', // < chr:Q & chr:R & chr:S & chr:T & chr:U & chr:V & chr:W & chr:X & '#'
321 SetTime = 'H', // > & chr:Q & chr:R & chr:S & chr:T & chr:U & chr:V & chr:W & chr:X
323 GetSynScanVersion = 'V', // Replies 6 hexadecimal digits in ASCII and ends with '#', i.e. if the version is 04.37.07, then the hand control will responses '042507#', Hand Control responses its firmware version in 6 hexadecimal digits in ASCII. Each hexadecimal digits will be one of ‘0’~ ‘9’ and ‘A’~ ‘F’.
325 GetModel = 'm', // < chr:model & '#' Hand Control responses the model of mount.
327 Echo = 'K', // > & chr:x chr:x & '#'
329 AlignmentComplete = 'J', // chr:align & #
333 CancelGOTO = 'M', // < '#'
335 GetMountPointingState = 'p', // < 'E' or 'W' & '#' Hand Control responses the mount current pointing state. For northern 'E' means no flipping (OTA is on the eastern side of meridian), 'W' means flipped (OTA is on the western side). For southern hemisphere, 'E' means flipped, 'W' means not flipped.
337
349
351typedef enum {
357
359typedef enum {
365
373
375typedef enum {
376Ra = 0,
377Dec,
378Focus,
379Filter,
380Rotator,
381Iris,
382Shutter,
383Dome,
384Instrument,
385TipX,
386TipY,
387TipZ,
388TiltX,
389TiltY,
390TiltZ,
391InstrumentX,
392InstrumentY,
393InstrumentZ,
394InstrumentRotationX,
395InstrumentRotationY,
396InstrumentRotationZ,
397PhasePrimaryX,
398PhasePrimaryY,
399PhasePrimaryZ,
400PhaseSecondaryX,
401PhaseSecondaryY,
402PhaseSecondaryZ,
403PhaseTertiaryX,
404PhaseTertiaryY,
405PhaseTertiaryZ,
406FrequencyPrimaryX,
407FrequencyPrimaryY,
408FrequencyPrimaryZ,
409FrequencySecondaryX,
410FrequencySecondaryY,
411FrequencySecondaryZ,
412FrequencyTertiaryX,
413FrequencyTertiaryY,
414FrequencyTertiaryZ,
415PCMPrimaryX,
416PCMPrimaryY,
417PCMPrimaryZ,
418PCMSecondaryX,
419PCMSecondaryY,
420PCMSecondaryZ,
421PCMTertiaryX,
422PCMTertiaryY,
423PCMTertiaryZ,
424PlaneX,
425PlaneY,
426PlaneZ,
427RailX,
428RailY,
429RailZ,
431Guide = 64,
432NumAxes,
434
436typedef struct {
438 double variable;
440 double constant;
442
444typedef struct {
455//Current position
456double position;
457//timestamp
458double timestamp;
460
465#define AHP_GT_VERSION 0x175
466#define AHP_GT_ONE_SECOND 1500000
467
471
476 DLL_EXPORT inline unsigned int ahp_gt_get_version(void) { return AHP_GT_VERSION; }
477
483DLL_EXPORT int ahp_gt_connect(const char* port);
484
490DLL_EXPORT int ahp_gt_connect_fd(int fd);
491
498DLL_EXPORT int ahp_gt_connect_udp(const char* address, int port);
499
504DLL_EXPORT int ahp_gt_get_fd(void);
505
509DLL_EXPORT void ahp_gt_disconnect(void);
510
516DLL_EXPORT void ahp_gt_set_fd(int fd);
517
525DLL_EXPORT unsigned int ahp_gt_is_connected(void);
526
537DLL_EXPORT unsigned int ahp_gt_is_detected(int index);
538
544DLL_EXPORT int ahp_gt_get_mc_version(int axis);
545
549
555
560DLL_EXPORT int ahp_gt_get_axis_number(void);
561
566DLL_EXPORT int ahp_gt_get_axes_limit(void);
567
573DLL_EXPORT GTFeature ahp_gt_get_feature(int axis);
574
581
587DLL_EXPORT double ahp_gt_get_motor_steps(int axis);
588
594DLL_EXPORT double ahp_gt_get_motor_teeth(int axis);
595
601DLL_EXPORT double ahp_gt_get_worm_teeth(int axis);
602
608DLL_EXPORT double ahp_gt_get_crown_teeth(int axis);
609
615DLL_EXPORT double ahp_gt_get_divider(int axis);
616
622DLL_EXPORT double ahp_gt_get_multiplier(int axis);
623
629DLL_EXPORT int ahp_gt_get_totalsteps(int axis);
630
636DLL_EXPORT int ahp_gt_get_wormsteps(int axis);
637
643DLL_EXPORT double ahp_gt_get_guide_steps(int axis);
644
650DLL_EXPORT double ahp_gt_get_acceleration_steps(int axis);
651
657DLL_EXPORT double ahp_gt_get_acceleration_angle(int axis);
658
663DLL_EXPORT int ahp_gt_get_rs232_polarity(void);
664
670DLL_EXPORT int ahp_gt_get_pwm_frequency(int axis);
671
677DLL_EXPORT int ahp_gt_get_direction_invert(int axis);
678
684
691
698
704DLL_EXPORT double ahp_gt_get_max_speed(int axis);
705
711DLL_EXPORT double ahp_gt_get_speed_limit(int axis);
712
718DLL_EXPORT double ahp_gt_get_timing(int axis);
719
725DLL_EXPORT void ahp_gt_set_timing(int axis, int value);
726
731DLL_EXPORT void ahp_gt_set_mount_type(MountType value);
732
738DLL_EXPORT void ahp_gt_set_axis_number(int axis, int value);
739
745DLL_EXPORT const char* ahp_gt_axis_name(int axis);
746
751DLL_EXPORT void ahp_gt_set_axes_limit(int value);
752
758DLL_EXPORT void ahp_gt_set_features(int axis, SkywatcherFeature value);
759
765DLL_EXPORT void ahp_gt_set_feature(int axis, GTFeature value);
766
772DLL_EXPORT void ahp_gt_set_motor_steps(int axis, double value);
773
779DLL_EXPORT void ahp_gt_set_motor_teeth(int axis, double value);
780
786DLL_EXPORT void ahp_gt_set_worm_teeth(int axis, double value);
787
793DLL_EXPORT void ahp_gt_set_crown_teeth(int axis, double value);
794
800DLL_EXPORT void ahp_gt_set_divider(int axis, int value);
801
807DLL_EXPORT void ahp_gt_set_multiplier(int axis, int value);
808
814DLL_EXPORT void ahp_gt_set_totalsteps(int axis, int value);
815
821DLL_EXPORT void ahp_gt_set_wormsteps(int axis, int value);
822
828DLL_EXPORT void ahp_gt_set_guide_steps(int axis, double value);
829
835DLL_EXPORT void ahp_gt_limit_intensity(int axis, int value);
836
842DLL_EXPORT int ahp_gt_is_intensity_limited(int axis);
843
849DLL_EXPORT void ahp_gt_set_intensity_limit(int axis, double value);
850
856DLL_EXPORT double ahp_gt_get_intensity_limit(int axis);
857
863void ahp_gt_set_voltage(int axis, double value);
864
871
877double ahp_gt_get_intensity_deviation(int axis, double freq);
878
884DLL_EXPORT void ahp_gt_set_acceleration_angle(int axis, double value);
885
890DLL_EXPORT void ahp_gt_set_rs232_polarity(int value);
891
897DLL_EXPORT void ahp_gt_set_pwm_frequency(int axis, int value);
898
904DLL_EXPORT void ahp_gt_set_direction_invert(int axis, int value);
905
910DLL_EXPORT void ahp_gt_set_mount_flags(GTFlags value);
911
917DLL_EXPORT void ahp_gt_set_stepping_conf(int axis, GTSteppingConfiguration value);
918
924DLL_EXPORT void ahp_gt_set_stepping_mode(int axis, GTSteppingMode value);
925
931DLL_EXPORT void ahp_gt_set_max_speed(int axis, double value);
932
936
941DLL_EXPORT int ahp_gt_detect_device(void);
942
948DLL_EXPORT int ahp_gt_select_device(int address);
949
954DLL_EXPORT int ahp_gt_get_current_device(void);
955
960DLL_EXPORT void ahp_gt_set_address(int address);
961
966DLL_EXPORT int ahp_gt_get_address(void);
967
971
978DLL_EXPORT void ahp_gt_write_values(int axis, int *percent, int *finished);
979
984DLL_EXPORT void ahp_gt_read_values(int axis);
985
989
996
1003DLL_EXPORT double ahp_gt_get_position(int axis, double *timestamp);
1004
1010DLL_EXPORT void ahp_gt_set_position(int axis, double value);
1011
1017DLL_EXPORT int ahp_gt_is_axis_moving(int axis);
1018
1024DLL_EXPORT void ahp_gt_stop_motion(int axis, int wait);
1025
1031DLL_EXPORT void ahp_gt_start_motion(int axis, double speed);
1032
1039DLL_EXPORT void ahp_gt_goto_relative(int axis, double increment, double speed);
1040
1047DLL_EXPORT void ahp_gt_goto_absolute(int axis, double target, double speed);
1048
1051
1058DLL_EXPORT int ahp_gt_start_synscan_server(int port, int *interrupt);
1059
1065DLL_EXPORT void ahp_gt_set_aligned(int aligned);
1066
1071DLL_EXPORT int ahp_gt_is_aligned(void);
1072
1077DLL_EXPORT void ahp_gt_set_time(double seconds);
1078
1083DLL_EXPORT double ahp_gt_get_time(void);
1084
1085
1090DLL_EXPORT void ahp_gt_set_time_offset(double offset);
1091
1096DLL_EXPORT double ahp_gt_get_time_offset(void);
1097
1104DLL_EXPORT void ahp_gt_set_location(double latitude, double longitude, double elevation);
1105
1112DLL_EXPORT void ahp_gt_get_location(double *latitude, double *longitude, double *elevation);
1113
1119DLL_EXPORT void ahp_gt_goto_altaz(double alt, double az);
1120
1128DLL_EXPORT double ahp_gt_tracking_sine(double Alt, double Az, double Lat);
1129
1137DLL_EXPORT double ahp_gt_tracking_cosine(double Alt, double Az, double Lat);
1138
1144DLL_EXPORT void ahp_gt_goto_radec(double ra, double dec);
1145
1151DLL_EXPORT void ahp_gt_sync_radec(double ra, double dec);
1152
1159DLL_EXPORT void ahp_gt_correct_tracking(int axis, double target_period, int *interrupt);
1160
1164DLL_EXPORT void ahp_gt_start_tracking_thread(void);
1165
1169DLL_EXPORT void ahp_gt_stop_tracking_thread(void);
1170
1175DLL_EXPORT void ahp_gt_set_tracking_mode(int mode);
1176
1181DLL_EXPORT int ahp_gt_get_tracking_mode(void);
1182
1187DLL_EXPORT void ahp_gt_start_tracking(int axis);
1188
1196DLL_EXPORT void ahp_gt_get_ra_dec_coordinates(double Alt, double Az, double *Ra, double *Dec);
1197
1205DLL_EXPORT void ahp_gt_get_alt_az_coordinates(double Ra, double Dec, double* Alt, double *Az);
1206
1211DLL_EXPORT double ahp_gt_get_ha(void);
1212
1217DLL_EXPORT double ahp_gt_get_ra(void);
1218
1223DLL_EXPORT double ahp_gt_get_dec(void);
1224
1228
1229#if (AHP_GT_VERSION < 0x173)
1230#define GT GT1
1231#define ahp_gt_connect(a, b) ahp_gt_connect(a)
1232#define ahp_gt_set_pwm_frequency(a, b) ahp_gt_set_pwm_frequency(b)
1233#define ahp_gt_get_pwm_frequency(a) ahp_gt_get_pwm_frequency()
1234#endif
1235
1236#ifdef __cplusplus
1237} // extern "C"
1238#endif
1239
1240#endif //_AHP_GT_H
DLL_EXPORT int ahp_gt_select_device(int address)
Select a device on a serial bus.
DLL_EXPORT int ahp_gt_get_address(void)
Get the current device address.
DLL_EXPORT int ahp_gt_detect_device(void)
Detect the currently selected device.
DLL_EXPORT void ahp_gt_set_address(int address)
Change the current device address.
DLL_EXPORT int ahp_gt_get_current_device(void)
Obtain the current device address.
DLL_EXPORT void ahp_gt_correct_tracking(int axis, double target_period, int *interrupt)
Start a tracking motion correction.
DLL_EXPORT void ahp_gt_get_ra_dec_coordinates(double Alt, double Az, double *Ra, double *Dec)
Get the azimuth tracking multiplier for AZ mounts.
DLL_EXPORT double ahp_gt_get_ra(void)
Get the current right ascension.
DLL_EXPORT void ahp_gt_set_aligned(int aligned)
Set the alignment state of the current device.
DLL_EXPORT void ahp_gt_sync_radec(double ra, double dec)
Set both axes positions to celestial coordinates.
DLL_EXPORT double ahp_gt_tracking_cosine(double Alt, double Az, double Lat)
Get the azimuth tracking multiplier for AZ mounts.
DLL_EXPORT void ahp_gt_goto_radec(double ra, double dec)
Move both axes to celestial coordinates.
DLL_EXPORT double ahp_gt_tracking_sine(double Alt, double Az, double Lat)
Get the altitude tracking multiplier for AZ mounts.
DLL_EXPORT void ahp_gt_set_location(double latitude, double longitude, double elevation)
Set geographic coordinates.
DLL_EXPORT void ahp_gt_set_time_offset(double offset)
Set current time offset.
DLL_EXPORT void ahp_gt_start_tracking(int axis)
Start a test tracking motion.
DLL_EXPORT double ahp_gt_get_time(void)
Get current time.
DLL_EXPORT double ahp_gt_get_ha(void)
Get the current hour angle.
DLL_EXPORT int ahp_gt_get_tracking_mode(void)
Get the tracking mode.
DLL_EXPORT double ahp_gt_get_dec(void)
Get the current declination.
DLL_EXPORT int ahp_gt_start_synscan_server(int port, int *interrupt)
Start an TCP server on the given port and stop after interrupt equals to 1.
DLL_EXPORT void ahp_gt_set_tracking_mode(int mode)
Set the tracking mode.
DLL_EXPORT double ahp_gt_get_time_offset(void)
Get current time offset.
DLL_EXPORT void ahp_gt_get_alt_az_coordinates(double Ra, double Dec, double *Alt, double *Az)
Get current altitude and azimuth.
DLL_EXPORT void ahp_gt_get_location(double *latitude, double *longitude, double *elevation)
Get geographic coordinates.
DLL_EXPORT void ahp_gt_stop_tracking_thread(void)
Stop the tracking thread.
DLL_EXPORT int ahp_gt_is_aligned(void)
Get the alignment state of the current device.
DLL_EXPORT void ahp_gt_goto_altaz(double alt, double az)
Move both axes to horizontal coordinates.
DLL_EXPORT void ahp_gt_set_time(double seconds)
Set current time.
DLL_EXPORT void ahp_gt_start_tracking_thread(void)
Start the tracking thread.
DLL_EXPORT void ahp_gt_read_values(int axis)
Read values from the GT controller.
DLL_EXPORT void ahp_gt_write_values(int axis, int *percent, int *finished)
Write values from the GT controller.
DLL_EXPORT void ahp_gt_disconnect(void)
Disconnect from the GT controller.
DLL_EXPORT unsigned int ahp_gt_is_detected(int index)
Report detection status.
DLL_EXPORT unsigned int ahp_gt_is_connected(void)
Report connection status.
DLL_EXPORT void ahp_gt_set_fd(int fd)
Set the file descriptor that links to the controller.
DLL_EXPORT int ahp_gt_connect_udp(const char *address, int port)
Connect to the GT controller throught an UDP connection.
DLL_EXPORT unsigned int ahp_gt_get_version(void)
Obtain the current libahp-gt version.
Definition ahp_gt.h:476
DLL_EXPORT int ahp_gt_get_fd(void)
Return the file descriptor of the port connected to the GT controllers.
DLL_EXPORT int ahp_gt_get_mc_version(int axis)
Get the GT firmware version.
DLL_EXPORT int ahp_gt_connect_fd(int fd)
Connect to the GT controller using an existing file descriptor.
DLL_EXPORT char * ahp_get_app_name(void)
get the application name
DLL_EXPORT void ahp_set_app_name(char *name)
set the application name
DLL_EXPORT int ahp_get_debug_level(void)
get the debug level
DLL_EXPORT void ahp_set_debug_level(int value)
set the debug level
DLL_EXPORT void ahp_set_stderr(FILE *f)
set the error log stream
DLL_EXPORT void ahp_set_stdout(FILE *f)
set the output log stream
#define AHP_GT_VERSION
AHP_GT_VERSION This library version.
Definition ahp_gt.h:465
DLL_EXPORT int ahp_gt_is_axis_moving(int axis)
Determine if an axis is moving.
DLL_EXPORT double ahp_gt_get_position(int axis, double *timestamp)
Get the axis position.
DLL_EXPORT void ahp_gt_goto_absolute(int axis, double target, double speed)
Move an axis to a position.
DLL_EXPORT void ahp_gt_goto_relative(int axis, double increment, double speed)
Move an axis by an offset.
DLL_EXPORT void ahp_gt_stop_motion(int axis, int wait)
Stop an axis motion.
DLL_EXPORT void ahp_gt_start_motion(int axis, double speed)
Move an axis.
DLL_EXPORT void ahp_gt_set_position(int axis, double value)
Set the axis position in radians.
DLL_EXPORT SkywatcherAxisStatus ahp_gt_get_status(int axis)
Get an axis status.
DLL_EXPORT void ahp_gt_set_motor_steps(int axis, double value)
Set the motor steps number.
DLL_EXPORT void ahp_gt_set_crown_teeth(int axis, double value)
Set the crown gear teeth number.
DLL_EXPORT double ahp_gt_get_worm_teeth(int axis)
Get the current worm gear teeth number.
DLL_EXPORT double ahp_gt_get_speed_limit(int axis)
Get the speed limit.
DLL_EXPORT void ahp_gt_set_stepping_mode(int axis, GTSteppingMode value)
Set the stepping mode.
DLL_EXPORT void ahp_gt_limit_intensity(int axis, int value)
Limit the axis in intensity.
DLL_EXPORT double ahp_gt_get_intensity_limit(int axis)
Get the intensity limit.
DLL_EXPORT int ahp_gt_get_rs232_polarity(void)
Get the rs232 port polarity.
DLL_EXPORT double ahp_gt_get_acceleration_angle(int axis)
Get the acceleration angle.
DLL_EXPORT double ahp_gt_get_guide_steps(int axis)
Get the guiding rate.
DLL_EXPORT void ahp_gt_set_rs232_polarity(int value)
Set the rs232 port polarity.
DLL_EXPORT void ahp_gt_set_direction_invert(int axis, int value)
Set the forward direction.
DLL_EXPORT double ahp_gt_get_max_speed(int axis)
Get the maximum speed.
DLL_EXPORT void ahp_gt_set_motor_teeth(int axis, double value)
Set the motor gear teeth number.
DLL_EXPORT void ahp_gt_set_acceleration_angle(int axis, double value)
Set the acceleration in high speed mode.
DLL_EXPORT MountType ahp_gt_get_mount_type(void)
Get the current GT mount type.
DLL_EXPORT double ahp_gt_get_timing(int axis)
Get the timing value of the axis.
DLL_EXPORT void ahp_gt_set_totalsteps(int axis, int value)
Set the total number of steps.
DLL_EXPORT int ahp_gt_get_direction_invert(int axis)
Get the forward direction.
DLL_EXPORT double ahp_gt_get_motor_steps(int axis)
Get the current motor steps number.
DLL_EXPORT void ahp_gt_set_feature(int axis, GTFeature value)
Set the GT features.
DLL_EXPORT void ahp_gt_set_mount_flags(GTFlags value)
Set the mount flags.
DLL_EXPORT GTFlags ahp_gt_get_mount_flags(void)
Get the mount flags.
double ahp_gt_get_intensity_deviation(int axis, double freq)
Get the intensity or intensity estimated at a given frequency.
DLL_EXPORT GTSteppingConfiguration ahp_gt_get_stepping_conf(int axis)
Get the stepping configuration.
DLL_EXPORT GTFeature ahp_gt_get_feature(int axis)
Get the current GT features.
void ahp_gt_set_voltage(int axis, double value)
Set the voltage for intensity or intensity estimation.
DLL_EXPORT double ahp_gt_get_crown_teeth(int axis)
Get the current crown gear teeth number.
DLL_EXPORT void ahp_gt_set_features(int axis, SkywatcherFeature value)
Set the Skywatcher features.
DLL_EXPORT void ahp_gt_set_guide_steps(int axis, double value)
Set the guiding speed.
DLL_EXPORT int ahp_gt_get_axes_limit(void)
Get the current GT controller axis number limit.
DLL_EXPORT void ahp_gt_set_wormsteps(int axis, int value)
Set the worm number of steps.
DLL_EXPORT int ahp_gt_get_wormsteps(int axis)
Get the worm number of steps.
DLL_EXPORT double ahp_gt_get_acceleration_steps(int axis)
Get the acceleration increment steps number.
DLL_EXPORT GTSteppingMode ahp_gt_get_stepping_mode(int axis)
Get the stepping mode.
DLL_EXPORT const char * ahp_gt_axis_name(int axis)
Get the GT controller axis name.
DLL_EXPORT void ahp_gt_set_timing(int axis, int value)
Set the timing value of the axis.
DLL_EXPORT void ahp_gt_set_intensity_limit(int axis, double value)
Set the intensity limit.
DLL_EXPORT void ahp_gt_set_axes_limit(int value)
Set the GT controller axis number limit.
DLL_EXPORT int ahp_gt_get_axis_number(void)
Get the current GT controller axis number.
DLL_EXPORT int ahp_gt_get_totalsteps(int axis)
Get the total number of steps.
DLL_EXPORT void ahp_gt_set_max_speed(int axis, double value)
Set the maximum goto speed.
DLL_EXPORT double ahp_gt_get_divider(int axis)
Get the divider in the current configuration.
DLL_EXPORT void ahp_gt_set_axis_number(int axis, int value)
Set the GT controller axis number.
DLL_EXPORT double ahp_gt_get_motor_teeth(int axis)
Get the current motor gear teeth number.
DLL_EXPORT void ahp_gt_set_divider(int axis, int value)
Set the divider in the current configuration.
DLL_EXPORT int ahp_gt_is_intensity_limited(int axis)
Query if the axis is intensity limited.
DLL_EXPORT SkywatcherFeature ahp_gt_get_features(int axis)
Get the current SkyWatcher features.
DLL_EXPORT void ahp_gt_set_worm_teeth(int axis, double value)
Set the worm gear teeth number.
DLL_EXPORT void ahp_gt_set_multiplier(int axis, int value)
Set the multiplier in the current configuration.
DLL_EXPORT double ahp_gt_get_multiplier(int axis)
Get the multiplier in the current configuration.
DLL_EXPORT void ahp_gt_set_stepping_conf(int axis, GTSteppingConfiguration value)
Set the stepping configuration.
void ahp_gt_add_intensity_deviator(int axis, gt_deviator deviator)
Add an intensity deviator for the intensity estimation.
DLL_EXPORT void ahp_gt_set_mount_type(MountType value)
Set the mount type.
SkywatcherDirection
Direction.
Definition ahp_gt.h:367
MountType
Default Mount types.
Definition ahp_gt.h:205
GTFlags
GT custom flags.
Definition ahp_gt.h:155
SkywatcherAxis
Axis Indexes.
Definition ahp_gt.h:375
GTSteppingMode
Stepping mode.
Definition ahp_gt.h:133
SkywatcherMotionMode
Motion Mode.
Definition ahp_gt.h:339
SkywatcherFeature
Skywatcher default features - EQ8/AZEQ6/AZEQ5 only.
Definition ahp_gt.h:169
SkywatcherSpeedMode
Speed Mode.
Definition ahp_gt.h:359
SkywatcherSlewMode
Slew Mode.
Definition ahp_gt.h:351
SynscanCommand
Commands for the SynScan protocol implementation.
Definition ahp_gt.h:270
GTFeature
ST-4 port configuration.
Definition ahp_gt.h:143
GTSteppingConfiguration
Motor coils phase winding configuration.
Definition ahp_gt.h:123
@ DIRECTION_BACKWARD
Move backward.
Definition ahp_gt.h:371
@ DIRECTION_FORWARD
Move forward.
Definition ahp_gt.h:369
@ isMF
Fork Mount.
Definition ahp_gt.h:223
@ isHEQ5
Sky-Watcher HEQ5.
Definition ahp_gt.h:209
@ isAZEQ5
Sky-Watcher AZEQ5.
Definition ahp_gt.h:219
@ isAZEQ6
Sky-Watcher AZEQ6.
Definition ahp_gt.h:217
@ isEQ5
Sky-Watcher EQ5.
Definition ahp_gt.h:211
@ isCustom
Custom mount.
Definition ahp_gt.h:229
@ isEQ8
Sky-Watcher EQ8.
Definition ahp_gt.h:215
@ is114GT
114GT
Definition ahp_gt.h:225
@ isDOB
Dobsonian mount.
Definition ahp_gt.h:227
@ isGT
Sky-Watcher GT.
Definition ahp_gt.h:221
@ isEQ3
Sky-Watcher EQ3.
Definition ahp_gt.h:213
@ isEQ6
Sky-Watcher EQ6.
Definition ahp_gt.h:207
@ halfCurrentRA
Half-current high-speed on RA.
Definition ahp_gt.h:159
@ torqueControl
Control torque.
Definition ahp_gt.h:165
@ halfCurrentDec
Half-current high-speed on Dec.
Definition ahp_gt.h:161
@ isForkMount
Fork mount, will avoid meridian flip.
Definition ahp_gt.h:157
@ bauds_115200
high Baud Rate 115200
Definition ahp_gt.h:163
@ Guide
Guide, following indexes add motion compensation to the previous axes, starting from Ra.
Definition ahp_gt.h:431
@ HalfStep
Half-stepping in low speed, Half-stepping in high speed.
Definition ahp_gt.h:139
@ Microstep
Microstepping in low speed, Microstepping in high speed.
Definition ahp_gt.h:137
@ Mixed
Microstepping in low speed, Half-stepping in high speed.
Definition ahp_gt.h:135
@ MODE_GOTO_HISPEED
High-speed (half-stepping mostly) Goto.
Definition ahp_gt.h:341
@ MODE_SLEW_HISPEED
High-speed (half-stepping mostly) Slew.
Definition ahp_gt.h:347
@ MODE_SLEW_LOSPEED
Low-speed (microstepping possibly) Slew.
Definition ahp_gt.h:343
@ MODE_GOTO_LOSPEED
Low-speed (microstepping possibly) Goto.
Definition ahp_gt.h:345
@ hasHalfCurrentTracking
Mount allows half-current tracking.
Definition ahp_gt.h:187
@ hasCommonSlewStart
Mount has a common slew start.
Definition ahp_gt.h:185
@ hasEncoder
Mount has an encoder.
Definition ahp_gt.h:175
@ inPPEC
PPEC correction in progress.
Definition ahp_gt.h:173
@ hasWifi
Mount provides a WiFi communication.
Definition ahp_gt.h:189
@ hasPPEC
Mount has PPEC.
Definition ahp_gt.h:177
@ inPPECTraining
PPEC training in progress.
Definition ahp_gt.h:171
@ hasHomeIndexer
Mount has an home indexer.
Definition ahp_gt.h:179
@ isAZEQ
Mount is an AZEQ.
Definition ahp_gt.h:181
@ hasPolarLed
Mount has a polar scope led.
Definition ahp_gt.h:183
@ SPEED_LOW
Low-speed (microstepping possibly)
Definition ahp_gt.h:361
@ SPEED_HIGH
High-speed (half-stepping mostly)
Definition ahp_gt.h:363
@ MODE_SLEW
Slew, no target, will stop upon request only.
Definition ahp_gt.h:353
@ MODE_GOTO
Goto, targeted, will stop upon request or on target reached.
Definition ahp_gt.h:355
@ SetLocation
Set Location.
Definition ahp_gt.h:317
@ GetModel
Get Model 0 = EQ6 GOTO Series 1 = HEQ5 GOTO Series 2 = EQ5 GOTO Series 3 = EQ3 GOTO Series 4 = EQ8 GO...
Definition ahp_gt.h:325
@ SyncPreciseRaDec
Sync precise RA/DEC.
Definition ahp_gt.h:290
@ GotoPreciseAzAlt
GOTO precise AZM-ALT.
Definition ahp_gt.h:286
@ CancelGOTO
Cancel GOTO.
Definition ahp_gt.h:333
@ SetTrackingMode
Set Tracking Mode.
Definition ahp_gt.h:294
@ GetLocation
Get Location.
Definition ahp_gt.h:315
@ GetSynScanVersion
Get Version.
Definition ahp_gt.h:323
@ GetRaDec
Get RA/DEC.
Definition ahp_gt.h:272
@ SetTime
Set Time.
Definition ahp_gt.h:321
@ Slew
Definition ahp_gt.h:313
@ SyncRaDec
Sync RA/DEC.
Definition ahp_gt.h:288
@ GetMountPointingState
Get Mount Pointing State.
Definition ahp_gt.h:335
@ GotoPreciseRaDec
GOTO precise RA/DEC.
Definition ahp_gt.h:282
@ GetTime
Get Time.
Definition ahp_gt.h:319
@ GetPreciseRaDec
Get precise RA/DEC.
Definition ahp_gt.h:274
@ GetPreciseAzAlt
Get precise AZM-ALT.
Definition ahp_gt.h:278
@ Echo
Echo - useful to check communication.
Definition ahp_gt.h:327
@ GetAzAlt
Get AZM-ALT.
Definition ahp_gt.h:276
@ GetTrackingMode
Get Tracking Mode.
Definition ahp_gt.h:292
@ GotoAzAlt
GOTO AZM-ALT.
Definition ahp_gt.h:284
@ AlignmentComplete
Is Alignment Complete? - align=1 if aligned and 0 if not.
Definition ahp_gt.h:329
@ GOTOinProgress
Is GOTO in Progress? - Response is ASCII'0' or '1'& '#'.
Definition ahp_gt.h:331
@ GotoRaDec
GOTO RA/DEC.
Definition ahp_gt.h:280
@ GpioUnused
The ST4 port will remain unused.
Definition ahp_gt.h:145
@ GpioAsPulseDrive
The ST4 port will drive an external Step/Dir power drive.
Definition ahp_gt.h:151
@ GpioAsST4
The ST4 port will work as autoguider.
Definition ahp_gt.h:147
@ GpioAsEncoder
The ST4 port will be connected to an encoder.
Definition ahp_gt.h:149
@ ABBA
ABBA Motor winding.
Definition ahp_gt.h:129
@ AABB
AABB Motor winding.
Definition ahp_gt.h:125
@ ABAB
ABAB Motor winding.
Definition ahp_gt.h:127
Axis Status.
Definition ahp_gt.h:444
SkywatcherSlewMode Mode
Current slew mode.
Definition ahp_gt.h:450
SkywatcherSpeedMode Speed
Current speed mode.
Definition ahp_gt.h:452
SkywatcherDirection Direction
Current direction.
Definition ahp_gt.h:454
int Initialized
Motor was initialized.
Definition ahp_gt.h:446
int Running
Motor is running.
Definition ahp_gt.h:448
Axis Intensity predictor.
Definition ahp_gt.h:436
double variable
2nd order variable
Definition ahp_gt.h:438
double constant
offset constant
Definition ahp_gt.h:440