public ModisSourceProduct(string name, string baseUrl, SatelliteType sateType, ProductType prodType, ProjectType projType, int days) { productName = name; baseFtpUrl = baseUrl; satellite = sateType; productType = prodType; projectType = projType; observeInterval = days; }
public void SetSatelliteType(SatelliteType satType) { switch (satType) { case Gnsser.SatelliteType.C: (radioButton_beidou.Checked) = true; break; case Gnsser.SatelliteType.G: (radioButton_gps.Checked) = true; break; case Gnsser.SatelliteType.E: (radioButton_galileo.Checked) = true; break; case Gnsser.SatelliteType.R: (radioButton_glonass.Checked) = true; break; default: (radioButton_beidou.Checked) = true; break; } }
/// <summary> /// 获取指定系统的观测类型列表。返回引用,可以直接在上面添加数据。 /// 如果没有,则查看M类型,将 Mixed 的类型赋予给它。 /// </summary> /// <param name="satType"></param> /// <returns></returns> public List <string> GetOrInitObsCodes(SatelliteType satType) { if (!ObsCodes.ContainsKey(satType)) { var list = new List <string>(); if (ObsCodes.ContainsKey(SatelliteType.M)) { list = ObsCodes[SatelliteType.M]; } ObsCodes[satType] = list; } return(ObsCodes[satType]); }
/// <summary> /// MW 值。 /// </summary> /// <param name="L1"></param> /// <param name="L2"></param> /// <param name="P1"></param> /// <param name="P2"></param> /// <param name="type"></param> /// <returns></returns> public static double GetMwValue(double L1, double L2, double P1, double P2, SatelliteType type = SatelliteType.G) { double f1 = 0; double f2 = 0; switch (type) { case SatelliteType.G: f1 = Frequence.GpsL1.Value; f2 = Frequence.GpsL2.Value; break; default: throw new NotImplementedException("请实现 " + type); } return(GetMwValue(f1, f2, L1, L2, P1, P2)); }
private static SatelliteType ParseType(string snn) { SatelliteType SatelliteType = SatelliteType.U; //无标识符默认为GPS if (snn.StartsWith(" ") || snn.Length == 2 || snn.Length == 1) { SatelliteType = SatelliteType.G; } else { var type = snn.Substring(0, 1).ToUpper(); SatelliteType = Utils.EnumUtil.TryParse <SatelliteType>(type, SatelliteType.U); } return(SatelliteType); }
// Start is called before the first frame update void Start() { Vector3 ShipPosition = Ship.transform.position; print(mScript.GetDistance()); if (name == "Satellite1") { transform.position = ShipPosition + new Vector3(mScript.GetDistance(), 0, 0); GetComponent <Renderer>().material.color = Color.red; side = SatelliteType.red; } else if (name == "Satellite2") { transform.position = ShipPosition - new Vector3(mScript.GetDistance(), 0, 0); GetComponent <Renderer>().material.color = Color.blue; side = SatelliteType.blue; } }
/// <summary> /// 判断是否参数表示的星历 /// </summary> /// <param name="satType"></param> /// <returns></returns> public static bool IsEphemerisParam(SatelliteType satType) { if (satType == SatelliteType.E || satType == SatelliteType.C || satType == SatelliteType.G || satType == SatelliteType.J || satType == SatelliteType.I) { return(true); } if (satType == SatelliteType.S || satType == SatelliteType.R) { return(false); } throw new NotImplementedException("未实现。" + satType); }
public static double GetApproxSatRadius(SatelliteType type) { switch (type) { case SatelliteType.J: case SatelliteType.G: return 22000000; case SatelliteType.C: return 24000000; case SatelliteType.E: case SatelliteType.R: return 23000000; default: break; } return 22000000; throw new Exception("对不起,暂不支持其它的系统。"); //return GnssSystem.Gps; }
/// <summary> /// 根据类型和历元,按照给定的文件命名规则,读取本地文件 /// </summary> /// <param name="satType">卫星类型</param> /// <param name="gpsTime">时间</param> /// <returns></returns> protected virtual List <string> GetFiles(SatelliteType satType, Time gpsTime) { List <string> pathes = GetIgsProductLocalPathes(satType, gpsTime); List <string> services = new List <string>(); foreach (var path in pathes)//便利所有生产的路径,选择一个可用的 { if (!System.IO.File.Exists(path)) { log.Debug("不存在预期产品 " + this.IgsProductSourceType + ", " + path); continue; } try { var TargetExtention = "*" + IgsProductNameBuilder.GetFileExtension(IgsProductSourceType, gpsTime).TrimEnd('Z', '.'); var filePath = InputFileManager.GetLocalFilePath(path, TargetExtention, "*.*"); if (filePath == null) { continue; } FileInfo info = new FileInfo(path); if (info.Length == 0) { info.Delete(); continue; } //包含则添加 services.Add(path); } catch (Exception ex) { log.Error("文件解析错误," + path + ", " + ex.Message); } break; } return(services); }
/// <summary> /// 通过卫星类型获取GNSS系统实例。 /// </summary> /// <param name="type">卫星类型(采用RINEX格式描述)</param> /// <returns></returns> public static GnssSystem GetGnssSystem(SatelliteType type) { switch (type) { case SatelliteType.J: case SatelliteType.G: return GnssSystem.Gps; case SatelliteType.C: return GnssSystem.BeiDou; case SatelliteType.E: return GnssSystem.Galileo; case SatelliteType.R: return GnssSystem.Glonass; case SatelliteType.I: return GnssSystem.IRNSS_NAVIC; default: break; } throw new Exception("对不起,暂不支持其它的系统。"); //return GnssSystem.Gps; }
public CreateLayerViewModel(string path) { Path = path; ContrastEnhancement = true; SatelliteType = GetSatelliteType(path); if (SatelliteType != SatelliteType.None) { var fileWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(path); R = SatelliteType.IsRedBand(fileWithoutExtension); B = SatelliteType.IsBlueBand(fileWithoutExtension); G = SatelliteType.IsGreenBand(fileWithoutExtension); MinCutOff = 0.02; MaxCutOff = 0.98; } else { MinCutOff = 0; MaxCutOff = 1; } }
/// <summary> /// 获取系统频率数量,通过观测码判断,算法有待检验。 /// </summary> /// <param name="type"></param> /// <returns></returns> public int GetFrequenceCount(SatelliteType type = SatelliteType.G) { if (!this.SatelliteTypes.Contains(type)) { return(0); } var codes = this.ObsCodes[type]; List <int> sames = new List <int>(); foreach (var str in codes) { int num = Gdp.Utils.StringUtil.GetNumber(str); if (!sames.Contains(num)) { sames.Add(num); } } return(sames.Count);// .Count / 2; }
/// <summary> /// 建立按天组织的服务。一个系统类型一个服务。 /// 如果失败,则网络获取一次。 /// </summary> /// <param name="satType"></param> /// <returns></returns> protected List <string> CreateSatTypeBasedServices(SatelliteType satType) { List <string> dic = new List <string>(); //按天生产星历服务 for (var time = this.Option.TimePeriod.Start; time <= this.Option.TimePeriod.End; time = time + TimeSpan.FromSeconds(TimeIntervalSeconds)) { var files = GetFiles(satType, time); if (files != null && files.Count > 0) { dic.AddRange(files); } else { log.Warn("创建服务失败!" + IgsProductSourceType + ", " + time); log.Info("即将尝试获取远程数据源...."); if (!Setting.IsNetEnabled) { log.Warn("网络不可用或未启用,无法下载!"); return(dic); } //如果为空,则下载文件继续,一次下载机会 DownloadProduct(time, satType); files = GetFiles(satType, time); if (files != null) { dic.AddRange(files); } if (files.Count > 0 && !Option.IsDownloadingSurplurseIgsProducts) { log.Info("已经具有 " + files.Count + " 个服务,且设置为不下载多余产品,取消继续下载。"); return(dic); } } } return(dic); }
/// <summary> /// 以第一个系统为基准 /// </summary> /// <param name="satTypes"></param> /// <returns></returns> public List <String> GetSysTimeRagneDifferName(List <SatelliteType> satTypes) { if (satTypes == null || satTypes.Count <= 1) { return(new List <string>()); } var list = new List <String>(); SatelliteType first = satTypes[0]; foreach (var type in satTypes) { if (first == type) { continue; } var name = GetSysTimeRagneDifferName(first, type); list.Add(name); } return(list); }
/// <summary> /// 负责生成 路径,并不检查路径的存在性。 /// </summary> /// <param name="satelliteType">系统类型</param> /// <param name="time">时间</param> /// <returns></returns> public List <string> Get(SatelliteType satelliteType, Time time) { List <string> pathes = new List <string>(); if (SourceNameDic.ContainsKey(satelliteType)) { List <string> sourceNames = SourceNameDic[satelliteType]; foreach (var name in sourceNames) { var fileNames = new IgsProductNameBuilder(name, IgsProductSourceType, IsWeekly).Get(time).FilePathes; foreach (var fileName in fileNames) { foreach (var dir in ProductDirectories) { string sp3Path = Path.Combine(dir, fileName); pathes.Add(sp3Path); } } } } return(pathes); }
public static Satelite From(SatelliteType type, int teamId = defaultTeamId) { var satelite = InstantiateSaleliteBase(teamId); switch (type) { case SatelliteType.Attack: MakeAttackSatellite(satelite); SetColor(teamId, AddChild(satelite, Factory.graphics_satellite_att)); satelite.GetValues().SetCost(175); break; case SatelliteType.SelfRepairing: MakeTransmitSatelite(satelite); MakeSelfRepairingTransmitSatelite(satelite); SetColor(teamId, AddChild(satelite, Factory.graphics_satellite_repair)); satelite.GetValues().SetCost(300); break; case SatelliteType.Armored: MakeTransmitSatelite(satelite); MakeArmoredSatelite(satelite); SetColor(teamId, AddChild(satelite, Factory.graphics_satellite_def)); satelite.GetValues().SetCost(250); break; case SatelliteType.Transmit: default: MakeTransmitSatelite(satelite); SetColor(teamId, AddChild(satelite, Factory.graphics_satellite_trans)); satelite.GetValues().SetCost(125); break; } return(satelite); }
/// <summary> /// 计算各频率对应的 RINEX 编号,有的是一对多的关系。 /// </summary> /// <param name="type"></param> /// <returns></returns> public static Dictionary <FrequenceType, List <int> > GetRinexFreqIndexDic(SatelliteType type) { if (CasheOfRinexFreqIndexDics != null && CasheOfRinexFreqIndexDics.ContainsKey(type)) { return(CasheOfRinexFreqIndexDics[type]); } lock (freqLocker) { if (CasheOfRinexFreqIndexDics != null && CasheOfRinexFreqIndexDics.ContainsKey(type)) { return(CasheOfRinexFreqIndexDics[type]); } Dictionary <FrequenceType, List <int> > result = new Dictionary <FrequenceType, List <int> >(); switch (type) { case SatelliteType.S: case SatelliteType.G: result[FrequenceType.A] = new List <int>() { 1 }; result[FrequenceType.B] = new List <int>() { 2 }; result[FrequenceType.C] = new List <int>() { 5 }; break; case SatelliteType.R: result[FrequenceType.A] = new List <int>() { 1 }; result[FrequenceType.B] = new List <int>() { 2 }; result[FrequenceType.C] = new List <int>() { 3 }; break; case SatelliteType.E: result[FrequenceType.A] = new List <int>() { 1 }; result[FrequenceType.B] = new List <int>() { 5 }; result[FrequenceType.C] = new List <int>() { 7 }; result[FrequenceType.D] = new List <int>() { 8 }; result[FrequenceType.E] = new List <int>() { 6 }; break; case SatelliteType.C: //215786 result[FrequenceType.A] = new List <int>() { 2, 1 }; // result[FrequenceType.B] = new List<int>() { 1 }; result[FrequenceType.C] = new List <int>() { 7 }; // result[FrequenceType.D] = new List <int>() { 6 }; break; case SatelliteType.J: result[FrequenceType.A] = new List <int>() { 1 }; result[FrequenceType.B] = new List <int>() { 2 }; result[FrequenceType.C] = new List <int>() { 5 }; result[FrequenceType.D] = new List <int>() { 6 }; break; case SatelliteType.D: break; case SatelliteType.I: break; default: result[FrequenceType.A] = new List <int>() { 1 }; result[FrequenceType.B] = new List <int>() { 2 }; result[FrequenceType.C] = new List <int>() { 5 }; break; } CasheOfRinexFreqIndexDics[type] = result; return(result); } }
/// <summary> /// 根据对应关系获取频率编号,RINEX转换为GNSSer编号。 /// </summary> /// <param name="type"></param> /// <param name="rinexNum"></param> /// <returns></returns> static public FrequenceType GetFrequenceType(SatelliteType type, int rinexNum) { Dictionary <FrequenceType, List <int> > dic = GetRinexFreqIndexDic(type); return(GetFrequenceType(dic, rinexNum)); }
/// <summary> /// 获取已知的频率带宽。 /// </summary> /// <param name="type">类型</param> /// <param name="index">编号,1、2、3 分别代表各系统的频率如GPS的L1、L2、L5</param> /// <param name="satNumber">卫星编号,GLONASS 系统需要</param> public static Frequence GetFrequenceBand(SatelliteType type, int index = 1, int satNumber = -1) { return(GetFrequenceBand(type, index, satNumber)); }
/// <summary> /// 从时段和系统类型判断是否支持 /// </summary> /// <param name="satType"></param> /// <param name="satTime"></param> /// <returns></returns> public bool IsAvailable(SatelliteType satType, Time satTime) { return((SatelliteTypes.Contains(satType)) && TimePeriod.Contains(satTime)); }
/// <summary> /// 根据类型和历元,按照给定的文件命名规则,读取本地文件 /// </summary> /// <param name="satType">卫星类型</param> /// <param name="gpsTime">时间</param> /// <returns></returns> protected virtual List <TIgsProductFile> GetFiles(SatelliteType satType, Time gpsTime) { List <string> pathes = GetIgsProductLocalPathes(satType, gpsTime); List <TIgsProductFile> services = new List <TIgsProductFile>(); foreach (var path in pathes)//便利所有生产的路径,选择一个可用的 { if (!System.IO.File.Exists(path)) { log.Debug("不存在预期产品 " + this.IgsProductSourceType + ", " + path); continue; } try { var TargetExtention = "*" + IgsProductNameBuilder.GetFileExtension(IgsProductSourceType, gpsTime).TrimEnd('Z', '.'); var filePath = InputFileManager.GetLocalFilePath(path, TargetExtention, "*.*"); if (filePath == null) { continue; } string fileBufferKey = BuildFileBufferKey(filePath); TIgsProductFile service = default(TIgsProductFile); if (LoadedIgsProductFiles.Contains(fileBufferKey)) { log.Info("缓存已经加载同名文件,直接从缓存返回: " + filePath); service = LoadedIgsProductFiles[fileBufferKey]; } else { service = LoadFile(filePath); if (service == null || service.TimePeriod.Span == 0) { log.Info("数据源" + service + "不可用 " + this.IgsProductSourceType + "," + filePath); continue; } log.Info("成功载入 " + this.IgsProductSourceType + "," + filePath); if (LoadedIgsProductFiles.Count > Option.MaxIgsProductCacheCount) { LoadedIgsProductFiles.RemoveFirst(); //LoadedIgsProductFiles.Clear(); //log.Info("IGS 缓存产品超过最大数量 " + Option.MaxIgsProductCacheCount + ", 清空缓存重新来过。"); } LoadedIgsProductFiles[fileBufferKey] = service; } //包含则添加 services.Add(service); } catch (Exception ex) { log.Error("文件解析错误," + path + ", " + ex.Message); } break; } return(services); }
private void ImportTrainingSet() { // Create an instance of the open file dialog box. var openFileDialog = new OpenFileDialog { Filter = @"Txt Files (.txt)|*.txt", FilterIndex = 1 }; // Call the ShowDialog method to show the dialog box. var userClickedOk = openFileDialog.ShowDialog(); // Process input if the user clicked OK. if (userClickedOk == DialogResult.OK) { FeaturesViewModel.RemoveAllFeatures(); using (var file = new StreamReader(openFileDialog.FileName)) { int numLandcoverTypes = int.Parse(file.ReadLine()); Dictionary <int, LandcoverTypeViewModel> landCoverTypes = new Dictionary <int, LandcoverTypeViewModel>(); for (int i = 0; i < numLandcoverTypes; ++i) { int id = int.Parse(file.ReadLine()); string name = file.ReadLine(); Color color = (Color)ColorConverter.ConvertFromString(file.ReadLine()); LandcoverTypeViewModel landcoverType = new LandcoverTypeViewModel(id, name, color); landCoverTypes.Add(id, landcoverType); } int numLayers = int.Parse(file.ReadLine()); var layers = new List <CreateLayerViewModel>(); for (int i = 0; i < numLayers; ++i) { string path = file.ReadLine(); bool contrastEnhancement = bool.Parse(file.ReadLine()); SatelliteType satelliteType = (SatelliteType)Enum.Parse(typeof(SatelliteType), file.ReadLine()); bool isRed = bool.Parse(file.ReadLine()); bool isGreen = bool.Parse(file.ReadLine()); bool isBlue = bool.Parse(file.ReadLine()); double minCutPercentage = double.Parse(file.ReadLine()); double maxCutPercentage = double.Parse(file.ReadLine()); layers.Add(new CreateLayerViewModel(path, contrastEnhancement, satelliteType, isRed, isGreen, isBlue, minCutPercentage, maxCutPercentage));; } var missingLayers = layers.Where(s => _mainWindowViewModel.Layers.All(b => b.Path != s.Path)).ToList(); // Check if some bands have to be added. if (missingLayers.Count > 0) { var dialog = new AddLayersDialog(); if (dialog.ShowImportMissingBandsDialog(missingLayers) == true && dialog.DialogViewModel.Layers.Count > 0) { var loadBandsTask = new LoadBandsTask(_mainWindowViewModel, dialog.DialogViewModel); _mainWindowViewModel.ExecuteLongRunningTask(loadBandsTask); } else { // Abort import return; } } _mainWindowViewModel.LandcoverTypes = landCoverTypes.ToImmutableDictionary(); _mainWindowViewModel.SelectedLandCoverTypeViewModel = _mainWindowViewModel.LandcoverTypes.Values.FirstOrDefault(); string featureLine; while ((featureLine = file.ReadLine()) != null) { string[] positionTypeIntensities = featureLine.Split(' '); string position = positionTypeIntensities[0]; string[] coordinates = position.Split(','); var landCoverType = _mainWindowViewModel.LandcoverTypes.Values.ToList().FindIndex(t => t.Id == int.Parse(positionTypeIntensities[1])); var intensities = positionTypeIntensities[2].Split(';').Select(ushort.Parse).ToArray(); FeaturesViewModel.AddFeature(new ClassifiedFeatureVectorViewModel(new ClassifiedFeatureVector(landCoverType, new FeatureVector(intensities), new Point(double.Parse(coordinates[0]), double.Parse(coordinates[1]))))); } } } }
/// <summary> /// 构造函数 /// </summary> /// <param name="prn"></param> /// <param name="type">请显示指定,避免错误</param> public SatelliteNumber(SatelliteType type, int prn)// = Gnsser.SatelliteType.U { this.PRN = prn; this.SatelliteType = type; }
/// <summary> /// 建立按天组织的服务。一个系统类型一个服务。 /// 如果失败,则网络获取一次。 /// </summary> /// <param name="satType"></param> /// <returns></returns> protected Dictionary <string, List <TIgsProductFile> > CreateSatTypeBasedServices(SatelliteType satType) { Dictionary <string, List <TIgsProductFile> > dic = new Dictionary <string, List <TIgsProductFile> >(); //按天生产星历服务 for (var time = this.Option.TimePeriod.Start; time <= this.Option.TimePeriod.End; time = time + TimeSpan.FromSeconds(TimeIntervalSeconds)) { var files = GetFiles(satType, time); if (files != null && files.Count != 0) { AddToDic(dic, files); } else { log.Warn("创建服务失败!" + IgsProductSourceType + ", " + time); log.Info("即将尝试获取远程数据源...."); if (!Setting.IsNetEnabled) { log.Warn("网络不可用或未启用,无法下载!"); return(dic); } //如果为空,则下载文件继续,一次下载机会 DownloadProduct(time, satType); files = GetFiles(satType, time); if (files != null) { AddToDic(dic, files); } if (dic.Count > 0 && !Option.IsDownloadingSurplurseIgsProducts) { log.Info("已经具有 " + dic.Count + " 个服务,且设置为不下载多余产品,取消继续下载。"); return(dic); } } if (!IsConnectIgsProduct) { log.Info("计算选项设置为不拼接 IGS 产品,因此只采用起始历元的产品。"); break; } } return(dic); }
/// <summary> /// 构造函数 /// </summary> /// <param name="SatelliteType">卫星类型</param> /// <param name="CarrierNumber">载波序号</param> public RinexSatFrequency(SatelliteType SatelliteType, int CarrierNumber) { this.SatelliteType = SatelliteType; this.RinexCarrierNumber = CarrierNumber; }
/// <summary> /// 字符串 /// </summary> /// <returns></returns> public override string ToString() { return(SatelliteType.ToString() + RinexCarrierNumber.ToString("00")); }
private void gnssSystemSelectControl1_SatelliteTypeChanged(SatelliteType SatelliteType) { this.bindingSource_prns.DataSource = SatelliteNumber.GetPrns(SatelliteType, 35); }
/// <summary> /// RTCM MSM文件信息转换为观测文件信息.此处返回的是RINEX3.0的数据类型。 /// </summary> /// <param name="msg"></param> /// <param name="HeaderOfMSM"></param> /// <returns></returns> public RinexEpochObservation GetRinexEpochObservation(BaseMSM msg, HeaderOfMSM HeaderOfMSM) { RinexEpochObservation RinexEpochObservation = new RinexEpochObservation(); uint messageNumber = HeaderOfMSM.MessageNumber; double wavelength = 0; int frequencyBand = 0; string str = null; string attribute = null; double P = 0, L = 0, D = 0, S = 0; int j = 0; int index = 0; double p = 0; SatelliteType satType = SatelliteType.G; for (int i = 0; i < HeaderOfMSM.SatCount; i++) { RinexSatObsData SatObsData = new RinexSatObsData(); for (int k = 0; k < HeaderOfMSM.Nsig; k++) { if (HeaderOfMSM.CellMask[index++] == 0) { continue; } if (messageNumber >= 1071 && messageNumber <= 1077)//GPS { satType = SatelliteType.G; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.G); str = msm_sig_gps[HeaderOfMSM.SignalMask[k] - 1]; frequencyBand = int.Parse(str.Substring(0, 1)); attribute = str.Substring(1, 1); if (frequencyBand == 1) { wavelength = Frequence.GpsL1.WaveLength; } else if (frequencyBand == 2) { wavelength = Frequence.GpsL2.WaveLength; } else if (frequencyBand == 5) { wavelength = Frequence.GpsL5.WaveLength; } } else if (messageNumber >= 1081 && messageNumber <= 1087)//GLONASS { satType = SatelliteType.R; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.R); } else if (messageNumber >= 1091 && messageNumber <= 1097)//GALILEO { satType = SatelliteType.E; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.E); } else if (messageNumber >= 1101 && messageNumber <= 1017)//SBS { satType = SatelliteType.S; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.S); } else if (messageNumber >= 1111 && messageNumber <= 1117)//QZS { satType = SatelliteType.J; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.J); } else if (messageNumber >= 1121 && messageNumber <= 1127)//BDS { satType = SatelliteType.C; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.C); str = msm_sig_gps[HeaderOfMSM.SignalMask[k] - 1]; frequencyBand = int.Parse(str.Substring(0, 1)); attribute = str.Substring(1, 1); if (frequencyBand == 2) { wavelength = Frequence.CompassB1.WaveLength; } else if (frequencyBand == 6) { wavelength = Frequence.CompassB3.WaveLength; } else if (frequencyBand == 7) { wavelength = Frequence.CompassB2.WaveLength; } } var ObservationCodeOfC = new ObservationCode(ObservationType.C, frequencyBand, attribute); var ObservationCodeOfL = new ObservationCode(ObservationType.L, frequencyBand, attribute); var ObservationCodeOfS = new ObservationCode(ObservationType.S, frequencyBand, attribute); var ObservationCodeOfD = new ObservationCode(ObservationType.D, frequencyBand, attribute); if (msg.NumberOfIntegerMsInSatRoughRange.Count != 0) { p = msg.NumberOfIntegerMsInSatRoughRange[i] * 0.001 + msg.SatelliteRoughRangesModulo1ms[i] * Math.Pow(2, -13); } else { p = msg.SatelliteRoughRangesModulo1ms[i] * Math.Pow(2, -13); } if (msg.SignalFinePseudorange.Count != 0) { P = msg.SignalFinePseudorange[j] * Math.Pow(2, -24) + p; } else if (msg.SignalFinePseudorangeWithExtendedResolution.Count != 0) { P = msg.SignalFinePseudorangeWithExtendedResolution[j] * Math.Pow(2, -29) + p; } P = P * RtcmConst.LightSpeedPerMillisecond; if (msg.SignalFinePhaseRange.Count != 0) { L = msg.SignalFinePhaseRange[j] * Math.Pow(2, -29) + p; } else if (msg.SignalFinePhaseRangeWithExtendedResolution.Count != 0) { L = msg.SignalFinePhaseRangeWithExtendedResolution[j] * Math.Pow(2, -31) + p; } L = L * RtcmConst.LightSpeedPerMillisecond / wavelength; if (msg.PhaseRangeLockTimeIndicator.Count != 0) { S = msg.PhaseRangeLockTimeIndicator[j]; } else if (msg.PhaseRangeLockTimeIndicatorWithExtendedRangeAndResolution[j] != 0) { S = msg.PhaseRangeLockTimeIndicatorWithExtendedRangeAndResolution[j]; } if (messageNumber % 10 == 5 || messageNumber % 10 == 7 && msg.SatRoughPhaseRangeRate.Count != 0) { if (msg.SatRoughPhaseRangeRate[i] > -1638.4) { D = -(msg.SatRoughPhaseRangeRate[i] * 0.001 + msg.SignalFinePhaseRangeRate[j] * 0.0001) / wavelength; } } SatObsData.Add(ObservationCodeOfC.ToString(), P); SatObsData.Add(ObservationCodeOfL.ToString(), L); SatObsData.Add(ObservationCodeOfS.ToString(), S); SatObsData.Add(ObservationCodeOfD.ToString(), D); //更新头部信息 var obsCodes = new List <string>(); obsCodes.Add(ObservationCodeOfC.ToString()); obsCodes.Add(ObservationCodeOfL.ToString()); obsCodes.Add(ObservationCodeOfS.ToString()); obsCodes.Add(ObservationCodeOfD.ToString()); if (ObsHeader != null) { ObsHeader.ObsCodes[satType] = obsCodes; } j++; } RinexEpochObservation.Add(SatObsData.Prn, SatObsData); } RinexEpochObservation.Header = ObsHeader; RinexEpochObservation.ReceiverTime = HeaderOfMSM.EpochTime; return(RinexEpochObservation); }
public String GetSysTimeRagneDifferName(SatelliteType satA, SatelliteType satB) { return("" + ParamNames.SysTimeDistDifferOf + satA + satB); }
/// <summary> /// 创建默认 /// </summary> /// <param name="key"></param> /// <returns></returns> public override ServiceHoulder <TService> Create(SatelliteType key) { return(new ServiceHoulder <TService>(MaxHoulderCount)); }
public void SetSatelliteType(SatelliteType satType) { gnssSystemSelectControl1.SetSatelliteType(satType); }