AHP® GT Controllers API
AHP GT Controllers
ahp_gt.h
1 
27 #ifndef _AHP_GT_H
28 #define _AHP_GT_H
29 
30 #ifdef __cplusplus
31 extern "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 
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
90 DLL_EXPORT void ahp_set_debug_level(int value);
95 DLL_EXPORT int ahp_get_debug_level();
100 DLL_EXPORT void ahp_set_app_name(char* name);
105 DLL_EXPORT char* ahp_get_app_name();
110 DLL_EXPORT void ahp_set_stdout(FILE *f);
115 DLL_EXPORT void ahp_set_stderr(FILE *f);
116 #endif
117 
123 typedef enum {
125  AABB = 0,
127  ABAB = 1,
129  ABBA = 2,
131 
133 typedef enum {
135 Mixed = 0,
141 
143 typedef enum {
145 GpioUnused = 0x0000,
147 GpioAsST4 = 0x0001,
149 GpioAsEncoder = 0x0002,
152 } GTFeature;
153 
155 typedef enum {
164 } GTFlags;
165 
167 typedef enum {
169 inPPECTraining = 0x000010,
171 inPPEC = 0x000020,
173 hasEncoder = 0x000001,
175 hasPPEC = 0x000002,
177 hasHomeIndexer = 0x000004,
179 isAZEQ = 0x000008,
181 hasPolarLed = 0x001000,
187 hasWifi = 0x008000,
189 
190 typedef enum {
191  START_PPEC_TRAINING_CMD = 0x00,
192  STOP_PPEC_TRAINING_CMD = 0x01,
193  TURN_PPEC_ON_CMD = 0x02,
194  TURN_PPEC_OFF_CMD = 0x03,
195  ENCODER_ON_CMD = 0x04,
196  ENCODER_OFF_CMD = 0x05,
197  DISABLE_FULL_CURRENT_LOW_SPEED_CMD = 0x0006,
198  ENABLE_FULL_CURRENT_LOW_SPEED_CMD = 0x0106,
199  RESET_HOME_INDEXER_CMD = 0x08,
200 } SkywatcherSetFeatureCmd;
201 
203 typedef enum {
205 isEQ6 = 0x00,
207 isHEQ5 = 0x01,
209 isEQ5 = 0x02,
211 isEQ3 = 0x03,
213 isEQ8 = 0x04,
215 isAZEQ6 = 0x05,
217 isAZEQ5 = 0x06,
219 isGT = 0x80,
221 isMF = 0x81,
223 is114GT = 0x82,
225 isDOB = 0x90,
227 isCustom = 0xF0,
228 } MountType;
229 
230 typedef enum {
231  Null = '\0',
232  Initialize = 'F',
233  InquireMotorBoardVersion = 'e',
234  InquireGridPerRevolution = 'a',
235  InquireTimerInterruptFreq = 'b',
236  InquireHighSpeedRatio = 'g',
237  InquirePECPeriod = 's',
238  InstantAxisStop = 'L',
239  NotInstantAxisStop = 'K',
240  SetAxisPositionCmd = 'E',
241  GetAxisPosition = 'j',
242  GetAxisStatus = 'f',
243  SetSwitch = 'O',
244  SetMotionMode = 'G',
245  SetGotoTargetIncrement = 'H',
246  SetBreakPointIncrement = 'M',
247  SetGotoTarget = 'S',
248  SetBreakStep = 'U',
249  SetStepPeriod = 'I',
250  StartMotion = 'J',
251  GetStepPeriod = 'D', // See Merlin protocol http://www.papywizard.org/wiki/DevelopGuide
252  ActivateMotor = 'B', // See eq6direct implementation http://pierre.nerzic.free.fr/INDI/
253  SetST4GuideRateCmd = 'P',
254  SetFeatureCmd = 'W', // EQ8/AZEQ6/AZEQ5 only
255  GetFeatureCmd = 'q', // EQ8/AZEQ6/AZEQ5 only
256  InquireAuxEncoder = 'd', // EQ8/AZEQ6/AZEQ5 only
257  SetVars = '@',
258  GetVars = '?',
259  ReloadVars = '$',
260  Flash = '#',
261  FlashEnable = '!',
262  SetAddress = '=',
263  SetAxis = '.',
264  GetAxis = ',',
265 } SkywatcherCommand;
266 
268 typedef enum {
270  GetRaDec = 'E', // < '34AB,12CE#'
272  GetPreciseRaDec = 'e', // < 34AB0500,12CE0500#
274  GetAzAlt = 'Z', // < 12AB,4000#
276  GetPreciseAzAlt = 'z', // < 12AB0500,40000500#
278  GotoRaDec = 'R', // > 'R34AB,12CE' < #
280  GotoPreciseRaDec = 'r', // > r'34AB0500,12CE0500', < #
282  GotoAzAlt = 'B', // > 'B12AB,4000', < '#'
284  GotoPreciseAzAlt = 'b', // > 'b12AB0500,40000500', < #
286  SyncRaDec = 'S', // > 'S34AB,12CE', < '#'
288  SyncPreciseRaDec = 's', // > 's34AB0500,12CE0500', < #
290  GetTrackingMode = 't', // < chr:mode #
292  SetTrackingMode = 'T', // > chr:mode #
311  Slew = 'P',
313  GetLocation = 'w', // < chr:A & chr:B & chr:C & chr:D & chr:E & chr:F & chr:G & chr:H & '#'
315  SetLocation = 'W', // > & chr:A & chr:B & chr:C & chr:D & chr:E & chr:F & chr:G & chr:H '#'
317  GetTime = 'h', // < chr:Q & chr:R & chr:S & chr:T & chr:U & chr:V & chr:W & chr:X & '#'
319  SetTime = 'H', // > & chr:Q & chr:R & chr:S & chr:T & chr:U & chr:V & chr:W & chr:X
321  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’.
323  GetModel = 'm', // < chr:model & '#' Hand Control responses the model of mount.
325  Echo = 'K', // > & chr:x chr:x & '#'
327  AlignmentComplete = 'J', // chr:align & #
331  CancelGOTO = 'M', // < '#'
333  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.
335 
337 typedef enum {
347 
349 typedef enum {
351 MODE_SLEW = 0x1,
353 MODE_GOTO = 0x0,
355 
357 typedef enum {
359 SPEED_LOW = 0x0,
363 
365 typedef enum {
371 
373 typedef struct {
384 //Current position
385 double position;
386 //timestamp
387 double timestamp;
389 
394 #define AHP_GT_VERSION 0x172
395 #define AHP_GT_ONE_SECOND 1500000
396 
405  DLL_EXPORT inline unsigned int ahp_gt_get_version(void) { return AHP_GT_VERSION; }
406 
412 DLL_EXPORT int ahp_gt_connect(const char* port);
413 
419 DLL_EXPORT int ahp_gt_connect_fd(int fd);
420 
427 DLL_EXPORT int ahp_gt_connect_udp(const char* address, int port);
428 
433 DLL_EXPORT int ahp_gt_get_fd();
434 
438 DLL_EXPORT void ahp_gt_disconnect();
439 
445 DLL_EXPORT void ahp_gt_set_fd(int fd);
446 
454 DLL_EXPORT unsigned int ahp_gt_is_connected();
455 
466 DLL_EXPORT unsigned int ahp_gt_is_detected(int index);
467 
473 DLL_EXPORT int ahp_gt_get_mc_version(int axis);
474 
484 
489 DLL_EXPORT int ahp_gt_get_axis_number();
490 
496 DLL_EXPORT GTFeature ahp_gt_get_feature(int axis);
497 
504 
510 DLL_EXPORT double ahp_gt_get_motor_steps(int axis);
511 
517 DLL_EXPORT double ahp_gt_get_motor_teeth(int axis);
518 
524 DLL_EXPORT double ahp_gt_get_worm_teeth(int axis);
525 
531 DLL_EXPORT double ahp_gt_get_crown_teeth(int axis);
532 
538 DLL_EXPORT double ahp_gt_get_divider(int axis);
539 
545 DLL_EXPORT double ahp_gt_get_multiplier(int axis);
546 
552 DLL_EXPORT int ahp_gt_get_totalsteps(int axis);
553 
559 DLL_EXPORT int ahp_gt_get_wormsteps(int axis);
560 
566 DLL_EXPORT double ahp_gt_get_guide_steps(int axis);
567 
573 DLL_EXPORT double ahp_gt_get_acceleration_steps(int axis);
574 
580 DLL_EXPORT double ahp_gt_get_acceleration_angle(int axis);
581 
586 DLL_EXPORT int ahp_gt_get_rs232_polarity(void);
587 
592 DLL_EXPORT int ahp_gt_get_pwm_frequency(void);
593 
599 DLL_EXPORT int ahp_gt_get_direction_invert(int axis);
600 
606 
613 
620 
626 DLL_EXPORT double ahp_gt_get_max_speed(int axis);
627 
633 DLL_EXPORT double ahp_gt_get_speed_limit(int axis);
634 
640 DLL_EXPORT double ahp_gt_get_timing(int axis);
641 
647 DLL_EXPORT void ahp_gt_set_timing(int axis, int value);
648 
653 DLL_EXPORT void ahp_gt_set_mount_type(MountType value);
654 
660 DLL_EXPORT void ahp_gt_set_axis_number(int axis, int value);
661 
667 DLL_EXPORT void ahp_gt_set_features(int axis, SkywatcherFeature value);
668 
674 DLL_EXPORT void ahp_gt_set_feature(int axis, GTFeature value);
675 
681 DLL_EXPORT void ahp_gt_set_motor_steps(int axis, double value);
682 
688 DLL_EXPORT void ahp_gt_set_motor_teeth(int axis, double value);
689 
695 DLL_EXPORT void ahp_gt_set_worm_teeth(int axis, double value);
696 
702 DLL_EXPORT void ahp_gt_set_crown_teeth(int axis, double value);
703 
709 DLL_EXPORT void ahp_gt_set_divider(int axis, int value);
710 
716 DLL_EXPORT void ahp_gt_set_multiplier(int axis, int value);
717 
723 DLL_EXPORT void ahp_gt_set_totalsteps(int axis, int value);
724 
730 DLL_EXPORT void ahp_gt_set_wormsteps(int axis, int value);
731 
737 DLL_EXPORT void ahp_gt_set_guide_steps(int axis, double value);
738 
744 DLL_EXPORT void ahp_gt_set_acceleration_angle(int axis, double value);
745 
750 DLL_EXPORT void ahp_gt_set_rs232_polarity(int value);
751 
756 DLL_EXPORT void ahp_gt_set_pwm_frequency(int value);
757 
763 DLL_EXPORT void ahp_gt_set_direction_invert(int axis, int value);
764 
769 DLL_EXPORT void ahp_gt_set_mount_flags(GTFlags value);
770 
776 DLL_EXPORT void ahp_gt_set_stepping_conf(int axis, GTSteppingConfiguration value);
777 
783 DLL_EXPORT void ahp_gt_set_stepping_mode(int axis, GTSteppingMode value);
784 
790 DLL_EXPORT void ahp_gt_set_max_speed(int axis, double value);
791 
800 DLL_EXPORT int ahp_gt_detect_device();
801 
807 DLL_EXPORT int ahp_gt_select_device(int address);
808 
813 DLL_EXPORT int ahp_gt_get_current_device();
814 
819 DLL_EXPORT void ahp_gt_set_address(int address);
820 
825 DLL_EXPORT int ahp_gt_get_address();
826 
837 DLL_EXPORT void ahp_gt_write_values(int axis, int *percent, int *finished);
838 
843 DLL_EXPORT void ahp_gt_read_values(int axis);
844 
855 
862 DLL_EXPORT double ahp_gt_get_position(int axis, double *timestamp);
863 
869 DLL_EXPORT void ahp_gt_set_position(int axis, double value);
870 
876 DLL_EXPORT int ahp_gt_is_axis_moving(int axis);
877 
883 DLL_EXPORT void ahp_gt_stop_motion(int axis, int wait);
884 
890 DLL_EXPORT void ahp_gt_start_motion(int axis, double speed);
891 
898 DLL_EXPORT void ahp_gt_goto_relative(int axis, double increment, double speed);
899 
906 DLL_EXPORT void ahp_gt_goto_absolute(int axis, double target, double speed);
907 
917 DLL_EXPORT int ahp_gt_start_synscan_server(int port, int *interrupt);
918 
924 DLL_EXPORT void ahp_gt_set_aligned(int aligned);
925 
930 DLL_EXPORT int ahp_gt_is_aligned();
931 
936 DLL_EXPORT void ahp_gt_set_time(double seconds);
937 
942 DLL_EXPORT double ahp_gt_get_time();
943 
944 
949 DLL_EXPORT void ahp_gt_set_time_offset(double offset);
950 
955 DLL_EXPORT double ahp_gt_get_time_offset();
956 
963 DLL_EXPORT void ahp_gt_set_location(double latitude, double longitude, double elevation);
964 
971 DLL_EXPORT void ahp_gt_get_location(double *latitude, double *longitude, double *elevation);
972 
978 DLL_EXPORT void ahp_gt_goto_altaz(double alt, double az);
979 
987 DLL_EXPORT double ahp_gt_tracking_sine(double Alt, double Az, double Lat);
988 
996 DLL_EXPORT double ahp_gt_tracking_cosine(double Alt, double Az, double Lat);
997 
1003 DLL_EXPORT void ahp_gt_goto_radec(double ra, double dec);
1004 
1010 DLL_EXPORT void ahp_gt_sync_radec(double ra, double dec);
1011 
1018 DLL_EXPORT void ahp_gt_correct_tracking(int axis, double target_period, int *interrupt);
1019 
1024 
1029 
1034 DLL_EXPORT void ahp_gt_set_tracking_mode(int mode);
1035 
1040 DLL_EXPORT int ahp_gt_get_tracking_mode();
1041 
1046 DLL_EXPORT void ahp_gt_start_tracking(int axis);
1047 
1055 DLL_EXPORT void ahp_gt_get_ra_dec_coordinates(double Alt, double Az, double *Ra, double *Dec);
1056 
1064 DLL_EXPORT void ahp_gt_get_alt_az_coordinates(double Ra, double Dec, double* Alt, double *Az);
1065 
1070 DLL_EXPORT double ahp_gt_get_ha();
1071 
1076 DLL_EXPORT double ahp_gt_get_ra();
1077 
1082 DLL_EXPORT double ahp_gt_get_dec();
1083 
1088 #ifdef __cplusplus
1089 } // extern "C"
1090 #endif
1091 
1092 #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_detect_device()
Detect the currently selected device.
DLL_EXPORT int ahp_gt_get_current_device()
Obtain the current device address.
DLL_EXPORT int ahp_gt_get_address()
Get the current device address.
DLL_EXPORT void ahp_gt_set_address(int address)
Change 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 void ahp_gt_stop_tracking_thread()
Stop the tracking thread.
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_get_time_offset()
Get current time offset.
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_start_tracking_thread()
Start the tracking thread.
DLL_EXPORT double ahp_gt_get_ra()
Get the current right ascension.
DLL_EXPORT void ahp_gt_set_location(double latitude, double longitude, double elevation)
Set geographic coordinates.
DLL_EXPORT int ahp_gt_get_tracking_mode()
Get the tracking mode.
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 int ahp_gt_is_aligned()
Get the alignment state of the current device.
DLL_EXPORT double ahp_gt_get_time()
Get current time.
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 double ahp_gt_get_ha()
Get the current hour angle.
DLL_EXPORT void ahp_gt_set_tracking_mode(int mode)
Set the tracking mode.
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_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 double ahp_gt_get_dec()
Get the current declination.
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 unsigned int ahp_gt_is_detected(int index)
Report detection status.
DLL_EXPORT int ahp_gt_get_fd()
Return the file descriptor of the port connected to the GT controllers.
DLL_EXPORT void ahp_gt_disconnect()
Disconnect from the GT controller.
DLL_EXPORT void ahp_gt_set_fd(int fd)
Set the file descriptor that links to the controller.
DLL_EXPORT int ahp_gt_connect(const char *port)
Connect to the GT 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:405
DLL_EXPORT int ahp_gt_get_mc_version(int axis)
Get the GT firmware version.
DLL_EXPORT unsigned int ahp_gt_is_connected()
Report connection status.
DLL_EXPORT int ahp_gt_connect_fd(int fd)
Connect to the GT controller using an existing file descriptor.
DLL_EXPORT void ahp_set_app_name(char *name)
set the application name
DLL_EXPORT int ahp_get_debug_level()
get the debug level
DLL_EXPORT char * ahp_get_app_name()
get the application name
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:394
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 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 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.
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 int ahp_gt_get_axis_number()
Get the current GT controller axis number.
DLL_EXPORT void ahp_gt_set_guide_steps(int axis, double value)
Set the guiding speed.
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 void ahp_gt_set_timing(int axis, int value)
Set the timing value of the axis.
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 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 void ahp_gt_set_pwm_frequency(int value)
Set the microstepping pwm frequency.
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.
DLL_EXPORT void ahp_gt_set_mount_type(MountType value)
Set the mount type.
DLL_EXPORT int ahp_gt_get_pwm_frequency(void)
Get the microstepping pwm frequency.
DLL_EXPORT GTFlags ahp_gt_get_mount_flags()
Get the mount flags.
SkywatcherDirection
Direction.
Definition: ahp_gt.h:365
MountType
Default Mount types.
Definition: ahp_gt.h:203
GTFlags
GT custom flags.
Definition: ahp_gt.h:155
GTSteppingMode
Stepping mode.
Definition: ahp_gt.h:133
SkywatcherMotionMode
Motion Mode.
Definition: ahp_gt.h:337
SkywatcherFeature
Skywatcher default features - EQ8/AZEQ6/AZEQ5 only.
Definition: ahp_gt.h:167
SkywatcherSpeedMode
Speed Mode.
Definition: ahp_gt.h:357
SkywatcherSlewMode
Slew Mode.
Definition: ahp_gt.h:349
SynscanCommand
Commands for the SynScan protocol implementation.
Definition: ahp_gt.h:268
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:369
@ DIRECTION_FORWARD
Move forward.
Definition: ahp_gt.h:367
@ isMF
Fork Mount.
Definition: ahp_gt.h:221
@ isHEQ5
Sky-Watcher HEQ5.
Definition: ahp_gt.h:207
@ isAZEQ5
Sky-Watcher AZEQ5.
Definition: ahp_gt.h:217
@ isAZEQ6
Sky-Watcher AZEQ6.
Definition: ahp_gt.h:215
@ isEQ5
Sky-Watcher EQ5.
Definition: ahp_gt.h:209
@ isCustom
Custom mount.
Definition: ahp_gt.h:227
@ isEQ8
Sky-Watcher EQ8.
Definition: ahp_gt.h:213
@ is114GT
114GT
Definition: ahp_gt.h:223
@ isDOB
Dobsonian mount.
Definition: ahp_gt.h:225
@ isGT
Sky-Watcher GT.
Definition: ahp_gt.h:219
@ isEQ3
Sky-Watcher EQ3.
Definition: ahp_gt.h:211
@ isEQ6
Sky-Watcher EQ6.
Definition: ahp_gt.h:205
@ halfCurrentRA
Half-current high-speed on RA.
Definition: ahp_gt.h:159
@ 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
@ 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:339
@ MODE_SLEW_HISPEED
High-speed (half-stepping mostly) Slew.
Definition: ahp_gt.h:345
@ MODE_SLEW_LOSPEED
Low-speed (microstepping possibly) Slew.
Definition: ahp_gt.h:341
@ MODE_GOTO_LOSPEED
Low-speed (microstepping possibly) Goto.
Definition: ahp_gt.h:343
@ hasHalfCurrentTracking
Mount allows half-current tracking.
Definition: ahp_gt.h:185
@ hasCommonSlewStart
Mount has a common slew start.
Definition: ahp_gt.h:183
@ hasEncoder
Mount has an encoder.
Definition: ahp_gt.h:173
@ inPPEC
PPEC correction in progress.
Definition: ahp_gt.h:171
@ hasWifi
Mount provides a WiFi communication.
Definition: ahp_gt.h:187
@ hasPPEC
Mount has PPEC.
Definition: ahp_gt.h:175
@ inPPECTraining
PPEC training in progress.
Definition: ahp_gt.h:169
@ hasHomeIndexer
Mount has an home indexer.
Definition: ahp_gt.h:177
@ isAZEQ
Mount is an AZEQ.
Definition: ahp_gt.h:179
@ hasPolarLed
Mount has a polar scope led.
Definition: ahp_gt.h:181
@ SPEED_LOW
Low-speed (microstepping possibly)
Definition: ahp_gt.h:359
@ SPEED_HIGH
High-speed (half-stepping mostly)
Definition: ahp_gt.h:361
@ MODE_SLEW
Slew, no target, will stop upon request only.
Definition: ahp_gt.h:351
@ MODE_GOTO
Goto, targeted, will stop upon request or on target reached.
Definition: ahp_gt.h:353
@ SetLocation
Set Location.
Definition: ahp_gt.h:315
@ 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:323
@ SyncPreciseRaDec
Sync precise RA/DEC.
Definition: ahp_gt.h:288
@ GotoPreciseAzAlt
GOTO precise AZM-ALT.
Definition: ahp_gt.h:284
@ CancelGOTO
Cancel GOTO.
Definition: ahp_gt.h:331
@ SetTrackingMode
Set Tracking Mode.
Definition: ahp_gt.h:292
@ GetLocation
Get Location.
Definition: ahp_gt.h:313
@ GetSynScanVersion
Get Version.
Definition: ahp_gt.h:321
@ GetRaDec
Get RA/DEC.
Definition: ahp_gt.h:270
@ SetTime
Set Time.
Definition: ahp_gt.h:319
@ Slew
Definition: ahp_gt.h:311
@ SyncRaDec
Sync RA/DEC.
Definition: ahp_gt.h:286
@ GetMountPointingState
Get Mount Pointing State.
Definition: ahp_gt.h:333
@ GotoPreciseRaDec
GOTO precise RA/DEC.
Definition: ahp_gt.h:280
@ GetTime
Get Time.
Definition: ahp_gt.h:317
@ GetPreciseRaDec
Get precise RA/DEC.
Definition: ahp_gt.h:272
@ GetPreciseAzAlt
Get precise AZM-ALT.
Definition: ahp_gt.h:276
@ Echo
Echo - useful to check communication.
Definition: ahp_gt.h:325
@ GetAzAlt
Get AZM-ALT.
Definition: ahp_gt.h:274
@ GetTrackingMode
Get Tracking Mode.
Definition: ahp_gt.h:290
@ GotoAzAlt
GOTO AZM-ALT.
Definition: ahp_gt.h:282
@ AlignmentComplete
Is Alignment Complete? - align=1 if aligned and 0 if not.
Definition: ahp_gt.h:327
@ GOTOinProgress
Is GOTO in Progress? - Response is ASCII'0' or '1'& '#'.
Definition: ahp_gt.h:329
@ GotoRaDec
GOTO RA/DEC.
Definition: ahp_gt.h:278
@ 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:373
SkywatcherSlewMode Mode
Current slew mode.
Definition: ahp_gt.h:379
SkywatcherSpeedMode Speed
Current speed mode.
Definition: ahp_gt.h:381
SkywatcherDirection Direction
Current direction.
Definition: ahp_gt.h:383
int Initialized
Motor was initialized.
Definition: ahp_gt.h:375
int Running
Motor is running.
Definition: ahp_gt.h:377