NMEA parser UDT (class with working code in CTOR) More...

Public Member Functions | |
| NMEA (BYVAL_AS_TrackLoader_PTR) | |
CTOR parsing the context of a *.NMEA file. More... | |
| FUNCTION_AS_float | Val_ (BYVAL_AS_ZSTRING_PTR) |
| Evaluate a number from a string. More... | |
| FUNCTION_AS_TrP_PTR | Eval (BYVAL_AS_ZSTRING_PTR_PTR) |
| Evaluate the lines data. More... | |
| FUNCTION_AS_DOUBLE | LaLo (BYVAL_AS_ZSTRING_PTR_PTR) |
| Evaluate longitude or latitude from text. More... | |
| FUNCTION_AS_DOUBLE | DaTi (BYVAL_AS_ZSTRING_PTR_PTR) |
| Evaluate the date and time for input lines. More... | |
Public Attributes | |
| LONG | Lin = 0 |
| lines/tags counter More... | |
| LONG | Enr = 0 |
| error counter More... | |
| ANY_PTR | Dat |
| end of data array in input buffer More... | |
| ZSTRING_PTR | Tok [27+1] |
NMEA parser UDT (class with working code in CTOR)
This UDTs constructor gets the context of a *.NMEA file and evaluates it, reading the date, time, longitude, latitude, elevation, ground speed and the moving direction data from a set of two lines ($GPGGA and $GPRMC). The code is tested for files generated by MapFactor Navigator software.
Definition at line 20 of file parser_nmea.bi.
| NMEA::NMEA | ( | BYVAL_AS_TrackLoader_PTR | Par | ) |
CTOR parsing the context of a *.NMEA file.
| Par | Pointer to parent instance |
This constructor gets an input buffer (UBYTE PTR) containing the context of an *.NMEA file, and parses it, creating an array of TrP points if
a $GPRMC line follows a $GPGGA data line both lines contain the same timestamp and position both lines have a valid checksum
If a single $GPGGA line or a pair of $GPGGA and $GPRMC lines doesn't match this requiaries, they get skipped.
Otherwise a new TrP gets created for the pair of lines, and that TrP gets stored in the resulting TrP array, located at (and overriding) the beginning of the input buffer.
Invalid or missing numbers get filled by NaN entries.
Find the data field description at https://de.wikipedia.org/wiki/NMEA_0183
Definition at line 40 of file parser_nmea.bas.

| FUNCTION_AS_float NMEA::Val_ | ( | BYVAL_AS_ZSTRING_PTR | S | ) |
Evaluate a number from a string.
| S | The string context |
Function to read a float number from a string. Independant from the locale setting it always uses the . character as decimal separator (unlike the FB VAL function).
Definition at line 87 of file parser_nmea.bas.

| FUNCTION_AS_TrP_PTR NMEA::Eval | ( | BYVAL_AS_ZSTRING_PTR_PTR | S | ) |
Evaluate the lines data.
| S | start of entry strings (array of ZSTRING PTR) |
This function checks the location in both lines. In case of a mismatch it skips the lines (a point). Otherwise it creates a further entry in the output array.
< Date / Time
< Latitude [radians]
< Longitude [radians]
< Elevation [m]
< Speed over ground [km/h]
< Direction Angle [degree]
Definition at line 150 of file parser_nmea.bas.


| FUNCTION_AS_DOUBLE NMEA::LaLo | ( | BYVAL_AS_ZSTRING_PTR_PTR | S | ) |
Evaluate longitude or latitude from text.
| S | Start of number, followed by direction (N, W, S, E) |
Function to evaluate an longitude or latitude entry. It gets a first ZSTRING PTR pointing to the number (like 01821.7380), and a second pointing to the direction (like E). Both are concidered to compute the matching world angle in radians, returning NaN in case of invalid direction.
Definition at line 130 of file parser_nmea.bas.

| FUNCTION_AS_DOUBLE NMEA::DaTi | ( | BYVAL_AS_ZSTRING_PTR_PTR | S | ) |
Evaluate the date and time for input lines.
| S | The array all parameters |
Function that checks the time in both lines, returning a NaN in case of a mismatch. Otherwise it returns a DOUBLE containing an FB DATE_TIME_SERIAL.
Definition at line 103 of file parser_nmea.bas.

| LONG NMEA::Lin = 0 |
lines/tags counter
Definition at line 22 of file parser_nmea.bi.
| LONG NMEA::Enr = 0 |
error counter
Definition at line 23 of file parser_nmea.bi.
| ANY_PTR NMEA::Dat |
end of data array in input buffer
Definition at line 25 of file parser_nmea.bi.
| ZSTRING_PTR NMEA::Tok[27+1] |
Definition at line 26 of file parser_nmea.bi.