AHP® GT Controllers API
AHP GT Controllers
Functions

Functions

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. More...
 
DLL_EXPORT void ahp_gt_set_aligned (int aligned)
 Set the alignment state of the current device. More...
 
DLL_EXPORT int ahp_gt_is_aligned ()
 Get the alignment state of the current device. More...
 
DLL_EXPORT void ahp_gt_set_time (double seconds)
 Set current time. More...
 
DLL_EXPORT double ahp_gt_get_time ()
 Get current time. More...
 
DLL_EXPORT void ahp_gt_set_time_offset (double offset)
 Set current time offset. More...
 
DLL_EXPORT double ahp_gt_get_time_offset ()
 Get current time offset. More...
 
DLL_EXPORT void ahp_gt_set_location (double latitude, double longitude, double elevation)
 Set geographic coordinates. More...
 
DLL_EXPORT void ahp_gt_get_location (double *latitude, double *longitude, double *elevation)
 Get geographic coordinates. More...
 
DLL_EXPORT void ahp_gt_goto_altaz (double alt, double az)
 Move both axes to horizontal coordinates. More...
 
DLL_EXPORT double ahp_gt_tracking_sine (double Alt, double Az, double Lat)
 Get the altitude tracking multiplier for AZ mounts. More...
 
DLL_EXPORT double ahp_gt_tracking_cosine (double Alt, double Az, double Lat)
 Get the azimuth tracking multiplier for AZ mounts. More...
 
DLL_EXPORT void ahp_gt_goto_radec (double ra, double dec)
 Move both axes to celestial coordinates. More...
 
DLL_EXPORT void ahp_gt_sync_radec (double ra, double dec)
 Set both axes positions to celestial coordinates. More...
 
DLL_EXPORT void ahp_gt_correct_tracking (int axis, double target_period, int *interrupt)
 Start a tracking motion correction. More...
 
DLL_EXPORT void ahp_gt_start_tracking_thread ()
 Start the tracking thread.
 
DLL_EXPORT void ahp_gt_stop_tracking_thread ()
 Stop the tracking thread.
 
DLL_EXPORT void ahp_gt_set_tracking_mode (int mode)
 Set the tracking mode. More...
 
DLL_EXPORT int ahp_gt_get_tracking_mode ()
 Get the tracking mode. More...
 
DLL_EXPORT void ahp_gt_start_tracking (int axis)
 Start a test tracking motion. More...
 
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. More...
 
DLL_EXPORT void ahp_gt_get_alt_az_coordinates (double Ra, double Dec, double *Alt, double *Az)
 Get current altitude and azimuth. More...
 
DLL_EXPORT double ahp_gt_get_ha ()
 Get the current hour angle. More...
 
DLL_EXPORT double ahp_gt_get_ra ()
 Get the current right ascension. More...
 
DLL_EXPORT double ahp_gt_get_dec ()
 Get the current declination. More...
 

Detailed Description

Function Documentation

◆ ahp_gt_correct_tracking()

DLL_EXPORT void ahp_gt_correct_tracking ( int  axis,
double  target_period,
int *  interrupt 
)
Parameters
axisThe motor to tune at sidereal speed
target_periodThe target sidereal period
interruptif non-zero stop training before ending this session

◆ ahp_gt_get_alt_az_coordinates()

DLL_EXPORT void ahp_gt_get_alt_az_coordinates ( double  Ra,
double  Dec,
double *  Alt,
double *  Az 
)
Parameters
RaRight ascension
DecDeclination
AltAltitude filled by reference
AzAzimuth filled by reference

◆ ahp_gt_get_dec()

DLL_EXPORT double ahp_gt_get_dec ( )
Returns
The current declination

◆ ahp_gt_get_ha()

DLL_EXPORT double ahp_gt_get_ha ( )
Returns
The current hour angle

◆ ahp_gt_get_location()

DLL_EXPORT void ahp_gt_get_location ( double *  latitude,
double *  longitude,
double *  elevation 
)
Parameters
latitudeThe latitude coordinate in degrees
longitudeThe longitude coordinate in degrees
elevationThe elevation on sea level

◆ ahp_gt_get_ra()

DLL_EXPORT double ahp_gt_get_ra ( )
Returns
The current right ascension

◆ ahp_gt_get_ra_dec_coordinates()

DLL_EXPORT void ahp_gt_get_ra_dec_coordinates ( double  Alt,
double  Az,
double *  Ra,
double *  Dec 
)
Parameters
AltAltitude
AzAzimuth
RaRight ascension filled by reference
DecDeclination filled by reference

◆ ahp_gt_get_time()

DLL_EXPORT double ahp_gt_get_time ( )
Returns
Current time

◆ ahp_gt_get_time_offset()

DLL_EXPORT double ahp_gt_get_time_offset ( )
Returns
Current time offset

◆ ahp_gt_get_tracking_mode()

DLL_EXPORT int ahp_gt_get_tracking_mode ( )
Returns
The tracking mode - 0: no tracking 1: EQ mode 2: AZ mode

◆ ahp_gt_goto_altaz()

DLL_EXPORT void ahp_gt_goto_altaz ( double  alt,
double  az 
)
Parameters
altAltitude in degrees
azAzimuth in degrees

◆ ahp_gt_goto_radec()

DLL_EXPORT void ahp_gt_goto_radec ( double  ra,
double  dec 
)
Parameters
raRight ascension in hours
decDeclination in degrees

◆ ahp_gt_is_aligned()

DLL_EXPORT int ahp_gt_is_aligned ( )
Returns
1 if aligned, 0 if not yet aligned

◆ ahp_gt_set_aligned()

DLL_EXPORT void ahp_gt_set_aligned ( int  aligned)
Parameters
aligned1 if aligned, 0 if not yet aligned
Returns
non-zero on failure

◆ ahp_gt_set_location()

DLL_EXPORT void ahp_gt_set_location ( double  latitude,
double  longitude,
double  elevation 
)
Parameters
latitudeThe latitude coordinate in degrees
longitudeThe longitude coordinate in degrees
elevationThe elevation on sea level

◆ ahp_gt_set_time()

DLL_EXPORT void ahp_gt_set_time ( double  seconds)
Parameters
secondsCurrent time

◆ ahp_gt_set_time_offset()

DLL_EXPORT void ahp_gt_set_time_offset ( double  offset)
Parameters
offsetCurrent time offset

◆ ahp_gt_set_tracking_mode()

DLL_EXPORT void ahp_gt_set_tracking_mode ( int  mode)
Parameters
modeThe tracking mode - 0: no tracking 1: EQ mode 2: AZ mode

◆ ahp_gt_start_synscan_server()

DLL_EXPORT int ahp_gt_start_synscan_server ( int  port,
int *  interrupt 
)
Parameters
portThe TCP port of the server
interruptStop when interrupt is non-zero - passed by reference
Returns
non-zero on failure

◆ ahp_gt_start_tracking()

DLL_EXPORT void ahp_gt_start_tracking ( int  axis)
Parameters
axisThe motor to drive at sidereal speed

◆ ahp_gt_sync_radec()

DLL_EXPORT void ahp_gt_sync_radec ( double  ra,
double  dec 
)
Parameters
raRight ascension in hours
decDeclination in degrees

◆ ahp_gt_tracking_cosine()

DLL_EXPORT double ahp_gt_tracking_cosine ( double  Alt,
double  Az,
double  Lat 
)
Parameters
AltAltitude
AzAzimuth
LatLatitude of the current location
Returns
Altitude tracking offset multiplier

◆ ahp_gt_tracking_sine()

DLL_EXPORT double ahp_gt_tracking_sine ( double  Alt,
double  Az,
double  Lat 
)
Parameters
AltAltitude
AzAzimuth
LatLatitude of the current location
Returns
Altitude tracking offset multiplier