zoulei 1 년 전
부모
커밋
1e5d29d6f6

+ 3 - 2
Service/X3LeoTaskServer54/App.config

@@ -21,8 +21,9 @@
 
 
 		<!--卫星及星历-->
-		<add key ="MainSatInfo" value="23467,-41275189.6404,5820330.8446,6331022.0431"/>
-		<add key ="Adja1SatInfo" value="40892,4694560.4826,41891872.2374,47531.3795"/>
+		<add key ="MainSatInfo" value="23467,-41382191.9136000,5386554.56810000,5909229.48100000"/>
+		<add key ="Adja1SatInfo" value="40892,-38200978.7507000,17823454.4590000,17223.4116000000"/>
+		<add key ="Adja2SatInfo" value="44637,4750288.28780000,41880282.2295000,19391.6018000000"/>
 
 		<!--定位时差系数-->
 		<add key="PosDtoFactor" value="1"/>

+ 4 - 3
Service/X3LeoTaskServer54/AppDebug.config

@@ -21,11 +21,12 @@
 
 
 		<!--卫星及星历-->
-		<add key ="MainSatInfo" value="23467,-41275189.6404,5820330.8446,6331022.0431"/>
-		<add key ="Adja1SatInfo" value="40892,4694560.4826,41891872.2374,47531.3795"/>
+		<add key ="MainSatInfo" value="23467,-41382191.9136000,5386554.56810000,5909229.48100000"/>
+		<add key ="Adja1SatInfo" value="40892,-38200978.7507000,17823454.4590000,17223.4116000000"/>
+		<add key ="Adja2SatInfo" value="44637,4750288.28780000,41880282.2295000,19391.6018000000"/>
 
 		<!--定位时差系数-->
-		<add key="PosDtoFactor" value="-1"/>
+		<add key="PosDtoFactor" value="1"/>
 
 		<!--时差误差(单位:us)-->
 		<add key="DtoErrus" value="1"/>

+ 36 - 77
Service/X3LeoTaskServer54/Service/TaskService.cs

@@ -21,11 +21,10 @@ namespace X3LeoTaskServer54.Service
         string PosResDir;
         string StateDir;
         int MainSatCode;
-        double[] Time1XYZ, Time2XYZ, Time3XYZ;
+        double[] MainSatXYZ, Adja1SatXYZ, Adja2SatXYZ;
         int PosDtoFactor;
-        double DfoErrHz;
-        double EphPosErrM;
-        double EphVelErr;
+        double DtoErrus;
+        double EphErrm;
 
         public TaskService()
         {
@@ -42,12 +41,10 @@ namespace X3LeoTaskServer54.Service
             var PosDtoFactorstr = ConfigurationManager.AppSettings["PosDtoFactor"].Trim();
             int.TryParse(PosDtoFactorstr, out PosDtoFactor);
             if (PosDtoFactor == 0) PosDtoFactor = 1;
-            var DfoErrusstr = ConfigurationManager.AppSettings["DfoErr"].Trim();
-            double.TryParse(DfoErrusstr, out DfoErrHz);
-            var EphPosErrstr = ConfigurationManager.AppSettings["EphPosErr"].Trim();
-            double.TryParse(EphPosErrstr, out EphPosErrM);
-            var EphVelErrstr = ConfigurationManager.AppSettings["EphVelErr"].Trim();
-            double.TryParse(EphVelErrstr, out EphVelErr);
+            var DtoErrusstr = ConfigurationManager.AppSettings["DtoErrus"].Trim();
+            double.TryParse(DtoErrusstr, out DtoErrus);
+            var EphErrmstr = ConfigurationManager.AppSettings["EphErrm"].Trim();
+            double.TryParse(EphErrmstr, out EphErrm);
         }
 
         /// <summary>
@@ -84,9 +81,9 @@ namespace X3LeoTaskServer54.Service
                             var arr2 = adja1Info.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                             var arr3 = adja2Info.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                             MainSatCode = Convert.ToInt32(arr1[0]);
-                            Time1XYZ = GetEph(arr1);
-                            Time2XYZ = GetEph(arr2);
-                            Time3XYZ = GetEph(arr3);
+                            MainSatXYZ = GetEph(arr1);
+                            Adja1SatXYZ = GetEph(arr2);
+                            Adja2SatXYZ = GetEph(arr3);
                         }
                         catch
                         {
@@ -203,46 +200,7 @@ namespace X3LeoTaskServer54.Service
                                         if (cts.IsCancellationRequested) break;
                                         LeoX1ParPosDto leoX1 = new LeoX1ParPosDto()
                                         {
-                                            TaskID = dto.ID,
-                                            SigTime = adTime.AddSeconds(data1[i].Smpstart / (double)ch0File.Fs),
-                                            MainCode = MainSatCode,
-                                            Adja1Code = MainSatCode,
-                                            Adja2Code = MainSatCode,
-                                            MainX = Time1XYZ[0],
-                                            MainY = Time1XYZ[1],
-                                            MainZ = Time1XYZ[2],
-                                            MainVX = Time1XYZ[3],
-                                            MainVY = Time1XYZ[4],
-                                            MainVZ = Time1XYZ[5],
-                                            Adja1X = Time2XYZ[0],
-                                            Adja1Y = Time2XYZ[1],
-                                            Adja1Z = Time2XYZ[2],
-                                            Adja1VX = Time2XYZ[3],
-                                            Adja1VY = Time2XYZ[4],
-                                            Adja1VZ = Time2XYZ[5],
-                                            Adja2X = Time3XYZ[0],
-                                            Adja2Y = Time3XYZ[1],
-                                            Adja2Z = Time3XYZ[2],
-                                            Adja2VX = Time3XYZ[3],
-                                            Adja2VY = Time3XYZ[4],
-                                            Adja2VZ = Time3XYZ[5],
-                                            Dto1 = PosDtoFactor * data1[i].Dt,
-                                            Dfo1 = data1[i].Df,
-                                            Snr1 = data1[i].Snr,
-                                            Dto2 = PosDtoFactor * data2[i].Dt,
-                                            Dfo2 = data2[i].Df,
-                                            Snr2 = data2[i].Snr,
-                                            FreqUp = (ch0File.FreqDownMHz + 44) * 1e6,
-                                            SatTxLon = dto.CapLon,
-                                            SatTxLat = dto.CapLat,
-                                            FreqDown = ch0File.FreqDownMHz * 1e6,
-                                            CheckRes = new CheckResDto()
-                                            {
-                                                FileName = Path.GetFileName(ch0File.File),
-                                                SmpStart = cgDto.smpPositions[i].smpStart,
-                                                SmpCount = cgDto.smpPositions[i].smpCount,
-                                                PosCheckType = EnumPosCheckTypeDto.Ky5758,
-                                            }
+
                                         };
                                         var result = await HttpHelper.PostRequestAsync<PosResDto>(baseUrl + "Pos/PosLeX1ParAsync", leoX1);
                                         if (result.code != 200)
@@ -259,20 +217,24 @@ namespace X3LeoTaskServer54.Service
                                                 posLon = 0;
                                                 posLat = 0;
                                             }
-                                            ErrorEllipseLeoX1Dto errdto = new ErrorEllipseLeoX1Dto()
+                                            var errDto = new ErrEllipseX3NoRefDto()
                                             {
-                                                MsEph = Time1XYZ,
-                                                NsEph1 = Time2XYZ,
-                                                NsEph2 = Time3XYZ,
-                                                SelectPoint = new double[3] { posLon, posLat, 0 },
-                                                DfoErr = DfoErrHz,
-                                                EphPosErr = EphPosErrM,
-                                                EphVelErr = EphVelErr,
-                                                fu = leoX1.FreqUp,
-                                                Pe = 0.5,
-                                                OutputErrPoint = false
+                                                PosLon = posLon,
+                                                PosLat = posLat,
+                                                MainX = MainSatXYZ[0],
+                                                MainY = MainSatXYZ[1],
+                                                MainZ = MainSatXYZ[2],
+                                                Adja1X = Adja1SatXYZ[0],
+                                                Adja1Y = Adja1SatXYZ[1],
+                                                Adja1Z = Adja1SatXYZ[2],
+                                                Adja2X = Adja2SatXYZ[0],
+                                                Adja2Y = Adja2SatXYZ[1],
+                                                Adja2Z = Adja2SatXYZ[2],
+                                                DtoErrus = DtoErrus,
+                                                EphErr = EphErrm,
+                                                OutputErrPoint = false,
                                             };
-                                            var errRes = await GetErrEllipseResDto(errdto, posLon, posLat);
+                                            var errRes = await GetErrEllipseResDto(errDto);
                                             StringBuilder sb = new StringBuilder();
                                             sb.Append($"{leoX1.SigTime:yyyy}\t");
                                             sb.Append($"{leoX1.SigTime:MM}\t");
@@ -348,14 +310,12 @@ namespace X3LeoTaskServer54.Service
 
         private double[] GetEph(string[] strs)
         {
-
-            var TimeXYZ = new double[6] { Convert.ToDouble(strs[1]),
-               Convert.ToDouble(strs[2]),
-               Convert.ToDouble(strs[3]),
-               Convert.ToDouble(strs[4]),
-               Convert.ToDouble(strs[5]),
-               Convert.ToDouble(strs[6]),
-           };
+            var TimeXYZ = new double[3]
+            {
+                Convert.ToDouble(strs[1]),
+                Convert.ToDouble(strs[2]),
+                Convert.ToDouble(strs[3])
+            };
             return TimeXYZ;
 
         }
@@ -376,13 +336,12 @@ namespace X3LeoTaskServer54.Service
             return signalType;
         }
 
-        private async Task<ErrEllipseResDto> GetErrEllipseResDto(ErrorEllipseLeoX1Dto dto, double posLon, double posLat)
+        private async Task<ErrEllipseResDto> GetErrEllipseResDto(ErrEllipseX3NoRefDto dto)
         {
             ErrEllipseResDto errRes = new ErrEllipseResDto();
-            if (posLon != 0 && posLat != 0 && posLon != 999 && posLat != 999)
+            if (dto.PosLon != 0 && dto.PosLat != 0 && dto.PosLon != 999 && dto.PosLat != 999)
             {
-
-                var errResRsp = await HttpHelper.PostRequestAsync<ErrEllipseResDto>(baseUrl + "Ellipse/X3Leo", dto);
+                var errResRsp = await HttpHelper.PostRequestAsync<ErrEllipseResDto>(baseUrl + "Ellipse/X3TwoDtoNoRef", dto);
                 if (errResRsp.code != 200)
                 {
                     await LogHelper.Error(errResRsp.msg);

+ 6 - 0
Service/X3TaskServer54/App.config

@@ -30,6 +30,12 @@
 		<!--定位时差系数-->
 		<add key="PosDtoFactor" value="-1"/>
 
+		<!--时差误差(单位:us)-->
+		<add key="DtoErrus" value="1"/>
+
+		<!--星历误差(单位:m)-->
+		<add key="EphErrm" value="10000"/>
+
 	</appSettings>
 	<startup>
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

+ 32 - 12
Service/X3TaskServer54/Service/TaskService.cs

@@ -24,6 +24,8 @@ namespace X3TaskServer54.Service
         int MainSatCode, Adja1SatCode, Adja2SatCode;
         double[] MainSatXYZ, Adja1SatXYZ, Adja2SatXYZ;
         int PosDtoFactor;
+        double DtoErrus;
+        double EphErrm;
         public TaskService()
         {
             var posPlatformAddr = ConfigurationManager.AppSettings["PosPlatformAddr"].Trim();//like http://127.0.0.1:8091 or http://127.0.0.1:8091/
@@ -38,6 +40,10 @@ namespace X3TaskServer54.Service
             var PosDtoFactorstr = ConfigurationManager.AppSettings["PosDtoFactor"].Trim();
             int.TryParse(PosDtoFactorstr, out PosDtoFactor);
             if (PosDtoFactor == 0) PosDtoFactor = 1;
+            var DtoErrusstr = ConfigurationManager.AppSettings["DtoErrus"].Trim();
+            double.TryParse(DtoErrusstr, out DtoErrus);
+            var EphErrmstr = ConfigurationManager.AppSettings["EphErrm"].Trim();
+            double.TryParse(EphErrmstr, out EphErrm);
         }
         public void StartAsync(X3NoRefTaskHandleDto dto)
         {
@@ -311,18 +317,32 @@ namespace X3TaskServer54.Service
                                                 ErrEllipseResDto errRes = new ErrEllipseResDto();
                                                 if (posLon != 0 && posLat != 0 && posLon != 999 && posLat != 999)
                                                 {
-                                                    //var errDto = new ErrorEllipseLeoX3Dto()
-                                                    //{
-                                                    //};
-                                                    //var errResRsp = await HttpHelper.PostRequestAsync<ErrEllipseResDto>(baseUrl + "Ellipse/X3", errDto);
-                                                    //if (errResRsp.code != 200)
-                                                    //{
-                                                    //    await LogHelper.Error(errResRsp.msg);
-                                                    //}
-                                                    //else
-                                                    //{
-                                                    //    errRes = errResRsp.data;
-                                                    //}
+                                                    var errDto = new ErrEllipseX3NoRefDto()
+                                                    {
+                                                        PosLon = posLon,
+                                                        PosLat = posLat,
+                                                        MainX = MainSatXYZ[0],
+                                                        MainY = MainSatXYZ[1],
+                                                        MainZ = MainSatXYZ[2],
+                                                        Adja1X = Adja1SatXYZ[0],
+                                                        Adja1Y = Adja1SatXYZ[1],
+                                                        Adja1Z = Adja1SatXYZ[2],
+                                                        Adja2X = Adja2SatXYZ[0],
+                                                        Adja2Y = Adja2SatXYZ[1],
+                                                        Adja2Z = Adja2SatXYZ[2],
+                                                        DtoErrus = DtoErrus,
+                                                        EphErr = EphErrm,
+                                                        OutputErrPoint = false,
+                                                    };
+                                                    var errResRsp = await HttpHelper.PostRequestAsync<ErrEllipseResDto>(baseUrl + "Ellipse/X3TwoDtoNoRef", errDto);
+                                                    if (errResRsp.code != 200)
+                                                    {
+                                                        await LogHelper.Error(errResRsp.msg);
+                                                    }
+                                                    else
+                                                    {
+                                                        errRes = errResRsp.data;
+                                                    }
                                                 }
                                                 StringBuilder sb = new StringBuilder();
                                                 sb.Append($"{x3.SigTime:yyyy}\t");