Macros | Functions | Variables
aera.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <fcntl.h>
#include <sys/time.h>

Go to the source code of this file.

Macros

#define AERA_DEG_TO_RAD   0.017453292519943295769236907684886
 
#define AERA_EARTH_RADIUS_IN_METERS   6372797.560856
 
#define AERA_STATION_ALTITUDE   1559.49
 
#define AERA_STATION_LATITUDE   -35.108405932
 
#define AERA_STATION_LONGITUDE   -69.533337772
 
#define AERA_UTC_TO_GPS   315964800 + 16
 

Functions

void aera (struct modesMessage *mm)
 
double aeraCalcAzimuth (double lat1, double lon1, double lat2, double lon2)
 
double aeraCalcCorrectedAltitude (double alt1, double alt2, double groundDistance)
 
double aeraCalcGroundDistance (double lat1, double lon1, double lat2, double lon2)
 
int aeraConnectToSocket (int *aeraSocketFD, char host[], int port)
 
void aeraWriteLogfile (char *message)
 
int aeraWriteToSocket (int *aeraSocketFD, unsigned char *socketMessage, int length)
 
uint64_t mstime (void)
 

Variables

int * aeraSocketFD
 
int aeraSocketFD2
 
int aeraSocketInit
 
int aeraSocketReconnectTime
 

Macro Definition Documentation

#define AERA_DEG_TO_RAD   0.017453292519943295769236907684886

Definition at line 23 of file aera.h.

Referenced by aera(), aeraCalcAzimuth(), and aeraCalcGroundDistance().

#define AERA_EARTH_RADIUS_IN_METERS   6372797.560856

Definition at line 24 of file aera.h.

Referenced by aeraCalcCorrectedAltitude(), and aeraCalcGroundDistance().

#define AERA_STATION_ALTITUDE   1559.49

Definition at line 27 of file aera.h.

Referenced by aera().

#define AERA_STATION_LATITUDE   -35.108405932

Definition at line 25 of file aera.h.

Referenced by aera().

#define AERA_STATION_LONGITUDE   -69.533337772

Definition at line 26 of file aera.h.

Referenced by aera().

#define AERA_UTC_TO_GPS   315964800 + 16

Definition at line 37 of file aera.h.

Referenced by aera().

Function Documentation

void aera ( struct modesMessage mm)
double aeraCalcAzimuth ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
)

Definition at line 76 of file aera.c.

References AERA_DEG_TO_RAD.

Referenced by aera().

double aeraCalcCorrectedAltitude ( double  alt1,
double  alt2,
double  groundDistance 
)

Definition at line 38 of file aera.c.

References AERA_EARTH_RADIUS_IN_METERS, and sqrt().

Referenced by aera().

double aeraCalcGroundDistance ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
)

Definition at line 24 of file aera.c.

References AERA_DEG_TO_RAD, AERA_EARTH_RADIUS_IN_METERS, and sqrt().

Referenced by aera().

int aeraConnectToSocket ( int *  aeraSocketFD,
char  host[],
int  port 
)

Definition at line 236 of file aera.c.

Referenced by aeraReconnectToSocket(), and main().

void aeraWriteLogfile ( char *  message)

Definition at line 223 of file aera.c.

References file.

Referenced by aera().

int aeraWriteToSocket ( int *  aeraSocketFD,
unsigned char *  socketMessage,
int  length 
)

Definition at line 285 of file aera.c.

References aeraReconnectToSocket().

Referenced by aera().

uint64_t mstime ( void  )

Definition at line 12 of file aera.c.

Referenced by displayModesMessage(), interactiveReceiveData(), and interactiveShowData().

Variable Documentation

int * aeraSocketFD

Definition at line 41 of file aera.h.

Referenced by aera(), and main().

int aeraSocketFD2

Definition at line 41 of file aera.h.

Referenced by main().

int aeraSocketInit

Definition at line 41 of file aera.h.

int aeraSocketReconnectTime

Definition at line 41 of file aera.h.

Referenced by aeraReconnectToSocket().


, generated on Tue Sep 26 2023.