/// <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); }
/// <summary> /// 发送行到串口 /// </summary> /// <param name="Line"></param> private void SendSerialLineToUIThread(string Line) { GPS.ProcessNmeaData(Line); }