Exemplo n.º 1
0
        private void CIPFormGPS_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            timerCoordenada.Enabled = false;

            if (ssfWriter != null)
            {
                if (ssfWriter.IsFeatureInProgress())
                {
                    ssfWriter.CancelFeature();
                }

                if (ssfWriter.IsSSFFileInProgress())
                {
                    ssfWriter.EndSSFFile();
                }

                ssfWriter = null;
            }
            if (gpsTrimble != null)
            {
                if (gpsTrimble.IsTracking())
                {
                    gpsTrimble.StopTracking();
                }

                gpsTrimble = null;
            }
        }
Exemplo n.º 2
0
        private void GPSForm_Closing(object sender, CancelEventArgs e)
        {
            //if (ssfWriter != null)
            //{
            //    if (ssfWriter.IsFeatureInProgress())
            //    {
            //        ssfWriter.CancelFeature();
            //    }

            //    if (ssfWriter.IsSSFFileInProgress())
            //    {
            //        ssfWriter.EndSSFFile();
            //    }

            //    ssfWriter = null;
            //}
            if (gpsTrimble != null)
            {
                if (gpsTrimble.IsTracking())
                {
                    gpsTrimble.StopTracking();
                }

                gpsTrimble = null;
            }
        }
Exemplo n.º 3
0
 public void DesconectarTrimble()
 {
     if (gpsTrimble != null)
     {
         gpsTrimble.StopTracking();
         gpsTrimble = null;
         //Usuario.UsandoTrimble = false;
     }
 }
Exemplo n.º 4
0
 public static void DesconectarTrimble()
 {
     if (gpsTrimble != null)
     {
         gpsTrimble.StopTracking();
         gpsTrimble = null;
         //Usuario.UsandoTrimble = false;
     }
 }
Exemplo n.º 5
0
        public string ConectarTrimbleSimulacao()
        {
            //GPS CONFIG
            gpsTrimble          = new GPSReceiver();
            gpsTrimble.CommPort = "COM4";
            //gpsTrimble.DGPSSettings.Source = DGPSSourceType.pfIntegratedSBASSource;
            //gpsTrimble.DGPSSettings.PositionMode = DGPSPositionMode.pfBestPositionsAvailable;
            gpsTrimble.PositionMinimumInterval   = 5.0f;
            gpsTrimble.MinimumElevationAngleMask = 5.0f;
            gpsTrimble.MinimumSNRMask            = 12.0f;
            //this.gpsTrimble.MinimumNumberOfSatellites = 4;
            gpsTrimble.DOPType         = DOPTypeCode.pfDOPTypePDOP;
            gpsTrimble.MaximumPDOPMask = 8.0f;
            //this.gpsTrimble.MaximumHDOPMask = 3.9f;
            //this.gpsTrimble.VelocityFilter = false;

            gpsTrimble.NewError +=
                new IGPSReceiverEvents_NewErrorEventHandler(gpsTrimble_NewError);
            gpsTrimble.NewGPSStatus +=
                new IGPSReceiverEvents_NewGPSStatusEventHandler(gpsTrimble_NewGPSStatus);
            gpsTrimble.NewPosition +=
                new IGPSReceiverEvents_NewPositionEventHandler(gpsTrimble_NewPosition);

            //ativar simulação
            gpsTrimble.SimulationSettings.Latitude            = -12.212848f;
            gpsTrimble.SimulationSettings.Longitude           = -38.9580686f;
            gpsTrimble.SimulationSettings.Radius              = 100;
            gpsTrimble.SimulationSettings.IsSimulationEnabled = true;


            bool started = gpsTrimble.StartTracking();

            if (started)
            {
                gpsTrimbleStatus = "Pesquisando Satélite";
                return(gpsTrimbleStatus);
                //Usuario.UsandoTrimble = true;
            }
            else
            {
                gpsTrimbleStatus = "Não foi possível conectar ao GPS";
                return(gpsTrimbleStatus);
            }
        }
Exemplo n.º 6
0
        public void ConectarTrimble()
        {
            gpsTrimble = new GPSReceiver();
            gpsTrimble.CommPort = "COM4";
            //gpsTrimble.DGPSSettings.Source = DGPSSourceType.pfIntegratedSBASSource;
            //gpsTrimble.DGPSSettings.PositionMode = DGPSPositionMode.pfBestPositionsAvailable;
            gpsTrimble.PositionMinimumInterval = 2.0f;
            gpsTrimble.MinimumElevationAngleMask = 5.0f;
            gpsTrimble.MinimumSNRMask = 12.0f;
            //this.gpsTrimble.MinimumNumberOfSatellites = 4;
            gpsTrimble.DOPType = DOPTypeCode.pfDOPTypePDOP;
            gpsTrimble.MaximumPDOPMask = 8.0f;
            //this.gpsTrimble.MaximumHDOPMask = 3.9f;
            //this.gpsTrimble.VelocityFilter = false;

            gpsTrimble.NewError +=
                new IGPSReceiverEvents_NewErrorEventHandler(gpsTrimble_NewError);
            gpsTrimble.NewGPSStatus +=
                new IGPSReceiverEvents_NewGPSStatusEventHandler(gpsTrimble_NewGPSStatus);
            gpsTrimble.NewPosition +=
                new IGPSReceiverEvents_NewPositionEventHandler(gpsTrimble_NewPosition);

            //ativar simulação
            //gpsTrimble.SimulationSettings.Latitude = -12.212f;
            //gpsTrimble.SimulationSettings.Longitude = -38.958f;
            //gpsTrimble.SimulationSettings.Radius = 300;
            //gpsTrimble.SimulationSettings.IsSimulationEnabled = true;

            bool started = gpsTrimble.StartTracking();
            if (started)
            {
                gpsTrimbleStatus = "Pesquisando Satélite";
                //Usuario.UsandoTrimble = true;
            }
            else
            {
                gpsTrimbleStatus = "Não foi possível conectar ao GPS";
            }
        }
Exemplo n.º 7
0
        private void CIPFormGPS_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            timerCoordenada.Enabled = false;

            if (ssfWriter != null)
            {
                if (ssfWriter.IsFeatureInProgress())
                {
                    ssfWriter.CancelFeature();
                }

                if (ssfWriter.IsSSFFileInProgress())
                {
                    ssfWriter.EndSSFFile();
                }

                ssfWriter = null;
            }
            if (gpsTrimble != null)
            {
                if (gpsTrimble.IsTracking())
                {
                    gpsTrimble.StopTracking();
                }

                gpsTrimble = null;
            }
        }