Struct nmea::Nmea
[−]
[src]
pub struct Nmea { // some fields omitted }
! NMEA parser
Methods
impl Nmea
[src]
fn new() -> Nmea
Constructs a new Nmea
.
This struct parses NMEA sentences, including checksum checks and sentence
validation.
Examples
use nmea::Nmea; let mut nmea= Nmea::new(); let gga = "$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76"; nmea.parse(gga).ok(); println!("{}", nmea);
fn fix_timestamp(&self) -> Option<DateTime<UTC>>
Returns fix type
fn fix_type(&self) -> FixType
Returns fix type
fn latitude(&self) -> Option<f32>
Returns last fixed latitude in degress. None if not fixed.
fn longitude(&self) -> Option<f32>
Returns last fixed longitude in degress. None if not fixed.
fn altitude(&self) -> Option<f32>
Returns latitude from last fix. None if not available.
fn fix_satellites(&self) -> Option<u32>
Returns the number of satellites use for fix.
fn hdop(&self) -> Option<f32>
Returns the number fix HDOP
fn geoid_height(&self) -> Option<f32>
Returns the height of geoid above WGS84
fn satellites(&self) -> &Vec<Satellite>
Returns the height of geoid above WGS84
fn sentence_type(&self, s: &str) -> Result<SentenceType, &'static str>
Returns the NMEA sentence type.
fn parse(&mut self, s: &str) -> Result<SentenceType, &'static str>
Parse any NMEA sentence and stores the result. The type of sentence is returnd if implemented and valid.