Mbed library to handle GPS data reception and parsing

Dependents:   GPS_U-blox_NEO-6M_Code

Features

  • All positionning parameters are contained into a global data structure.
  • Automatic nema string parsing and data structure update.
    • GSA,GGA,VTG and RMC
  • Convert latitude and longitude to decimal value.
  • Converts latittude,longitude and altitude to ECEF coordinates.

Planed developement

  • Test library for RTOS use.
  • Complete the nema parsing decoders (couple of parameters are not parsed yet and not present in the data structure).
  • Add conversion tool to get ENU coordinates.
Committer:
chris215
Date:
Tue Feb 16 02:57:35 2016 +0000
Revision:
5:8a73e34b3978
Parent:
0:0c1aa5906cef
Function renaming. Adding gps update calls.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris215 0:0c1aa5906cef 1 /*
chris215 0:0c1aa5906cef 2 a the equatorial earth radius
chris215 0:0c1aa5906cef 3 f the "flattening" parameter ( = (a-b)/a ,the ratio of the
chris215 0:0c1aa5906cef 4 difference between the equatorial and polar radii to a;
chris215 0:0c1aa5906cef 5 this is a measure of how "elliptical" a polar cross-section
chris215 0:0c1aa5906cef 6 is).
chris215 0:0c1aa5906cef 7
chris215 0:0c1aa5906cef 8 The eccentricity e of the figure of the earth is found from
chris215 0:0c1aa5906cef 9
chris215 0:0c1aa5906cef 10 e^2 = 2f - f^2 , or e = sqrt(2f-f^2) .
chris215 0:0c1aa5906cef 11 */
chris215 0:0c1aa5906cef 12 //For WGS84,
chris215 0:0c1aa5906cef 13
chris215 0:0c1aa5906cef 14 #define A 6378137.0
chris215 0:0c1aa5906cef 15 #define RF 298.257224
chris215 0:0c1aa5906cef 16 #define F 1/RF
chris215 0:0c1aa5906cef 17 #define E sqrt(2*f-f^2)
chris215 0:0c1aa5906cef 18
chris215 0:0c1aa5906cef 19 /*
chris215 0:0c1aa5906cef 20 a = 6378137 meters
chris215 0:0c1aa5906cef 21 (1/f) = 298.257224
chris215 0:0c1aa5906cef 22
chris215 0:0c1aa5906cef 23 (the reciprocal of f is usually given instead of f itself, because the
chris215 0:0c1aa5906cef 24 reciprocal is so close to an integer)
chris215 0:0c1aa5906cef 25
chris215 0:0c1aa5906cef 26 Given latitude (geodetic latitude, not geocentric latitude!), compute
chris215 0:0c1aa5906cef 27
chris215 0:0c1aa5906cef 28 1
chris215 0:0c1aa5906cef 29 C = ---------------------------------------------------
chris215 0:0c1aa5906cef 30 sqrt( cos^2(latitude) + (1-f)^2 * sin^2(latitude) )
chris215 0:0c1aa5906cef 31
chris215 0:0c1aa5906cef 32 and
chris215 0:0c1aa5906cef 33 S = (1-f)^2 * C .
chris215 0:0c1aa5906cef 34 */