示例#1
0
        /// <summary>
        /// 初始化一个请求器。
        /// </summary>
        public void Init()
        {
            Setting.ReceivingTimeOfNtripData = Geo.Times.Time.UtcNow;

            //解析器
            this.Rtcm3DataReceiver = new Rtcm.Rtcm3DataReceiver();
            this.RtcmDataParser    = new RtcmDataParser(NtripMountPoint);
            this.RtGnssDataWriter  = new RealTimeGnssDataWriter(this.Option.LocalDirectory, NtripMountPoint, Setting.ReceivingTimeOfNtripData);
            this.RtGnssDataWriter.BindRealTimeGnssDataProvider(this.RtcmDataParser);

            this.RtcmDataParser.EpochObservationReceived += RtcmDataParser_EpochObservationReceived;
            this.RtcmDataParser.ObsHeaderUpdated         += RtcmDataParser_ObsHeaderUpdated;
            this.RtcmDataParser.EphemerisInfoReceived    += RtcmDataParser_EphemerisInfoReceived;
            this.RtcmDataParser.GlonassNavRecordReceived += RtcmDataParser_GlonassNavRecordReceived;
            this.Rtcm3DataReceiver.ContentReceived       += Rtcm3DataReceiver_ContentReceived;

            //是一个处理测试??
            GPS.ProcessNmeaData("$GPGGA,,,,,,0,00,,,M,,M,,*66");
            GPS.GenerateGPGGAcode();
            NtripDataRequestor = new Ntrip.NtripDataRequestor(this.Option, this.GPS);
            NtripDataRequestor.NtripDataStateChanged += NtripDataStateChangedEventHander;

            RealTimeGnssPositioner = new RealTimeGnssPositioner(GnssSolverType, this.Option.LocalDirectory, NtripMountPoint, Setting.ReceivingTimeOfNtripData);
            RealTimeGnssPositioner.BindRealTimeGnssDataProvider(this.RtcmDataParser);
        }
示例#2
0
        /// <summary>
        /// 附加GGA的请求
        /// </summary>
        private void RequestWithGga()
        {
            string TheGGA = "";

            if (this.Option.UseManualGGA)
            {
                TheGGA = GPS.GenerateGPGGAcode(); //This function runs in the NTRIP thread.
                //NeedsToSendGGA = False 'Only needs to be once when using a manual GGA
            }
            else
            {
                TheGGA = MostRecentGGA;
            }
            this.NetDataReceiver.SendRequest(TheGGA + "\r\n");
        }