mbgtools-lx  4.2.8
mbggeo.h File Reference
#include <gpsdefs.h>
#include <use_pack.h>

Go to the source code of this file.

Data Structures

struct  DMS
 Geographic longitude or latitude in [degrees, minutes, seconds]. More...
 
struct  POS
 A geographic position represented in different formats. More...
 
struct  USER_POS
 A structure used internally to compute a geographic position. More...
 
struct  ELLIPSOID
 Characteristics of a geographic reference ellipsoid. More...
 

Macros

#define _ext   extern
 
#define _mbg_swab_dms(_p)
 
#define _mbg_swab_pos(_p)
 
#define PI   3.1415926535897932
 

Enumerations

enum  ELLIPSOIDS { WGS84, BESSEL, N_ELLIPSOIDS }
 An enumeration of known ellipsoids. More...
 

Functions

void dms_to_rad (const DMS *dms, double *rad)
 
void rad_to_dms (const double *rad, DMS *dms, const char prefix)
 
void dms_to_lla (POS *pos)
 
void lla_to_dms (POS *pos)
 
void lla_to_xyz (USER_POS *pos)
 
void xyz_to_lla (POS *pos, void(*cyclic_func)(void))
 
void dms_to_xyz (USER_POS *pos)
 
void setup_user_pos_from_dms (USER_POS *user)
 
void setup_user_pos_from_lla (USER_POS *user)
 
void setup_user_pos_from_xyz (USER_POS *user, void(*cyclic_func)(void))
 
double distance (XYZ xyz_1, XYZ xyz_2)
 
void init_mbggeo (void)
 

Variables

ELLIPSOID ellipsoid [N_ELLIPSOIDS]
 
double OMEGADOTe
 
double mue
 
double vr_to_doppler
 
double gps_pi
 
double gps_c0
 
double pi
 
double r2d
 
double d2r
 
double gps_two_pi
 
double sqrt_mue
 

Macro Definition Documentation

◆ _ext

#define _ext   extern

Definition at line 68 of file mbggeo.h.

◆ _mbg_swab_dms

#define _mbg_swab_dms (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->prefix ); \
_mbg_swab16( &(_p)->deg ); \
_mbg_swab16( &(_p)->min ); \
_mbg_swab_double( &(_p)->sec ); \
} while ( 0 )

Definition at line 99 of file mbggeo.h.

◆ _mbg_swab_pos

#define _mbg_swab_pos (   _p)
Value:
do \
{ \
_mbg_swab_xyz( (_p)->xyz ); \
_mbg_swab_lla( (_p)->lla ); \
_mbg_swab_dms( &(_p)->longitude ); \
_mbg_swab_dms( &(_p)->latitude ); \
_mbg_swab16( &(_p)->ellipsoid ); \
} while ( 0 )
ELLIPSOID ellipsoid[N_ELLIPSOIDS]

Definition at line 123 of file mbggeo.h.

Referenced by mbg_get_gps_pos().

◆ PI

#define PI   3.1415926535897932

Definition at line 264 of file mbggeo.h.

Referenced by print_position(), and set_gps_pos().

Enumeration Type Documentation

◆ ELLIPSOIDS

enum ELLIPSOIDS

An enumeration of known ellipsoids.

Enumerator
WGS84 
BESSEL 
N_ELLIPSOIDS 

Definition at line 202 of file mbggeo.h.

Function Documentation

◆ distance()

double distance ( XYZ  xyz_1,
XYZ  xyz_2 
)

◆ dms_to_lla()

void dms_to_lla ( POS pos)

◆ dms_to_rad()

void dms_to_rad ( const DMS dms,
double *  rad 
)

◆ dms_to_xyz()

void dms_to_xyz ( USER_POS pos)

◆ init_mbggeo()

void init_mbggeo ( void  )

◆ lla_to_dms()

void lla_to_dms ( POS pos)

◆ lla_to_xyz()

void lla_to_xyz ( USER_POS pos)

◆ rad_to_dms()

void rad_to_dms ( const double *  rad,
DMS dms,
const char  prefix 
)

◆ setup_user_pos_from_dms()

void setup_user_pos_from_dms ( USER_POS user)

◆ setup_user_pos_from_lla()

void setup_user_pos_from_lla ( USER_POS user)

◆ setup_user_pos_from_xyz()

void setup_user_pos_from_xyz ( USER_POS user,
void(*)(void)  cyclic_func 
)

◆ xyz_to_lla()

void xyz_to_lla ( POS pos,
void(*)(void)  cyclic_func 
)

Variable Documentation

◆ d2r

double d2r

◆ ellipsoid

ELLIPSOID ellipsoid[N_ELLIPSOIDS]

◆ gps_c0

double gps_c0

◆ gps_pi

double gps_pi

◆ gps_two_pi

double gps_two_pi

◆ mue

double mue

◆ OMEGADOTe

double OMEGADOTe

◆ pi

double pi

◆ r2d

double r2d

Referenced by print_position(), and set_gps_pos().

◆ sqrt_mue

double sqrt_mue

◆ vr_to_doppler

double vr_to_doppler