pushData method

void pushData(
  1. Uint8List? data
)

Reads the input NMEA data creating a NmeaLocation. The NMEA location data source needs to be started before calling this method.

When pushing data:

  • Each sentence needs to begins with a '$'
  • Each sentence needs to end with carriage return/line feed sequence
  • Single or multiple sentences can be pushed at one time, all strings in the buffer will be parsed
  • There is no explicit limit on the amount of data that can pushed at one time
  • If a partial sentences are pushed the data source accumulates (and concatenates) the pushed data until a carriage return/line feed sequence is reached
  • The data source parses these messages types: GGA, GSA, GST, GSV, RMC, VTG
  • Each sentence's checksum is validated
  • Unknown/bad/incorrect sentences are ignored (they do not produce any location, satellite updates etc.)
  • Sentences support up to 256 characters (this is beyond the NMEA spec's 82 character limit to support receiver's that output longer sentences)
  • Messages should be of the form: "$XXYYY,[data]*[checksum]\r\n"
  • Example:
  • $GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76
  • $GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38*0A
  • $GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30*70

See https://www.nmea.org/ for more information on the NMEA standard.

Parameters:

  • data — The data buffer that contains NMEA data.