Go to the documentation of this file.
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
285 int (*move)(
ROT *
rot,
int direction,
int speed);
288 const char * (*get_info)(
ROT *
rot);
350 extern HAMLIB_EXPORT(
ROT *)
353 extern HAMLIB_EXPORT(
int)
356 extern HAMLIB_EXPORT(
int)
359 extern HAMLIB_EXPORT(
int)
362 extern HAMLIB_EXPORT(
int)
366 extern HAMLIB_EXPORT(
int)
375 extern HAMLIB_EXPORT(
int)
379 extern HAMLIB_EXPORT(
int)
384 extern HAMLIB_EXPORT(
int)
387 extern HAMLIB_EXPORT(
int)
390 extern HAMLIB_EXPORT(
int)
394 extern HAMLIB_EXPORT(
int)
399 extern HAMLIB_EXPORT(
const char *)
402 extern HAMLIB_EXPORT(
int)
403 rot_register HAMLIB_PARAMS((
const struct rot_caps *caps));
405 extern HAMLIB_EXPORT(
int)
406 rot_unregister HAMLIB_PARAMS((
rot_model_t rot_model));
408 extern HAMLIB_EXPORT(
int)
409 rot_list_foreach HAMLIB_PARAMS((
int (*cfunc)(
const struct rot_caps *,
413 extern HAMLIB_EXPORT(
int)
414 rot_load_backend HAMLIB_PARAMS((
const char *be_name));
416 extern HAMLIB_EXPORT(
int)
417 rot_check_backend HAMLIB_PARAMS((
rot_model_t rot_model));
419 extern HAMLIB_EXPORT(
int)
420 rot_load_all_backends HAMLIB_PARAMS((
void));
425 extern HAMLIB_EXPORT(
int)
431 extern HAMLIB_EXPORT(
const struct confparams *)
439 extern HAMLIB_EXPORT(
const struct rot_caps *)
440 rot_get_caps HAMLIB_PARAMS((
rot_model_t rot_model));
442 extern HAMLIB_EXPORT(
int)
443 qrb HAMLIB_PARAMS((
double lon1,
450 extern HAMLIB_EXPORT(
double)
453 extern HAMLIB_EXPORT(
double)
456 extern HAMLIB_EXPORT(
int)
462 extern HAMLIB_EXPORT(
int)
465 const char *locator));
467 extern HAMLIB_EXPORT(
double)
468 dms2dec HAMLIB_PARAMS((
int degrees,
473 extern HAMLIB_EXPORT(
int)
474 dec2dms HAMLIB_PARAMS((
double dec,
480 extern HAMLIB_EXPORT(
int)
486 extern HAMLIB_EXPORT(
double)
487 dmmm2dec HAMLIB_PARAMS((
int degrees,
501 #define rot_debug rig_debug
rig_port_e
Port type.
Definition: rig.h:195
const char * model_name
Definition: rotator.h:222
Port definition.
Definition: rig.h:1656
const char * rot_get_info(ROT *rot)
get general information from the rotator
Definition: rotator.c:806
int rot_stop(ROT *rot)
stop the rotator
Definition: rotator.c:708
const char * macro_name
Definition: rotator.h:223
@ ROT_FLAG_ELEVATION
Definition: rotator.h:111
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
This is the master data structure, acting as a handle for the controlled rotator.
Definition: rotator.h:342
rig_status_e
Development status of the backend.
Definition: rig.h:280
const char * priv
Definition: rotator.h:258
azimuth_t max_az
Definition: rotator.h:310
int serial_rate_max
Definition: rotator.h:233
char * priv
Definition: rotator.h:323
int serial_data_bits
Definition: rotator.h:234
enum rig_port_e port_type
Definition: rotator.h:230
int write_delay
Definition: rotator.h:239
int rot_reset(ROT *rot, rot_reset_t reset)
reset the rotator
Definition: rotator.c:742
Configuration parameter structure.
Definition: rig.h:625
elevation_t min_el
Definition: rotator.h:252
int serial_stop_bits
Definition: rotator.h:235
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
int rot_type
Definition: rotator.h:229
int rot_park(ROT *rot)
park the antenna
Definition: rotator.c:675
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:519
serial_handshake_e
Serial handshake.
Definition: rig.h:228
int rot_reset_t
Type definition for rotator reset.
Definition: rotator.h:103
Rotator data structure.
Definition: rotator.h:220
azimuth_t min_az
Definition: rotator.h:249
const char * copyright
Definition: rotator.h:226
int rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
get the azimuth and elevation of the rotator
Definition: rotator.c:624
struct rot_state state
Definition: rotator.h:344
enum serial_handshake_e serial_handshake
Definition: rotator.h:237
Hamlib rig data structures.
int south_zero
Definition: rotator.h:313
azimuth_t min_az
Definition: rotator.h:309
enum serial_parity_e serial_parity
Definition: rotator.h:236
int timeout
Definition: rotator.h:241
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:312
int rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation)
set the azimuth and elevation of the rotator
Definition: rotator.c:564
enum rig_status_e status
Definition: rotator.h:227
elevation_t el_offset
Definition: rotator.h:315
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to Maidenhead grid locator.
Definition: locator.c:485
azimuth_t max_az
Definition: rotator.h:250
const struct confparams * cfgparams
Definition: rotator.h:257
const char * version
Definition: rotator.h:225
azimuth_t az_offset
Definition: rotator.h:314
int rot_move(ROT *rot, int direction, int speed)
move the rotator in the specified direction
Definition: rotator.c:773
elevation_t min_el
Definition: rotator.h:311
double dmmm2dec(int degrees, double minutes, int sw)
Convert D M.MMM notation to decimal degrees.
Definition: locator.c:196
int retry
Definition: rotator.h:242
int rot_open(ROT *rot)
open the communication to the rot
Definition: rotator.c:318
@ ROT_FLAG_AZIMUTH
Definition: rotator.h:110
elevation_t max_el
Definition: rotator.h:254
serial_parity_e
Serial parity.
Definition: rig.h:216
token_t token
Definition: rig.h:626
int comm_state
Definition: rotator.h:322
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:406
float elevation_t
Type definition for elevation.
Definition: rotator.h:67
Hamlib amplifier model definitions.
long token_t
configuration token
Definition: rig.h:590
const char * mfg_name
Definition: rotator.h:224
Live data and customized fields.
Definition: rotator.h:305
rot_model_t rot_model
Definition: rotator.h:221
struct rot_caps * caps
Definition: rotator.h:343
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:440
const char * rot_model_macro_name
Definition: rotator.h:259
int locator2longlat(double *longitude, double *latitude, const char *locator)
Convert Maidenhead grid locator to Longitude/Latitude.
Definition: locator.c:397
int serial_rate_min
Definition: rotator.h:232
int post_write_delay
Definition: rotator.h:240
rot_type_t
Rotator type flags.
Definition: rotator.h:109
char * obj
Definition: rotator.h:324
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:320
Hamlib documentation for version 4.0~git -- Sun Apr 5 2020 00:00:00
Project page: http://www.hamlib.org