/// <summary> /// Private method for parsing the PGRME NMEA sentence /// </summary> /// <param name="strRME">GPRMC sentence</param> private void ParseRME(string strRME) { PGRME = new GPRME(strRME); //fire the event. GpsEventArgs e = new GpsEventArgs { TypeOfEvent = GpsEventType.PGRME, Sentence = strRME }; NewProcessedGpsFix(this, e); }
/// <summary> /// Initializes a GpsHandler for communication with GPS receiver. /// The GpsHandler is used for communication with the GPS device and process information from the GPS revice. /// </summary> public GpsHandler() { _disposed = false; NewProcessedGpsFix += GpsEventHandler; //Link event from GPS receiver to process data function GpsPort.NewGpsData += GpsDataEventHandler; GPRMC = new GPRMC(); GPGGA = new GPGGA(); GPGSA = new GPGSA(); GPRMC = new GPRMC(); PGRME = new GPRME(); GPGSV = new GPGSV(); }
/// <summary> /// Disposes the GpsHandler and if nessesary calls Stop() /// </summary> public void Dispose() { if (!_disposed) { Stop(); GpsPort.Dispose(); GPGGA = null; GPGLL = null; GPGSA = null; GPRMC = null; PGRME = null; GpsPort = null; _disposed = true; } GC.SuppressFinalize(this); }