|
@@ -46,384 +46,392 @@ namespace XdCxRhDW.Sender
|
|
|
return;
|
|
|
}
|
|
|
string tskType = txtTskType.EditValue.ToString();
|
|
|
- using (var client = new HttpClient())
|
|
|
+ await Task.Run(async () =>
|
|
|
{
|
|
|
- try
|
|
|
+ while (true)
|
|
|
{
|
|
|
- string url = string.Format("http://{0}:{1}/Api/Pos/", ip, port);
|
|
|
- if (tskType == "X1D1CX")//一星一地测向定位
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ using (var client = new HttpClient())
|
|
|
{
|
|
|
- var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
- int idx = 1;
|
|
|
- url += "PosX1D1Async";
|
|
|
- foreach (var line in lines)
|
|
|
+ try
|
|
|
{
|
|
|
- if (cts1.IsCancellationRequested)
|
|
|
- break;
|
|
|
- if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
- var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
- X1D1PosDto dto = new X1D1PosDto()
|
|
|
+ string url = string.Format("http://{0}:{1}/Api/Pos/", ip, port);
|
|
|
+ if (tskType == "X1D1CX")//一星一地测向定位
|
|
|
{
|
|
|
- SigTime = DateTime.Now,
|
|
|
- MainCode = 23467,
|
|
|
- XdDto = Convert.ToDouble(items[1]) * 1e6,
|
|
|
- MainYbDto = Convert.ToDouble(items[2]) * 1e6,
|
|
|
- CxRes = Convert.ToDouble(items[4]),
|
|
|
- MainX = Convert.ToDouble(items[7]),
|
|
|
- MainY = Convert.ToDouble(items[8]),
|
|
|
- MainZ = Convert.ToDouble(items[9]),
|
|
|
- SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon"),
|
|
|
- SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat"),
|
|
|
- CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon"),
|
|
|
- CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat"),
|
|
|
- CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon"),
|
|
|
- CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat"),
|
|
|
- RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon"),
|
|
|
- RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat"),
|
|
|
- };
|
|
|
- //var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
|
|
|
- //var response = await client.PostAsync(url, content);
|
|
|
- var result =await HttpHelper.PostRequestAsync<PosResDto>(url, dto);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
+ int idx = 1;
|
|
|
+ url += "PosX1D1Async";
|
|
|
+ foreach (var line in lines)
|
|
|
+ {
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
+ var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ X1D1PosDto dto = new X1D1PosDto()
|
|
|
+ {
|
|
|
+ SigTime = DateTime.Now,
|
|
|
+ MainCode = 23467,
|
|
|
+ XdDto = Convert.ToDouble(items[1]) * 1e6,
|
|
|
+ MainYbDto = Convert.ToDouble(items[2]) * 1e6,
|
|
|
+ CxRes = Convert.ToDouble(items[4]),
|
|
|
+ MainX = Convert.ToDouble(items[7]),
|
|
|
+ MainY = Convert.ToDouble(items[8]),
|
|
|
+ MainZ = Convert.ToDouble(items[9]),
|
|
|
+ SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon"),
|
|
|
+ SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat"),
|
|
|
+ CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon"),
|
|
|
+ CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat"),
|
|
|
+ CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon"),
|
|
|
+ CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat"),
|
|
|
+ RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon"),
|
|
|
+ RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat"),
|
|
|
+ };
|
|
|
+ //var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
|
|
|
+ //var response = await client.PostAsync(url, content);
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, dto);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
+ }
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
- }
|
|
|
- }
|
|
|
- if (tskType == "X2D1")//两星一地定位
|
|
|
- {
|
|
|
- //url += "PosX2D1Async";
|
|
|
- //var res = X2D1();
|
|
|
- //var content = new StringContent(JsonConvert.SerializeObject(res), System.Text.Encoding.UTF8, "application/json");
|
|
|
- //var response = await client.PostAsync(url, content);
|
|
|
- //Log($"已向[{txtAddr1.Text}]发送两星一地定位仿真结果");
|
|
|
+ if (tskType == "X2D1")//两星一地定位
|
|
|
+ {
|
|
|
+ //url += "PosX2D1Async";
|
|
|
+ //var res = X2D1();
|
|
|
+ //var content = new StringContent(JsonConvert.SerializeObject(res), System.Text.Encoding.UTF8, "application/json");
|
|
|
+ //var response = await client.PostAsync(url, content);
|
|
|
+ //Log($"已向[{txtAddr1.Text}]发送两星一地定位仿真结果");
|
|
|
|
|
|
- var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
- int idx = 1;
|
|
|
- url += "PosX2D1Async";
|
|
|
- foreach (var line in lines)
|
|
|
- {
|
|
|
- if (cts1.IsCancellationRequested)
|
|
|
- break;
|
|
|
- if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
- var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
- X2D1PosDto X2D1PosDto = new X2D1PosDto();
|
|
|
- X2D1PosDto.SigTime = DateTime.Now;
|
|
|
- X2D1PosDto.MainCode = 23467;
|
|
|
- X2D1PosDto.AdjaCode = 39206;
|
|
|
- X2D1PosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
- X2D1PosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
- X2D1PosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
- X2D1PosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
- X2D1PosDto.MainX = Convert.ToDouble(items[7]);
|
|
|
- X2D1PosDto.MainY = Convert.ToDouble(items[8]);
|
|
|
- X2D1PosDto.MainZ = Convert.ToDouble(items[9]);
|
|
|
- X2D1PosDto.AdjaX = Convert.ToDouble(items[10]);
|
|
|
- X2D1PosDto.AdjaY = Convert.ToDouble(items[11]);
|
|
|
- X2D1PosDto.AdjaZ = Convert.ToDouble(items[12]);
|
|
|
- X2D1PosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
- X2D1PosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
- X2D1PosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
- X2D1PosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
- X2D1PosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
- X2D1PosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
- //var content = new StringContent(JsonConvert.SerializeObject(X2D1PosDto), System.Text.Encoding.UTF8, "application/json");
|
|
|
- //var response = await client.PostAsync(url, content);
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, X2D1PosDto);
|
|
|
- if (result.code != 200)
|
|
|
+ var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
+ int idx = 1;
|
|
|
+ url += "PosX2D1Async";
|
|
|
+ foreach (var line in lines)
|
|
|
+ {
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
+ var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ X2D1PosDto X2D1PosDto = new X2D1PosDto();
|
|
|
+ X2D1PosDto.SigTime = DateTime.Now;
|
|
|
+ X2D1PosDto.MainCode = 23467;
|
|
|
+ X2D1PosDto.AdjaCode = 39206;
|
|
|
+ X2D1PosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
+ X2D1PosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
+ X2D1PosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
+ X2D1PosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
+ X2D1PosDto.MainX = Convert.ToDouble(items[7]);
|
|
|
+ X2D1PosDto.MainY = Convert.ToDouble(items[8]);
|
|
|
+ X2D1PosDto.MainZ = Convert.ToDouble(items[9]);
|
|
|
+ X2D1PosDto.AdjaX = Convert.ToDouble(items[10]);
|
|
|
+ X2D1PosDto.AdjaY = Convert.ToDouble(items[11]);
|
|
|
+ X2D1PosDto.AdjaZ = Convert.ToDouble(items[12]);
|
|
|
+ X2D1PosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
+ X2D1PosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
+ X2D1PosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
+ X2D1PosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
+ X2D1PosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
+ X2D1PosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
+ //var content = new StringContent(JsonConvert.SerializeObject(X2D1PosDto), System.Text.Encoding.UTF8, "application/json");
|
|
|
+ //var response = await client.PostAsync(url, content);
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, X2D1PosDto);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (tskType == "X2D1NoPar")//两星一地无参定位
|
|
|
{
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ url += "PosX2D1NoParAsync";
|
|
|
+ var res = X2D1NoPar();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送两星一地无参定位仿真结果");
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
- }
|
|
|
- }
|
|
|
- if (tskType == "X2D1NoPar")//两星一地无参定位
|
|
|
- {
|
|
|
- url += "PosX2D1NoParAsync";
|
|
|
- var res = X2D1NoPar();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送两星一地无参定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "RH")//融合定位
|
|
|
- {
|
|
|
- var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
- int idx = 1;
|
|
|
- url += "PosRHAsync";
|
|
|
- foreach (var line in lines)
|
|
|
- {
|
|
|
- if (cts1.IsCancellationRequested)
|
|
|
- break;
|
|
|
- if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
- var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
- RHPosDto RHPosDto = new RHPosDto();
|
|
|
- RHPosDto.SigTime = DateTime.Now;
|
|
|
- RHPosDto.MainCode = 23467;
|
|
|
- RHPosDto.AdjaCode = 39206;
|
|
|
- RHPosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
- RHPosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
- RHPosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
- RHPosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
- RHPosDto.CxRes = Convert.ToDouble(items[4]);
|
|
|
- RHPosDto.MainX = Convert.ToDouble(items[7]);
|
|
|
- RHPosDto.MainY = Convert.ToDouble(items[8]);
|
|
|
- RHPosDto.MainZ = Convert.ToDouble(items[9]);
|
|
|
- RHPosDto.AdjaX = Convert.ToDouble(items[10]);
|
|
|
- RHPosDto.AdjaY = Convert.ToDouble(items[11]);
|
|
|
- RHPosDto.AdjaZ = Convert.ToDouble(items[12]);
|
|
|
- RHPosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
- RHPosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
- RHPosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
- RHPosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
- RHPosDto.CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon");
|
|
|
- RHPosDto.CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat");
|
|
|
- RHPosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
- RHPosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, RHPosDto);
|
|
|
- if (result.code != 200)
|
|
|
+ if (tskType == "RH")//融合定位
|
|
|
{
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
+ int idx = 1;
|
|
|
+ url += "PosRHAsync";
|
|
|
+ foreach (var line in lines)
|
|
|
+ {
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
+ var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ RHPosDto RHPosDto = new RHPosDto();
|
|
|
+ RHPosDto.SigTime = DateTime.Now;
|
|
|
+ RHPosDto.MainCode = 23467;
|
|
|
+ RHPosDto.AdjaCode = 39206;
|
|
|
+ RHPosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
+ RHPosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
+ RHPosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
+ RHPosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
+ RHPosDto.CxRes = Convert.ToDouble(items[4]);
|
|
|
+ RHPosDto.MainX = Convert.ToDouble(items[7]);
|
|
|
+ RHPosDto.MainY = Convert.ToDouble(items[8]);
|
|
|
+ RHPosDto.MainZ = Convert.ToDouble(items[9]);
|
|
|
+ RHPosDto.AdjaX = Convert.ToDouble(items[10]);
|
|
|
+ RHPosDto.AdjaY = Convert.ToDouble(items[11]);
|
|
|
+ RHPosDto.AdjaZ = Convert.ToDouble(items[12]);
|
|
|
+ RHPosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
+ RHPosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
+ RHPosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
+ RHPosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
+ RHPosDto.CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon");
|
|
|
+ RHPosDto.CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat");
|
|
|
+ RHPosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
+ RHPosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, RHPosDto);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (tskType == "X3TwoDto")//三星双时差定位
|
|
|
+ {
|
|
|
+ url += "PosX3TwoDtoAsync";
|
|
|
+ var res = X3TwoDto();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
+ }
|
|
|
+ if (tskType == "X3TwoDtoNoPar")//三星双时差无参定位
|
|
|
+ {
|
|
|
+ url += "PosX3TwoDtoNoParAsync";
|
|
|
+ var res = X3TwoDtoNoPar();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
+ }
|
|
|
+ if (tskType == "X3TwoDfo")//三星双频差定位
|
|
|
+ {
|
|
|
+ url += "PosX3TwoDfoAsync";
|
|
|
+ var res = X3TwoDfo();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送三星双频差定位仿真结果");
|
|
|
+ }
|
|
|
+ if (tskType == "X2Dfo")//双星时频差定位
|
|
|
+ {
|
|
|
+ url += "PosX2DtoDfoAsync";
|
|
|
+ var res = X2Dfo();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送双星时频差定位仿真结果");
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
- }
|
|
|
- }
|
|
|
- if (tskType == "X3TwoDto")//三星双时差定位
|
|
|
- {
|
|
|
- url += "PosX3TwoDtoAsync";
|
|
|
- var res = X3TwoDto();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "X3TwoDtoNoPar")//三星双时差无参定位
|
|
|
- {
|
|
|
- url += "PosX3TwoDtoNoParAsync";
|
|
|
- var res = X3TwoDtoNoPar();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "X3TwoDfo")//三星双频差定位
|
|
|
- {
|
|
|
- url += "PosX3TwoDfoAsync";
|
|
|
- var res = X3TwoDfo();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送三星双频差定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "X2Dfo")//双星时频差定位
|
|
|
- {
|
|
|
- url += "PosX2DtoDfoAsync";
|
|
|
- var res = X2Dfo();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送双星时频差定位仿真结果");
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if (tskType == "X1D1CXNoXL")//一星一地测向定位无星厉
|
|
|
- {
|
|
|
- var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
- int idx = 1;
|
|
|
- url += "PosX1D1NoXlAsync";
|
|
|
- foreach (var line in lines)
|
|
|
- {
|
|
|
- if (cts1.IsCancellationRequested)
|
|
|
- break;
|
|
|
- if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
- var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
- X1D1NoXlPosDto dto = new X1D1NoXlPosDto()
|
|
|
+ if (tskType == "X1D1CXNoXL")//一星一地测向定位无星厉
|
|
|
{
|
|
|
- SigTime = DateTime.Now,
|
|
|
- MainCode = 23467,
|
|
|
- XdDto = Convert.ToDouble(items[1]) * 1e6,
|
|
|
- MainYbDto = Convert.ToDouble(items[2]) * 1e6,
|
|
|
- CxRes = Convert.ToDouble(items[4]),
|
|
|
- SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon"),
|
|
|
- SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat"),
|
|
|
- CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon"),
|
|
|
- CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat"),
|
|
|
- CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon"),
|
|
|
- CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat"),
|
|
|
- RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon"),
|
|
|
- RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat"),
|
|
|
- };
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, dto);
|
|
|
- if (result.code != 200)
|
|
|
+ var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
+ int idx = 1;
|
|
|
+ url += "PosX1D1NoXlAsync";
|
|
|
+ foreach (var line in lines)
|
|
|
+ {
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
+ var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ X1D1NoXlPosDto dto = new X1D1NoXlPosDto()
|
|
|
+ {
|
|
|
+ SigTime = DateTime.Now,
|
|
|
+ MainCode = 23467,
|
|
|
+ XdDto = Convert.ToDouble(items[1]) * 1e6,
|
|
|
+ MainYbDto = Convert.ToDouble(items[2]) * 1e6,
|
|
|
+ CxRes = Convert.ToDouble(items[4]),
|
|
|
+ SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon"),
|
|
|
+ SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat"),
|
|
|
+ CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon"),
|
|
|
+ CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat"),
|
|
|
+ CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon"),
|
|
|
+ CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat"),
|
|
|
+ RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon"),
|
|
|
+ RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat"),
|
|
|
+ };
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, dto);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (tskType == "X2D1NoXL")//两星一地定位无星厉
|
|
|
{
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
+ int idx = 1;
|
|
|
+ url += "PosX2D1NoXlAsync";
|
|
|
+ foreach (var line in lines)
|
|
|
+ {
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
+ var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ X2D1NoXlPosDto X2D1NoXlPosDto = new X2D1NoXlPosDto();
|
|
|
+ X2D1NoXlPosDto.SigTime = DateTime.Now;
|
|
|
+ X2D1NoXlPosDto.MainCode = 23467;
|
|
|
+ X2D1NoXlPosDto.AdjaCode = 39206;
|
|
|
+ X2D1NoXlPosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
+ X2D1NoXlPosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
+ X2D1NoXlPosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
+ X2D1NoXlPosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
+ X2D1NoXlPosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
+ X2D1NoXlPosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
+ X2D1NoXlPosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
+ X2D1NoXlPosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
+ X2D1NoXlPosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
+ X2D1NoXlPosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, X2D1NoXlPosDto);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
+ Thread.Sleep(1000);
|
|
|
+ }
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
- }
|
|
|
- }
|
|
|
- if (tskType == "X2D1NoXL")//两星一地定位无星厉
|
|
|
- {
|
|
|
- var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
- int idx = 1;
|
|
|
- url += "PosX2D1NoXlAsync";
|
|
|
- foreach (var line in lines)
|
|
|
- {
|
|
|
- if (cts1.IsCancellationRequested)
|
|
|
- break;
|
|
|
- if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
- var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
- X2D1NoXlPosDto X2D1NoXlPosDto = new X2D1NoXlPosDto();
|
|
|
- X2D1NoXlPosDto.SigTime = DateTime.Now;
|
|
|
- X2D1NoXlPosDto.MainCode = 23467;
|
|
|
- X2D1NoXlPosDto.AdjaCode = 39206;
|
|
|
- X2D1NoXlPosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
- X2D1NoXlPosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
- X2D1NoXlPosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
- X2D1NoXlPosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
- X2D1NoXlPosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
- X2D1NoXlPosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
- X2D1NoXlPosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
- X2D1NoXlPosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
- X2D1NoXlPosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
- X2D1NoXlPosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, X2D1NoXlPosDto);
|
|
|
- if (result.code != 200)
|
|
|
+ if (tskType == "X2D1NoParNoXL")//两星一地无参定位无星厉
|
|
|
{
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ url += "PosX2D1NoXlNoParAsync";
|
|
|
+ var res = X2D1NoParNoXL();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送两星一地无参定位仿真结果");
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
- Thread.Sleep(1000);
|
|
|
- }
|
|
|
- }
|
|
|
- if (tskType == "X2D1NoParNoXL")//两星一地无参定位无星厉
|
|
|
- {
|
|
|
- url += "PosX2D1NoXlNoParAsync";
|
|
|
- var res = X2D1NoParNoXL();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送两星一地无参定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "RHNoXL")//融合定位无星厉
|
|
|
- {
|
|
|
- var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
- int idx = 1;
|
|
|
- url += "PosRhNoXlAsync";
|
|
|
- foreach (var line in lines)
|
|
|
- {
|
|
|
- if (cts1.IsCancellationRequested)
|
|
|
- break;
|
|
|
- if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
- var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
- RHNoXlPosDto RHNoXlPosDto = new RHNoXlPosDto();
|
|
|
- RHNoXlPosDto.SigTime = DateTime.Now;
|
|
|
- RHNoXlPosDto.MainCode = 23467;
|
|
|
- RHNoXlPosDto.AdjaCode = 39206;
|
|
|
- RHNoXlPosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
- RHNoXlPosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
- RHNoXlPosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
- RHNoXlPosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
- RHNoXlPosDto.CxRes = Convert.ToDouble(items[4]);
|
|
|
- RHNoXlPosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
- RHNoXlPosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
- RHNoXlPosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
- RHNoXlPosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
- RHNoXlPosDto.CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon");
|
|
|
- RHNoXlPosDto.CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat");
|
|
|
- RHNoXlPosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
- RHNoXlPosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, RHNoXlPosDto);
|
|
|
- if (result.code != 200)
|
|
|
+ if (tskType == "RHNoXL")//融合定位无星厉
|
|
|
{
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ var lines = File.ReadAllLines("Simulation_Data2023.dat");
|
|
|
+ int idx = 1;
|
|
|
+ url += "PosRhNoXlAsync";
|
|
|
+ foreach (var line in lines)
|
|
|
+ {
|
|
|
+ if (cts1.IsCancellationRequested)
|
|
|
+ break;
|
|
|
+ if (string.IsNullOrWhiteSpace(line)) continue;
|
|
|
+ var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
+ RHNoXlPosDto RHNoXlPosDto = new RHNoXlPosDto();
|
|
|
+ RHNoXlPosDto.SigTime = DateTime.Now;
|
|
|
+ RHNoXlPosDto.MainCode = 23467;
|
|
|
+ RHNoXlPosDto.AdjaCode = 39206;
|
|
|
+ RHNoXlPosDto.SxDto = Convert.ToDouble(items[0]) * 1e6;
|
|
|
+ RHNoXlPosDto.XdDto = Convert.ToDouble(items[1]) * 1e6;
|
|
|
+ RHNoXlPosDto.MainYbDto = Convert.ToDouble(items[2]) * 1e6;
|
|
|
+ RHNoXlPosDto.AdjaYbDto = Convert.ToDouble(items[3]) * 1e6;
|
|
|
+ RHNoXlPosDto.CxRes = Convert.ToDouble(items[4]);
|
|
|
+ RHNoXlPosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lon");
|
|
|
+ RHNoXlPosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "卫星接收天线", "Lat");
|
|
|
+ RHNoXlPosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lon");
|
|
|
+ RHNoXlPosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "超短波接收天线", "Lat");
|
|
|
+ RHNoXlPosDto.CxLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lon");
|
|
|
+ RHNoXlPosDto.CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat");
|
|
|
+ RHNoXlPosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon");
|
|
|
+ RHNoXlPosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat");
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, RHNoXlPosDto);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
+ }
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
|
|
|
- }
|
|
|
- }
|
|
|
- if (tskType == "X3TwoDtoNoXL")//三星双时差定位无星厉
|
|
|
- {
|
|
|
- url += "PosX3TwoDtoNoXlAsync";
|
|
|
- var res = X3TwoDtoNoXL();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "X3TwoDtoNoParNoXL")//三星双时差无参定位无星厉
|
|
|
- {
|
|
|
- url += "PosX3TwoDtoNoXlNoParAsync";
|
|
|
- var res = X3TwoDtoNoParNoXL();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
- }
|
|
|
- Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "X3TwoDfoNoXL")//三星双频差定位无星厉
|
|
|
- {
|
|
|
- url += "PosX3TwoDfoNoXlAsync";
|
|
|
- var res = X3TwoDfoNoXL();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
- {
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ if (tskType == "X3TwoDtoNoXL")//三星双时差定位无星厉
|
|
|
+ {
|
|
|
+ url += "PosX3TwoDtoNoXlAsync";
|
|
|
+ var res = X3TwoDtoNoXL();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
+ }
|
|
|
+ if (tskType == "X3TwoDtoNoParNoXL")//三星双时差无参定位无星厉
|
|
|
+ {
|
|
|
+ url += "PosX3TwoDtoNoXlNoParAsync";
|
|
|
+ var res = X3TwoDtoNoParNoXL();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送三星双时差定位仿真结果");
|
|
|
+ }
|
|
|
+ if (tskType == "X3TwoDfoNoXL")//三星双频差定位无星厉
|
|
|
+ {
|
|
|
+ url += "PosX3TwoDfoNoXlAsync";
|
|
|
+ var res = X3TwoDfoNoXL();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送三星双频差定位仿真结果");
|
|
|
+ }
|
|
|
+ if (tskType == "X2DfoNoXL")//双星时频差定位无星厉
|
|
|
+ {
|
|
|
+ url += "PosX2DtoDfoNoXlAsync";
|
|
|
+ var res = X2DfoNoXL();
|
|
|
+ var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
+ if (result.code != 200)
|
|
|
+ {
|
|
|
+ Log($"{result.msg}");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Log($"已向[{txtAddr1.Text}]发送双星时频差定位仿真结果");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送三星双频差定位仿真结果");
|
|
|
- }
|
|
|
- if (tskType == "X2DfoNoXL")//双星时频差定位无星厉
|
|
|
- {
|
|
|
- url += "PosX2DtoDfoNoXlAsync";
|
|
|
- var res = X2DfoNoXL();
|
|
|
- var result = await HttpHelper.PostRequestAsync<PosResDto>(url, res);
|
|
|
- if (result.code != 200)
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- Log($"{result.msg}");
|
|
|
- return;
|
|
|
+ Log($"向[{txtAddr1.Text}]发送结果失败.{ex.Message}");
|
|
|
}
|
|
|
- Log($"已向[{txtAddr1.Text}]发送双星时频差定位仿真结果");
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- Log($"向[{txtAddr1.Text}]发送结果失败.{ex.Message}");
|
|
|
+ await Task.Delay(1000);
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ });
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|