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
281 int (*move)(
ROT *
rot,
int direction,
int speed);
284 const char * (*get_info)(
ROT *
rot);
343 extern HAMLIB_EXPORT(
ROT *)
346 extern HAMLIB_EXPORT(
int)
349 extern HAMLIB_EXPORT(
int)
352 extern HAMLIB_EXPORT(
int)
355 extern HAMLIB_EXPORT(
int)
359 extern HAMLIB_EXPORT(
int)
368 extern HAMLIB_EXPORT(
int)
372 extern HAMLIB_EXPORT(
int)
377 extern HAMLIB_EXPORT(
int)
380 extern HAMLIB_EXPORT(
int)
383 extern HAMLIB_EXPORT(
int)
387 extern HAMLIB_EXPORT(
int)
392 extern HAMLIB_EXPORT(
const char *)
395 extern HAMLIB_EXPORT(
int)
396 rot_register HAMLIB_PARAMS((
const struct rot_caps *caps));
398 extern HAMLIB_EXPORT(
int)
399 rot_unregister HAMLIB_PARAMS((
rot_model_t rot_model));
401 extern HAMLIB_EXPORT(
int)
402 rot_list_foreach HAMLIB_PARAMS((
int (*cfunc)(
const struct rot_caps *,
406 extern HAMLIB_EXPORT(
int)
407 rot_load_backend HAMLIB_PARAMS((
const char *be_name));
409 extern HAMLIB_EXPORT(
int)
410 rot_check_backend HAMLIB_PARAMS((
rot_model_t rot_model));
412 extern HAMLIB_EXPORT(
int)
413 rot_load_all_backends HAMLIB_PARAMS((
void));
418 extern HAMLIB_EXPORT(
int)
424 extern HAMLIB_EXPORT(
const struct confparams *)
432 extern HAMLIB_EXPORT(
const struct rot_caps *)
433 rot_get_caps HAMLIB_PARAMS((
rot_model_t rot_model));
435 extern HAMLIB_EXPORT(
int)
436 qrb HAMLIB_PARAMS((
double lon1,
443 extern HAMLIB_EXPORT(
double)
446 extern HAMLIB_EXPORT(
double)
449 extern HAMLIB_EXPORT(
int)
455 extern HAMLIB_EXPORT(
int)
458 const char *locator));
460 extern HAMLIB_EXPORT(
double)
461 dms2dec HAMLIB_PARAMS((
int degrees,
466 extern HAMLIB_EXPORT(
int)
467 dec2dms HAMLIB_PARAMS((
double dec,
473 extern HAMLIB_EXPORT(
int)
479 extern HAMLIB_EXPORT(
double)
480 dmmm2dec HAMLIB_PARAMS((
int degrees,
494 #define rot_debug rig_debug
rig_port_e
Port type.
Definition: rig.h:176
const char * model_name
Definition: rotator.h:221
Port definition.
Definition: rig.h:1463
const char * rot_get_info(ROT *rot)
get general information from the rotator
Definition: rotator.c:779
int rot_stop(ROT *rot)
stop the rotator
Definition: rotator.c:681
@ ROT_FLAG_ELEVATION
Definition: rotator.h:111
double azimuth_long_path(double azimuth)
Calculate the long path bearing between two points.
Definition: locator.c:697
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:335
rig_status_e
Development status of the backend.
Definition: rig.h:261
const char * priv
Definition: rotator.h:255
azimuth_t max_az
Definition: rotator.h:306
int serial_rate_max
Definition: rotator.h:231
char * priv
Definition: rotator.h:316
int serial_data_bits
Definition: rotator.h:232
enum rig_port_e port_type
Definition: rotator.h:228
int write_delay
Definition: rotator.h:237
int rot_reset(ROT *rot, rot_reset_t reset)
reset the rotator
Definition: rotator.c:715
Configuration parameter structure.
Definition: rig.h:579
elevation_t min_el
Definition: rotator.h:249
int serial_stop_bits
Definition: rotator.h:233
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:477
int rot_type
Definition: rotator.h:227
int rot_park(ROT *rot)
park the antenna
Definition: rotator.c:648
int rot_get_conf(ROT *rot, token_t token, char *val)
get the value of a configuration parameter
Definition: rot_conf.c:667
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:531
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:520
serial_handshake_e
Serial handshake.
Definition: rig.h:209
int rot_reset_t
Type definition for rotator reset.
Definition: rotator.h:103
Rotator data structure.
Definition: rotator.h:219
azimuth_t min_az
Definition: rotator.h:246
const char * copyright
Definition: rotator.h:224
int rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation)
get the azimuth and elevation of the rotator
Definition: rotator.c:613
struct rot_state state
Definition: rotator.h:337
enum serial_handshake_e serial_handshake
Definition: rotator.h:235
Hamlib rig data structures.
azimuth_t min_az
Definition: rotator.h:305
enum serial_parity_e serial_parity
Definition: rotator.h:234
int timeout
Definition: rotator.h:239
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:308
int rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation)
set the azimuth and elevation of the rotator
Definition: rotator.c:565
enum rig_status_e status
Definition: rotator.h:225
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to Maidenhead grid locator.
Definition: locator.c:486
azimuth_t max_az
Definition: rotator.h:247
const struct confparams * cfgparams
Definition: rotator.h:254
const char * version
Definition: rotator.h:223
int rot_move(ROT *rot, int direction, int speed)
move the rotator in the specified direction
Definition: rotator.c:746
elevation_t min_el
Definition: rotator.h:307
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:240
int rot_open(ROT *rot)
open the communication to the rot
Definition: rotator.c:319
@ ROT_FLAG_AZIMUTH
Definition: rotator.h:110
elevation_t max_el
Definition: rotator.h:251
serial_parity_e
Serial parity.
Definition: rig.h:197
token_t token
Definition: rig.h:580
int comm_state
Definition: rotator.h:315
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:558
token_t rot_token_lookup(ROT *rot, const char *name)
Simple lookup returning token id associated with name.
Definition: rot_conf.c:584
int rot_model_t
Convenience type definition for rotator model.
Definition: rotlist.h:369
float elevation_t
Type definition for elevation.
Definition: rotator.h:67
Hamlib rotator model definitions.
long token_t
configuration token
Definition: rig.h:546
const char * mfg_name
Definition: rotator.h:222
Live data and customized fields.
Definition: rotator.h:301
rot_model_t rot_model
Definition: rotator.h:220
struct rot_caps * caps
Definition: rotator.h:336
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:677
int rot_close(ROT *rot)
close the communication to the rot
Definition: rotator.c:441
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:230
int post_write_delay
Definition: rotator.h:238
rot_type_t
Rotator type flags.
Definition: rotator.h:109
char * obj
Definition: rotator.h:317
int rot_set_conf(ROT *rot, token_t token, const char *val)
set a rotator configuration parameter
Definition: rot_conf.c:615
hamlib_port_t rotport
Definition: rotator.h:313
Hamlib documentation for version 3.3 -- Wed Jan 29 2020 00:00:00
Project page: http://www.hamlib.org