75 #define NETROTCTL_RET "RPRT "
81 #define ROT_RESET_ALL 1
98 #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
100 #define ROT_TYPE_OTHER 0
101 #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
102 #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
103 #define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
156 #define ROT_MOVE_UP (1<<1)
157 #define ROT_MOVE_DOWN (1<<2)
158 #define ROT_MOVE_LEFT (1<<3)
159 #define ROT_MOVE_CCW ROT_MOVE_LEFT
160 #define ROT_MOVE_RIGHT (1<<4)
161 #define ROT_MOVE_CW ROT_MOVE_RIGHT
242 int (*stop)(
ROT *rot);
243 int (*park)(
ROT *rot);
245 int (*move)(
ROT *rot,
int direction,
int speed);
248 const char* (*get_info)(
ROT *rot);
307 extern HAMLIB_EXPORT(
int)
rot_close HAMLIB_PARAMS((
ROT *rot));
318 extern HAMLIB_EXPORT(
int)
rot_stop HAMLIB_PARAMS((
ROT *rot));
319 extern HAMLIB_EXPORT(
int)
rot_park HAMLIB_PARAMS((
ROT *rot));
321 extern HAMLIB_EXPORT(
int)
rot_move HAMLIB_PARAMS((
ROT *rot,
int direction,
int speed));
322 extern HAMLIB_EXPORT(const
char*)
rot_get_info HAMLIB_PARAMS((
ROT *rot));
324 extern HAMLIB_EXPORT(
int) rot_register HAMLIB_PARAMS((const struct
rot_caps *caps));
325 extern HAMLIB_EXPORT(
int) rot_unregister HAMLIB_PARAMS((
rot_model_t rot_model));
326 extern HAMLIB_EXPORT(
int) rot_list_foreach HAMLIB_PARAMS((
int (*cfunc)(const struct
rot_caps*, rig_ptr_t), rig_ptr_t data));
327 extern HAMLIB_EXPORT(
int) rot_load_backend HAMLIB_PARAMS((const
char *be_name));
328 extern HAMLIB_EXPORT(
int) rot_check_backend HAMLIB_PARAMS((
rot_model_t rot_model));
329 extern HAMLIB_EXPORT(
int) rot_load_all_backends HAMLIB_PARAMS((
void));
333 extern HAMLIB_EXPORT(const struct confparams*)
rot_confparam_lookup HAMLIB_PARAMS((
ROT *rot, const
char *name));
336 extern HAMLIB_EXPORT(const struct rot_caps *) rot_get_caps HAMLIB_PARAMS((
rot_model_t rot_model));
338 extern HAMLIB_EXPORT(
int)
qrb HAMLIB_PARAMS((
double lon1,
double lat1,
339 double lon2,
double lat2,
340 double *distance,
double *azimuth));
344 extern HAMLIB_EXPORT(
int)
longlat2locator HAMLIB_PARAMS((
double longitude,
345 double latitude,
char *locator_res,
int pair_count));
346 extern HAMLIB_EXPORT(
int)
locator2longlat HAMLIB_PARAMS((
double *longitude,
347 double *latitude, const
char *locator));
349 extern HAMLIB_EXPORT(
double)
dms2dec HAMLIB_PARAMS((
int degrees,
int minutes,
350 double seconds,
int sw));
351 extern HAMLIB_EXPORT(
int)
dec2dms HAMLIB_PARAMS((
double dec,
int *degrees,
352 int *minutes,
double *seconds,
int *sw));
354 extern HAMLIB_EXPORT(
int)
dec2dmmm HAMLIB_PARAMS((
double dec,
int *degrees,
355 double *minutes,
int *sw));
356 extern HAMLIB_EXPORT(
double)
dmmm2dec HAMLIB_PARAMS((
int degrees,
357 double minutes,
int sw));
367 #define rot_debug rig_debug
azimuth_t max_az
Definition: rotator.h:213
const struct confparams * rot_confparam_lookup(ROT *rot, const char *name)
lookup conf token by its name, return pointer to confparams struct.
Definition: rot_conf.c:355
struct rot_state state
Definition: rotator.h:300
int timeout
Definition: rotator.h:205
long token_t
configuration token
Definition: rig.h:501
int rot_reset_t
Type definition for rotator reset.
Definition: rotator.h:89
int retry
Definition: rotator.h:206
const struct confparams * cfgparams
Definition: rotator.h:218
const char * version
Definition: rotator.h:189
int rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation)
set the azimuth and elevation of the rotator
Definition: rotator.c:488
int dec2dmmm(double dec, int *degrees, double *minutes, int *sw)
Convert a decimal angle into D M.MMM notation.
Definition: locator.c:301
azimuth_t max_az
Definition: rotator.h:270
elevation_t max_el
Definition: rotator.h:215
int rot_set_conf(ROT *rot, token_t token, const char *val)
set a rotator configuration parameter
Definition: rot_conf.c:411
serial_handshake_e
Serial handshake.
Definition: rig.h:192
Rotator data structure.
Definition: rotator.h:185
const char * mfg_name
Definition: rotator.h:188
azimuth_t min_az
Definition: rotator.h:269
int rot_move(ROT *rot, int direction, int speed)
move the rotator in the specified direction
Definition: rotator.c:630
rot_model_t rot_model
Definition: rotator.h:186
int serial_rate_min
Definition: rotator.h:196
Hamlib rotator model definitions.
rig_status_e
Development status of the backend.
Definition: rig.h:242
int rot_model_t
Convenience type definition for rotator model.
Definition: rotlist.h:297
int rot_token_foreach(ROT *rot, int(*cfunc)(const struct confparams *, char *), char *data)
Executes cfunc on all the elements stored in the conf table.
Definition: rot_conf.c:321
const char * model_name
Definition: rotator.h:187
token_t rot_token_lookup(ROT *rot, const char *name)
Simple lookup returning token id associated with name.
Definition: rot_conf.c:386
float elevation_t
Type definition for elevation.
Definition: rotator.h:71
int post_write_delay
Definition: rotator.h:204
int rot_close(ROT *rot)
close the communication to the rot
Definition: rotator.c:383
int rot_get_conf(ROT *rot, token_t token, char *val)
get the value of a configuration parameter
Definition: rot_conf.c:449
elevation_t max_el
Definition: rotator.h:272
int comm_state
Definition: rotator.h:279
token_t token
Definition: rig.h:533
double distance_long_path(double distance)
Calculate the long path distance between two points.
Definition: locator.c:571
elevation_t min_el
Definition: rotator.h:271
int write_delay
Definition: rotator.h:203
rot_type_t
Rotator type flags.
Definition: rotator.h:93
int rot_park(ROT *rot)
park the antenna
Definition: rotator.c:551
serial_parity_e
Serial parity.
Definition: rig.h:181
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to Maidenhead grid locator.
Definition: locator.c:420
double dms2dec(int degrees, int minutes, double seconds, int sw)
Convert DMS to decimal degrees.
Definition: locator.c:141
int serial_stop_bits
Definition: rotator.h:199
elevation_t min_el
Definition: rotator.h:214
Hamlib rig data structures.
const char * rot_get_info(ROT *rot)
get general information from the rotator
Definition: rotator.c:656
const char * priv
Definition: rotator.h:219
int serial_rate_max
Definition: rotator.h:197
int serial_data_bits
Definition: rotator.h:198
double azimuth_long_path(double azimuth)
Calculate the long path bearing between two points.
Definition: locator.c:588
float azimuth_t
Type definition for azimuth.
Definition: rotator.h:72
enum rig_port_e port_type
Definition: rotator.h:194
int rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
get the azimuth and elevation of the rotator
Definition: rotator.c:524
Live data and customized fields.
Definition: rotator.h:265
int rot_stop(ROT *rot)
stop the rotator
Definition: rotator.c:578
int rot_type
Definition: rotator.h:193
double dmmm2dec(int degrees, double minutes, int sw)
Convert D M.MMM notation to decimal degrees.
Definition: locator.c:181
int locator2longlat(double *longitude, double *latitude, const char *locator)
Convert Maidenhead grid locator to Longitude/Latitude.
Definition: locator.c:346
int rot_reset(ROT *rot, rot_reset_t reset)
reset the rotator
Definition: rotator.c:606
This is the master data structure, acting as a handle for the controlled rotator. ...
Definition: rotator.h:298
Port definition.
Definition: rig.h:1338
azimuth_t min_az
Definition: rotator.h:212
int rot_cleanup(ROT *rot)
release a rot handle and free associated memory
Definition: rotator.c:449
const char * copyright
Definition: rotator.h:190
ROT * rot_init(rot_model_t rot_model)
allocate a new ROT handle
Definition: rotator.c:177
Configuration parameter structure.
Definition: rig.h:532
enum serial_parity_e serial_parity
Definition: rotator.h:200
char * obj
Definition: rotator.h:281
int dec2dms(double dec, int *degrees, int *minutes, double *seconds, int *sw)
Convert decimal degrees angle into DMS notation.
Definition: locator.c:225
int qrb(double lon1, double lat1, double lon2, double lat2, double *distance, double *azimuth)
Calculate the distance and bearing between two points.
Definition: locator.c:479
rig_port_e
Port type.
Definition: rig.h:163
struct rot_caps * caps
Definition: rotator.h:299
hamlib_port_t rotport
Definition: rotator.h:277
enum serial_handshake_e serial_handshake
Definition: rotator.h:201
enum rig_status_e status
Definition: rotator.h:191
char * priv
Definition: rotator.h:280
int rot_open(ROT *rot)
open the communication to the rot
Definition: rotator.c:289