Go to the documentation of this file.
85 #define NETROTCTL_RET "RPRT "
93 #define ROT_RESET_ALL 1
111 ROT_FLAG_AZIMUTH = (1 << 1),
112 ROT_FLAG_ELEVATION = (1 << 2)
115 #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
117 #define ROT_TYPE_OTHER 0
118 #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
119 #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
120 #define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
134 #define ROT_MOVE_UP (1<<1)
146 #define ROT_MOVE_DOWN (1<<2)
158 #define ROT_MOVE_LEFT (1<<3)
171 #define ROT_MOVE_CCW ROT_MOVE_LEFT
183 #define ROT_MOVE_RIGHT (1<<4)
196 #define ROT_MOVE_CW ROT_MOVE_RIGHT
222 #define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg
226 const char *model_name;
227 const char *mfg_name;
229 const char *copyright;
237 int serial_data_bits;
238 int serial_stop_bits;
243 int post_write_delay;
261 const rig_ptr_t priv;
284 int (*stop)(
ROT *rot);
285 int (*park)(
ROT *rot);
287 int (*move)(
ROT *rot,
int direction,
int speed);
290 const char * (*get_info)(
ROT *rot);
292 const char *macro_name;
355 extern HAMLIB_EXPORT(
ROT *)
358 extern HAMLIB_EXPORT(
int)
361 extern HAMLIB_EXPORT(
int)
364 extern HAMLIB_EXPORT(
int)
367 extern HAMLIB_EXPORT(
int)
371 extern HAMLIB_EXPORT(
int)
380 extern HAMLIB_EXPORT(
int)
384 extern HAMLIB_EXPORT(
int)
389 extern HAMLIB_EXPORT(
int)
392 extern HAMLIB_EXPORT(
int)
395 extern HAMLIB_EXPORT(
int)
399 extern HAMLIB_EXPORT(
int)
404 extern HAMLIB_EXPORT(
const char *)
407 extern HAMLIB_EXPORT(
int)
408 rot_register HAMLIB_PARAMS((
const struct rot_caps *caps));
410 extern HAMLIB_EXPORT(
int)
411 rot_unregister HAMLIB_PARAMS((
rot_model_t rot_model));
413 extern HAMLIB_EXPORT(
int)
414 rot_list_foreach HAMLIB_PARAMS((
int (*cfunc)(
const struct rot_caps *,
418 extern HAMLIB_EXPORT(
int)
419 rot_load_backend HAMLIB_PARAMS((
const char *be_name));
421 extern HAMLIB_EXPORT(
int)
422 rot_check_backend HAMLIB_PARAMS((
rot_model_t rot_model));
424 extern HAMLIB_EXPORT(
int)
425 rot_load_all_backends HAMLIB_PARAMS((
void));
428 rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
430 extern HAMLIB_EXPORT(
int)
436 extern HAMLIB_EXPORT(
const struct confparams *)
444 extern HAMLIB_EXPORT(
const struct rot_caps *)
445 rot_get_caps HAMLIB_PARAMS((
rot_model_t rot_model));
447 extern HAMLIB_EXPORT(
int)
448 qrb HAMLIB_PARAMS((
double lon1,
455 extern HAMLIB_EXPORT(
double)
458 extern HAMLIB_EXPORT(
double)
461 extern HAMLIB_EXPORT(
int)
467 extern HAMLIB_EXPORT(
int)
470 const char *locator));
472 extern HAMLIB_EXPORT(
double)
473 dms2dec HAMLIB_PARAMS((
int degrees,
478 extern HAMLIB_EXPORT(
int)
479 dec2dms HAMLIB_PARAMS((
double dec,
485 extern HAMLIB_EXPORT(
int)
491 extern HAMLIB_EXPORT(
double)
492 dmmm2dec HAMLIB_PARAMS((
int degrees,
508 #define rot_debug rig_debug
rig_port_e
Port type.
Definition: rig.h:209
const char * rot_get_info(ROT *rot)
get general information from the rotator
Definition: rotator.c:816
int rot_stop(ROT *rot)
stop the rotator
Definition: rotator.c:718
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
rig_status_e
Development status of the backend.
Definition: rig.h:296
azimuth_t max_az
Definition: rotator.h:314
int rot_reset(ROT *rot, rot_reset_t reset)
reset the rotator
Definition: rotator.c:752
Configuration parameter structure.
Definition: rig.h:681
int rot_park(ROT *rot)
park the antenna
Definition: rotator.c:685
int rot_get_conf(ROT *rot, token_t token, char *val)
get the value of a configuration parameter
Definition: rot_conf.c:684
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
ROT * rot_init(rot_model_t rot_model)
allocate a new ROT handle
Definition: rotator.c:197
int rot_cleanup(ROT *rot)
release a rot handle and free associated memory
Definition: rotator.c:529
serial_handshake_e
Serial handshake.
Definition: rig.h:242
int rot_reset_t
Type definition for rotator reset.
Definition: rotator.h:103
int rot_token_foreach(ROT *rot, int(*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)
Executes cfunc on all the elements stored in the conf table.
Definition: rot_conf.c:490
int rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
get the azimuth and elevation of the rotator
Definition: rotator.c:634
Hamlib rig data structures.
int south_zero
Definition: rotator.h:317
azimuth_t min_az
Definition: rotator.h:313
struct rot_state state
Definition: rotator.h:348
rig_ptr_t obj
Definition: rotator.h:328
int dec2dmmm(double dec, int *degrees, double *minutes, int *sw)
Convert a decimal angle into D M.MMM notation.
Definition: locator.c:345
elevation_t max_el
Definition: rotator.h:316
int rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation)
set the azimuth and elevation of the rotator
Definition: rotator.c:574
elevation_t el_offset
Definition: rotator.h:319
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to Maidenhead grid locator.
Definition: locator.c:485
azimuth_t az_offset
Definition: rotator.h:318
int rot_move(ROT *rot, int direction, int speed)
move the rotator in the specified direction
Definition: rotator.c:783
elevation_t min_el
Definition: rotator.h:315
struct rot_caps * caps
Definition: rotator.h:347
int rot_open(ROT *rot)
open the communication to the rot
Definition: rotator.c:318
rig_ptr_t priv
Definition: rotator.h:327
serial_parity_e
Serial parity.
Definition: rig.h:230
token_t token
Definition: rig.h:682
int comm_state
Definition: rotator.h:326
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
token_t rot_token_lookup(ROT *rot, const char *name)
Simple lookup returning token id associated with name.
Definition: rot_conf.c:601
int rot_model_t
Convenience type definition for rotator model.
Definition: rotlist.h:464
float elevation_t
Type definition for elevation.
Definition: rotator.h:67
Hamlib rotator model definitions.
long token_t
configuration token
Definition: rig.h:642
Live data and customized fields.
Definition: rotator.h:309
int dec2dms(double dec, int *degrees, int *minutes, double *seconds, int *sw)
Convert decimal degrees angle into DMS notation.
Definition: locator.c:252
double dms2dec(int degrees, int minutes, double seconds, int sw)
Convert DMS to decimal degrees.
Definition: locator.c:141
double distance_long_path(double distance)
Calculate the long path distance between two points.
Definition: locator.c:676
int rot_close(ROT *rot)
close the communication to the rot
Definition: rotator.c:450
int locator2longlat(double *longitude, double *latitude, const char *locator)
Convert Maidenhead grid locator to Longitude/Latitude.
Definition: locator.c:397
double dmmm2dec(int degrees, double minutes, double seconds, int sw)
Convert D M.MMM notation to decimal degrees.
Definition: locator.c:196
This is the master data structure, acting as a handle for the controlled rotator.
Definition: rotator.h:346
int rot_set_conf(ROT *rot, token_t token, const char *val)
set a rotator configuration parameter
Definition: rot_conf.c:632
hamlib_port_t rotport
Definition: rotator.h:324
Hamlib documentation for version 4.0~git -- Tue Jul 28 2020 00:00:00
Project page: http://www.hamlib.org