예제 #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);
        }
예제 #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();
        }
예제 #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);
 }
예제 #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();
        }
예제 #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);
 }
예제 #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);
 }