85 #define NETROTCTL_RET "RPRT " 93 #define ROT_RESET_ALL 1 114 #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) 116 #define ROT_TYPE_OTHER 0 117 #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH 118 #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION 119 #define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) 132 #define ROT_MOVE_UP (1<<1) 144 #define ROT_MOVE_DOWN (1<<2) 156 #define ROT_MOVE_LEFT (1<<3) 169 #define ROT_MOVE_CCW ROT_MOVE_LEFT 181 #define ROT_MOVE_RIGHT (1<<4) 194 #define ROT_MOVE_CW ROT_MOVE_RIGHT 219 #define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg 283 int (*move)(
ROT *
rot,
int direction,
int speed);
286 const char * (*get_info)(
ROT *
rot);
349 extern HAMLIB_EXPORT(
ROT *)
352 extern HAMLIB_EXPORT(
int)
355 extern HAMLIB_EXPORT(
int)
358 extern HAMLIB_EXPORT(
int)
361 extern HAMLIB_EXPORT(
int)
365 extern HAMLIB_EXPORT(
int)
374 extern HAMLIB_EXPORT(
int)
378 extern HAMLIB_EXPORT(
int)
383 extern HAMLIB_EXPORT(
int)
386 extern HAMLIB_EXPORT(
int)
389 extern HAMLIB_EXPORT(
int)
393 extern HAMLIB_EXPORT(
int)
398 extern HAMLIB_EXPORT(
const char *)
401 extern HAMLIB_EXPORT(
int)
402 rot_register HAMLIB_PARAMS((
const struct rot_caps *caps));
404 extern HAMLIB_EXPORT(
int)
405 rot_unregister HAMLIB_PARAMS((
rot_model_t rot_model));
407 extern HAMLIB_EXPORT(
int)
408 rot_list_foreach HAMLIB_PARAMS((
int (*cfunc)(
const struct rot_caps *,
412 extern HAMLIB_EXPORT(
int)
413 rot_load_backend HAMLIB_PARAMS((
const char *be_name));
415 extern HAMLIB_EXPORT(
int)
416 rot_check_backend HAMLIB_PARAMS((
rot_model_t rot_model));
418 extern HAMLIB_EXPORT(
int)
419 rot_load_all_backends HAMLIB_PARAMS((
void));
424 extern HAMLIB_EXPORT(
int)
430 extern HAMLIB_EXPORT(
const struct confparams *)
438 extern HAMLIB_EXPORT(
const struct rot_caps *)
439 rot_get_caps HAMLIB_PARAMS((
rot_model_t rot_model));
441 extern HAMLIB_EXPORT(
int)
442 qrb HAMLIB_PARAMS((
double lon1,
449 extern HAMLIB_EXPORT(
double)
452 extern HAMLIB_EXPORT(
double)
455 extern HAMLIB_EXPORT(
int)
461 extern HAMLIB_EXPORT(
int)
464 const char *locator));
466 extern HAMLIB_EXPORT(
double)
467 dms2dec HAMLIB_PARAMS((
int degrees,
472 extern HAMLIB_EXPORT(
int)
473 dec2dms HAMLIB_PARAMS((
double dec,
479 extern HAMLIB_EXPORT(
int)
485 extern HAMLIB_EXPORT(
double)
486 dmmm2dec HAMLIB_PARAMS((
int degrees,
500 #define rot_debug rig_debug azimuth_t max_az
Definition: rotator.h:249
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:544
int timeout
Definition: rotator.h:240
long token_t
configuration token
Definition: rig.h:590
int rot_reset_t
Type definition for rotator reset.
Definition: rotator.h:103
int retry
Definition: rotator.h:241
const struct confparams * cfgparams
Definition: rotator.h:256
const char * version
Definition: rotator.h:224
int rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation)
set the azimuth and elevation of the rotator
Definition: rotator.c:564
Definition: rotator.h:341
int dec2dmmm(double dec, int *degrees, double *minutes, int *sw)
Convert a decimal angle into D M.MMM notation.
Definition: locator.c:345
azimuth_t max_az
Definition: rotator.h:309
Definition: rotator.h:111
elevation_t max_el
Definition: rotator.h:253
int rot_set_conf(ROT *rot, token_t token, const char *val)
set a rotator configuration parameter
Definition: rot_conf.c:632
serial_handshake_e
Serial handshake.
Definition: rig.h:228
Rotator data structure.
Definition: rotator.h:220
const char * mfg_name
Definition: rotator.h:223
azimuth_t min_az
Definition: rotator.h:308
int rot_move(ROT *rot, int direction, int speed)
move the rotator in the specified direction
Definition: rotator.c:773
rot_model_t rot_model
Definition: rotator.h:221
int south_zero
Definition: rotator.h:312
int serial_rate_min
Definition: rotator.h:231
Hamlib amplifier model definitions.
rig_status_e
Development status of the backend.
Definition: rig.h:280
int rot_model_t
Convenience type definition for rotator model.
Definition: rotlist.h:406
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:490
elevation_t el_offset
Definition: rotator.h:314
const char * model_name
Definition: rotator.h:222
const char * macro_name
Definition: rotator.h:288
token_t rot_token_lookup(ROT *rot, const char *name)
Simple lookup returning token id associated with name.
Definition: rot_conf.c:601
float elevation_t
Type definition for elevation.
Definition: rotator.h:67
int post_write_delay
Definition: rotator.h:239
int rot_close(ROT *rot)
close the communication to the rot
Definition: rotator.c:440
int rot_get_conf(ROT *rot, token_t token, char *val)
get the value of a configuration parameter
Definition: rot_conf.c:684
elevation_t max_el
Definition: rotator.h:311
int comm_state
Definition: rotator.h:321
token_t token
Definition: rig.h:626
double distance_long_path(double distance)
Calculate the long path distance between two points.
Definition: locator.c:676
elevation_t min_el
Definition: rotator.h:310
int write_delay
Definition: rotator.h:238
rot_type_t
Rotator type flags.
Definition: rotator.h:109
int rot_park(ROT *rot)
park the antenna
Definition: rotator.c:675
serial_parity_e
Serial parity.
Definition: rig.h:216
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to Maidenhead grid locator.
Definition: locator.c:485
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:234
elevation_t min_el
Definition: rotator.h:251
Hamlib rig data structures.
const char * rot_get_info(ROT *rot)
get general information from the rotator
Definition: rotator.c:806
const char * priv
Definition: rotator.h:257
int serial_rate_max
Definition: rotator.h:232
struct rot_caps * caps
Definition: rotator.h:342
int serial_data_bits
Definition: rotator.h:233
double azimuth_long_path(double azimuth)
Calculate the long path bearing between two points.
Definition: locator.c:696
float azimuth_t
Type definition for azimuth.
Definition: rotator.h:79
enum rig_port_e port_type
Definition: rotator.h:229
int rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
get the azimuth and elevation of the rotator
Definition: rotator.c:624
Live data and customized fields.
Definition: rotator.h:304
int rot_stop(ROT *rot)
stop the rotator
Definition: rotator.c:708
azimuth_t az_offset
Definition: rotator.h:313
int rot_type
Definition: rotator.h:228
double dmmm2dec(int degrees, double minutes, int sw)
Convert D M.MMM notation to decimal degrees.
Definition: locator.c:196
int locator2longlat(double *longitude, double *latitude, const char *locator)
Convert Maidenhead grid locator to Longitude/Latitude.
Definition: locator.c:397
int rot_reset(ROT *rot, rot_reset_t reset)
reset the rotator
Definition: rotator.c:742
This is the master data structure, acting as a handle for the controlled rotator. ...
Definition: rotator.h:110
struct rot_state state
Definition: rotator.h:343
Port definition.
Definition: rig.h:1655
azimuth_t min_az
Definition: rotator.h:248
int rot_cleanup(ROT *rot)
release a rot handle and free associated memory
Definition: rotator.c:519
const char * copyright
Definition: rotator.h:225
ROT * rot_init(rot_model_t rot_model)
allocate a new ROT handle
Definition: rotator.c:197
Configuration parameter structure.
Definition: rig.h:625
enum serial_parity_e serial_parity
Definition: rotator.h:235
char * obj
Definition: rotator.h:323
int dec2dms(double dec, int *degrees, int *minutes, double *seconds, int *sw)
Convert decimal degrees angle into DMS notation.
Definition: locator.c:252
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:557
rig_port_e
Port type.
Definition: rig.h:195
hamlib_port_t rotport
Definition: rotator.h:319
enum serial_handshake_e serial_handshake
Definition: rotator.h:236
enum rig_status_e status
Definition: rotator.h:226
char * priv
Definition: rotator.h:322
int rot_open(ROT *rot)
open the communication to the rot
Definition: rotator.c:318