TwiceAsNice  2019-02-18
Macros | Enumerations | Functions | Variables
indicom.h File Reference

Macros

#define J2000   2451545.0
 
#define ERRMSG_SIZE   1024
 
#define STELLAR_DAY   86164.098903691
 
#define TRACKRATE_SIDEREAL   ((360.0 * 3600.0) / STELLAR_DAY)
 
#define SOLAR_DAY   86400
 
#define TRACKRATE_SOLAR   ((360.0 * 3600.0) / SOLAR_DAY)
 
#define TRACKRATE_LUNAR   14.511415
 

Enumerations

enum  TTY_ERROR {
  TTY_OK = 0, TTY_READ_ERROR = -1, TTY_WRITE_ERROR = -2, TTY_SELECT_ERROR = -3,
  TTY_TIME_OUT = -4, TTY_PORT_FAILURE = -5, TTY_PARAM_ERROR = -6, TTY_ERRNO = -7,
  TTY_OVERFLOW = -8, TTY_OK = 0, TTY_READ_ERROR = -1, TTY_WRITE_ERROR = -2,
  TTY_SELECT_ERROR = -3, TTY_TIME_OUT = -4, TTY_PORT_FAILURE = -5, TTY_PARAM_ERROR = -6,
  TTY_ERRNO = -7, TTY_OVERFLOW = -8
}
 

Functions

int tty_read (int fd, char *buf, int nbytes, int timeout, int *nbytes_read)
 read buffer from terminal More...
 
int tty_read_section (int fd, char *buf, char stop_char, int timeout, int *nbytes_read)
 read buffer from terminal with a delimiter More...
 
int tty_nread_section (int fd, char *buf, int nsize, char stop_char, int timeout, int *nbytes_read)
 read buffer from terminal with a delimiter More...
 
int tty_write (int fd, const char *buffer, int nbytes, int *nbytes_written)
 Writes a buffer to fd. More...
 
int tty_write_string (int fd, const char *buffer, int *nbytes_written)
 Writes a null terminated string to fd. More...
 
int tty_connect (const char *device, int bit_rate, int word_size, int parity, int stop_bits, int *fd)
 Establishes a tty connection to a terminal device. More...
 
int tty_disconnect (int fd)
 Closes a tty connection and flushes the bus. More...
 
void tty_error_msg (int err_code, char *err_msg, int err_msg_len)
 Retrieve the tty error message. More...
 
void tty_set_debug (int debug)
 tty_set_debug Enable or disable debug which prints verbose information. More...
 
void tty_set_gemini_udp_format (int enabled)
 
void tty_clr_trailing_read_lf (int enabled)
 
int tty_timeout (int fd, int timeout)
 
int fs_sexa (char *out, double a, int w, int fracbase)
 Converts a sexagesimal number to a string. More...
 
int f_scansexa (const char *str0, double *dp)
 convert sexagesimal string str AxBxC to double. More...
 
int extractISOTime (const char *timestr, struct ln_date *iso_date)
 Extract ISO 8601 time and store it in a tm struct. More...
 
void getSexComponents (double value, int *d, int *m, int *s)
 
void getSexComponentsIID (double value, int *d, int *m, double *s)
 
int numberFormat (char *buf, const char *format, double value)
 Fill buffer with properly formatted INumber string. More...
 
const char * timestamp ()
 Create an ISO 8601 formatted time stamp. More...
 
double rangeHA (double r)
 rangeHA Limits the hour angle value to be between -12 —> 12 More...
 
double range24 (double r)
 range24 Limits a number to be between 0-24 range. More...
 
double range360 (double r)
 range360 Limits an angle to be between 0-360 degrees. More...
 
double rangeDec (double r)
 rangeDec Limits declination value to be in -90 to 90 range. More...
 
double get_local_sidereal_time (double longitude)
 get_local_sidereal_time Returns local sideral time given longitude and system clock. More...
 
double get_local_hour_angle (double local_sideral_time, double ra)
 get_local_hour_angle Returns local hour angle of an object More...
 

Variables

const char * Direction []
 
const char * SolarSystem []
 

Macro Definition Documentation

◆ ERRMSG_SIZE

#define ERRMSG_SIZE   1024

◆ J2000

#define J2000   2451545.0

◆ SOLAR_DAY

#define SOLAR_DAY   86400

◆ STELLAR_DAY

#define STELLAR_DAY   86164.098903691

◆ TRACKRATE_LUNAR

#define TRACKRATE_LUNAR   14.511415

◆ TRACKRATE_SIDEREAL

#define TRACKRATE_SIDEREAL   ((360.0 * 3600.0) / STELLAR_DAY)

◆ TRACKRATE_SOLAR

#define TRACKRATE_SOLAR   ((360.0 * 3600.0) / SOLAR_DAY)

Enumeration Type Documentation

◆ TTY_ERROR

enum TTY_ERROR
Enumerator
TTY_OK 
TTY_READ_ERROR 
TTY_WRITE_ERROR 
TTY_SELECT_ERROR 
TTY_TIME_OUT 
TTY_PORT_FAILURE 
TTY_PARAM_ERROR 
TTY_ERRNO 
TTY_OVERFLOW 
TTY_OK 
TTY_READ_ERROR 
TTY_WRITE_ERROR 
TTY_SELECT_ERROR 
TTY_TIME_OUT 
TTY_PORT_FAILURE 
TTY_PARAM_ERROR 
TTY_ERRNO 
TTY_OVERFLOW 

Variable Documentation

◆ Direction

const char* Direction[]

◆ SolarSystem

const char* SolarSystem[]