Guido Ottaviani / Mbed 2 deprecated LeonardoMbos

Dependencies:   mbos Watchdog TextLCD mbed ConfigFile

Embed: (wiki syntax)

« Back to documentation index

gmath.h File Reference

gmath.h File Reference

Go to the source code of this file.

Functions

double nmea_ndeg2degree (double val)
 Convert NDEG (NMEA degree) to fractional degree.
double nmea_degree2ndeg (double val)
 Convert fractional degree to NDEG (NMEA degree)
double nmea_calc_pdop (double hdop, double vdop)
 Calculate PDOP (Position Dilution Of Precision) factor.
void nmea_info2pos (const nmeaINFO *info, nmeaPOS *pos)
 Convert position from INFO to radians position.
void nmea_pos2info (const nmeaPOS *pos, nmeaINFO *info)
 Convert radians position to INFOs position.
double nmea_distance (const nmeaPOS *from_pos, const nmeaPOS *to_pos)
 Calculate distance between two points.
double nmea_distance_ellipsoid (const nmeaPOS *from_pos, const nmeaPOS *to_pos, double *from_azimuth, double *to_azimuth)
 Calculate distance between two points This function uses an algorithm for an oblate spheroid earth model.
int nmea_move_horz (const nmeaPOS *start_pos, nmeaPOS *end_pos, double azimuth, double distance)
 Horizontal move of point position.
int nmea_move_horz_ellipsoid (const nmeaPOS *start_pos, nmeaPOS *end_pos, double azimuth, double distance, double *end_azimuth)
 Horizontal move of point position This function uses an algorithm for an oblate spheroid earth model.

Detailed Description

Definition in file gmath.h.


Function Documentation

double nmea_calc_pdop ( double  hdop,
double  vdop 
)

Calculate PDOP (Position Dilution Of Precision) factor.

Definition at line 83 of file gmath.c.

double nmea_degree2ndeg ( double  val )

Convert fractional degree to NDEG (NMEA degree)

Definition at line 57 of file gmath.c.

double nmea_distance ( const nmeaPOS from_pos,
const nmeaPOS to_pos 
)

Calculate distance between two points.

Returns:
Distance in meters
Parameters:
from_posFrom position in radians
to_posTo position in radians

Definition at line 98 of file gmath.c.

double nmea_distance_ellipsoid ( const nmeaPOS from_pos,
const nmeaPOS to_pos,
double *  from_azimuth,
double *  to_azimuth 
)

Calculate distance between two points This function uses an algorithm for an oblate spheroid earth model.

The algorithm is described here: http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf

Returns:
Distance in meters
Parameters:
from_posFrom position in radians
to_posTo position in radians
from_azimuth(O) azimuth at "from" position in radians
to_azimuth(O) azimuth at "to" position in radians

Definition at line 117 of file gmath.c.

void nmea_info2pos ( const nmeaINFO info,
nmeaPOS pos 
)

Convert position from INFO to radians position.

Definition at line 377 of file gmath.c.

int nmea_move_horz ( const nmeaPOS start_pos,
nmeaPOS end_pos,
double  azimuth,
double  distance 
)

Horizontal move of point position.

Parameters:
start_posStart position in radians
end_posResult position in radians
azimuthAzimuth (degree) [0, 359]
distanceDistance (km)

Definition at line 233 of file gmath.c.

int nmea_move_horz_ellipsoid ( const nmeaPOS start_pos,
nmeaPOS end_pos,
double  azimuth,
double  distance,
double *  end_azimuth 
)

Horizontal move of point position This function uses an algorithm for an oblate spheroid earth model.

The algorithm is described here: http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf

Parameters:
start_posStart position in radians
end_pos(O) Result position in radians
azimuthAzimuth in radians
distanceDistance (km)
end_azimuth(O) Azimuth at end position in radians

Definition at line 266 of file gmath.c.

double nmea_ndeg2degree ( double  val )

Convert NDEG (NMEA degree) to fractional degree.

Definition at line 47 of file gmath.c.

void nmea_pos2info ( const nmeaPOS pos,
nmeaINFO info 
)

Convert radians position to INFOs position.

Definition at line 386 of file gmath.c.