Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <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();
        }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
        /// <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();
        }
Exemplo n.º 5
0
 /// <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);
 }
Exemplo n.º 6
0
 /// <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);
 }