parse.nmea | R Documentation |
Find and parse GPS data from NMEA sentences.
parse.nmea(nmea, sentence = NULL, returnAll = FALSE)
nmea |
A data frame with CPU time and corresponding NMEA sentences
as returned by |
sentence |
A string identifying the NMEA sentence to process. It can be one of "GPRMC", "GPGGA", "INGGA", or "GPGLL". |
returnAll |
logical. If |
This function looks first for the "GPRMC" sentence, if not found
it tries then with "GPGGA", "INGGA", or "GPGLL", and process the one with
more information (more GPS fixes). Be aware that sometimes strings may be
corrupted, in which case, it is possible to choose manually the sentence
to process. This is why get_NME0
does not automatically parse the
NMEA strings by default.
When one of "GPVTG", "INVTG", "GNVTG", or "IIVTG" sentences is found, vessel
speed and bearing are also parsed and returned.
Differences in time.cpu and time.gps may reveal wrong clock settings in the
data aquisition computer.
A data frame with cpu time, gps time (includes miliseconds if found), longitude, and latitude. Additionally, vessel speed and bearing are returned if found in the data.
Héctor Villalobos.
NMEA sentences structure can be seen in: https://gpsd.gitlab.io/gpsd/NMEA.html
get_NME0
.
if(interactive()){
ek <- read.EK60_raw("D20130504-T083828.raw", angles = FALSE)
gps <- parse.nmea(ek$nmea)
head(gps)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.