예제 #1
0
        /// <summary>
        /// Private method for parsing the GPGSA NMEA sentence
        /// </summary>
        /// <param name="strGSA">GPGSA sentence</param>
        private void ParseGSA(string strGSA)
        {
            GPGSA = new SharpGPS.NMEA.GPGSA(strGSA);
            //fire the event.
            GPSEventArgs e = new GPSEventArgs();

            e.TypeOfEvent = GPSEventType.GPGSA;
            e.Sentence    = strGSA;
            _NewGPSFix(this, e);
        }
예제 #2
0
        public GPSHandler()
        {
            GpsPort   = new SerialPort();
            _disposed = false;

            //Link event from GPS receiver to process data function
            GpsPort.NewGPSData += GPSDataEventHandler;
            this.GPRMC          = new NMEA.GPRMC();
            this.GPGGA          = new SharpGPS.NMEA.GPGGA();
            this.GPGSA          = new SharpGPS.NMEA.GPGSA();
            this.GPRMC          = new SharpGPS.NMEA.GPRMC();
            this.PGRME          = new SharpGPS.NMEA.GPRME();
            this.GPGSV          = new SharpGPS.NMEA.GPGSV();
        }
예제 #3
0
 /// <summary>
 /// Disposes the GpsHandler and if nessesary calls Stop()
 /// </summary>
 public void Dispose()
 {
     if (!_disposed)
     {
         Stop();
         GpsPort.Dispose();
         this.GPGGA = null;
         this.GPGLL = null;
         this.GPGSA = null;
         this.GPRMC = null;
         this.PGRME = null;
         GpsPort    = null;
         //this.GPGSV = null;
         _disposed = true;
     }
     GC.SuppressFinalize(this);
 }
예제 #4
0
        public GPSHandler()
        {
            GpsPort = new SerialPort();
            _disposed = false;

            //Link event from GPS receiver to process data function
            GpsPort.NewGPSData += GPSDataEventHandler;
            this.GPRMC = new NMEA.GPRMC();
            this.GPGGA = new SharpGPS.NMEA.GPGGA();
            this.GPGSA = new SharpGPS.NMEA.GPGSA();
            this.GPRMC = new SharpGPS.NMEA.GPRMC();
            this.PGRME = new SharpGPS.NMEA.GPRME();
            this.GPGSV = new SharpGPS.NMEA.GPGSV();
        }
예제 #5
0
 /// <summary>
 /// Private method for parsing the GPGSA NMEA sentence
 /// </summary>
 /// <param name="strGSA">GPGSA sentence</param>
 private void ParseGSA(string strGSA)
 {
     GPGSA = new SharpGPS.NMEA.GPGSA(strGSA);
     //fire the event.
     GPSEventArgs e = new GPSEventArgs();
     e.TypeOfEvent = GPSEventType.GPGSA;
     e.Sentence = strGSA;
     _NewGPSFix(this, e);
 }
예제 #6
0
 /// <summary>
 /// Disposes the GpsHandler and if nessesary calls Stop()
 /// </summary>
 public void Dispose()
 {
     if (!_disposed)
     {
         Stop();
         GpsPort.Dispose();
         this.GPGGA = null;
         this.GPGLL = null;
         this.GPGSA = null;
         this.GPRMC = null;
         this.PGRME = null;
         GpsPort = null;
         //this.GPGSV = null;
         _disposed = true;
     }
     GC.SuppressFinalize(this);
 }