Function nmea::sentences::parse_vhw

source ·
pub fn parse_vhw(sentence: NmeaSentence<'_>) -> Result<VhwData, Error<'_>>
Expand description

Parse VHW message

$GPVHW,100.5,T,105.5,M,10.5,N,19.4,K*4F
  1. 100.5 Heading True
  2. T
  3. 105.5 Heading Magnetic
  4. M
  5. 10.5 Speed relative to water, knots
  6. N
  7. 19.4 Speed relative to water, km/hr
  8. K

Each is considered as a pair of a float value and a single character, and if the float value exists but the single character is not correct, it is treated as None. For example, if 1 is “100.5” and 2 is not “T”, then heading_true is None.