gongqiuhong пре 1 година
родитељ
комит
c572891bcb

+ 2 - 2
XdCxRhDW.App/Api/PosApi.cs

@@ -74,7 +74,7 @@ namespace XdCxRhDW.App.Api
             double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
             double theta = cxRes.Fx;//单位°
             double[] res = new double[6];
-            X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, res);
+            X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, res);
             return res.Select(p => Math.Round(p, 4)).ToArray();
         }
 
@@ -97,7 +97,7 @@ namespace XdCxRhDW.App.Api
             double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
             double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
             double[] res = new double[6];
-            X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx / 1e6, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, cgRes.YbAdja / 1e6, res);
+            X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx.Value / 1e6, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, cgRes.YbAdja.Value / 1e6, res);
             return res;
         }
 

+ 4 - 4
XdCxRhDW.App/Model/CgRes.cs

@@ -15,7 +15,7 @@ namespace XdCxRhDW.App.Model
         public DateTime SigTime { get; set; }
 
         [Display(Name = "双星时差(us)")]
-        public double  DtoSx { get; set; }
+        public double?  DtoSx { get; set; }
 
         [Display(Name = "双星频差(Hz)")]
         public double?  DfoSx { get; set; }
@@ -24,7 +24,7 @@ namespace XdCxRhDW.App.Model
         public double? SnrSx { get; set; }
 
         [Display(Name = "主星超短时差(us)")]
-        public double DtoCdb { get; set; }
+        public double? DtoCdb { get; set; }
 
         [Display(Name = "主星超短频差 (Hz)")]
         public double? DfoCdb { get; set; }
@@ -33,10 +33,10 @@ namespace XdCxRhDW.App.Model
         public double? SnrCdb { get; set; }
 
         [Display(Name = "样本主星时差(us)")]
-        public double YbMain { get; set; }
+        public double? YbMain { get; set; }
 
         [Display(Name = "样本邻星时差(us)")]
-        public double YbAdja{ get; set; }
+        public double? YbAdja{ get; set; }
 
 
         [Display(Name = "主星星历X")]

+ 1 - 1
XdCxRhDW.App/Model/PosRes.cs

@@ -12,7 +12,7 @@ namespace XdCxRhDW.App.Model
     public class PosRes : PosData
     {
         [Display(Name = "任务编号")]
-        public int TaskID { get; set; }
+        public int TaskInfoID { get; set; }
 
         [Display(AutoGenerateField = false)]
         public virtual TaskInfo TaskInfo { get;set;}

+ 9 - 9
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -88,7 +88,7 @@ namespace XdCxRhDW.App.UserControl
             List<PosRes> listPos = new List<PosRes>();
             using (RHDWContext db = new RHDWContext())
             {
-                var items = await db.PosRes.Where(p => p.TaskID == tsk.ID).OrderByDescending(p => p.SigTime).ToListAsync();
+                var items = await db.PosRes.Where(p => p.TaskInfoID == tsk.ID).OrderByDescending(p => p.SigTime).ToListAsync();
                 listPos.AddRange(items);
             }
            
@@ -575,20 +575,20 @@ namespace XdCxRhDW.App.UserControl
                 return (null, default);
             }
             var item = gridView2.GetRow(ids[0]) as PosRes;
-            var taskInfo = list.Find(m => m.ID == item.TaskID);
+            var taskInfo = list.Find(m => m.ID == item.TaskInfoID);
             if (taskInfo == null)
             {
-                DxHelper.MsgBoxHelper.ShowWarning($"{msg}未找到任务[{item.TaskID}]!");
+                DxHelper.MsgBoxHelper.ShowWarning($"{msg}未找到任务[{item.TaskInfoID}]!");
                 return (null, default);
             }
             return (item, taskInfo.PosType);
         }
         private EnumPosType GetPosRes(PosRes posRes, string msg)
         {
-            var taskInfo = list.Find(m => m.ID == posRes.TaskID);
+            var taskInfo = list.Find(m => m.ID == posRes.TaskInfoID);
             if (taskInfo == null)
             {
-                DxHelper.MsgBoxHelper.ShowWarning($"{msg}未找到任务[{posRes.TaskID}]!");
+                DxHelper.MsgBoxHelper.ShowWarning($"{msg}未找到任务[{posRes.TaskInfoID}]!");
                 return default;
             }
             return taskInfo.PosType;
@@ -726,8 +726,8 @@ namespace XdCxRhDW.App.UserControl
                 dtoLineXd.MsAnt = new double[] { satTx.Lon, satTx.Lat, 0 };
                 dtoLineXd.CDBAnt = new double[] { cdbTx.Lon, cdbTx.Lat, 0 };
                 dtoLineXd.RefGeod = new double[] { refTx.Lon, refTx.Lat, 0 };
-                dtoLineXd.xdDto = cg.DtoCdb;
-                dtoLineXd.RefDto = cg.YbMain;
+                dtoLineXd.xdDto = cg.DtoCdb.Value;
+                dtoLineXd.RefDto = cg.YbMain.Value;
                 dtoLineXd.PosLon = item.PosLon;
                 dtoLineXd.PosLat = item.PosLat;
                 var xdDtoLine = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
@@ -741,8 +741,8 @@ namespace XdCxRhDW.App.UserControl
                     twoStartOption.MsAnt = new double[] { satTx.Lon, satTx.Lat, 0 };
                     twoStartOption.NsAnt = new double[] { satNTx.Lon, satNTx.Lat, 0 };
                     twoStartOption.RefGeod = new double[] { refTx.Lon, refTx.Lat, 0 };
-                    twoStartOption.TargetDto = cg.DtoSx;
-                    twoStartOption.RefDto = cg.YbMain - cg.YbAdja;
+                    twoStartOption.TargetDto = cg.DtoSx.Value;
+                    twoStartOption.RefDto = cg.YbMain.Value - cg.YbAdja.Value;
                     twoStartOption.PosLon = item.PosLon;
                     twoStartOption.PosLat = item.PosLat;
                     var tsDtoLine = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);

+ 327 - 288
XdCxRhDW.App/WebAPI/Controllers/PosController.cs

@@ -36,87 +36,75 @@ namespace XdCxRhDW.App.WebAPI
     /// </summary>
     public class PosController : BaseController
     {
+        #region 带参有星历
         /// <summary>
-        /// 一星一地带参定位(无星历)
+        /// 一星一地测向带参定位(含星历)
         /// </summary>
-        /// <returns>返回定位结果ID</returns>
+        /// <param name="dto">定位参数</param>
+        /// <returns></returns>
         [HttpPost]
-        public async Task<AjaxResult<PosRes>> PosX1D1NoXlAsync(X1D1NoXlPosDto dto)
+        public async Task<AjaxResult<PosRes>> PosX1D1Async(X1D1PosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
             {
-                var runTask = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && p.PosType == EnumPosType.X1D1CX).FirstOrDefaultAsync();
+                var runTask = await db.TaskInfos.FirstOrDefaultAsync(p => p.PosType == EnumPosType.X1D1CX && p.TaskState == EnumTaskState.Running);
                 if (runTask == null)
                 {
-                    Serilog.Log.Warning($"接收到一星一地定位参数,由于任务没有运行中忽略本次定位!");
-                    return Error<PosRes>($"多模式融合定位平台没有启动一星一地定位任务");
-                }
-                var parameter1 = new SQLiteParameter("@sigTime", dto.SigTime);
-                var parameter2 = new SQLiteParameter("@satcode", dto.MainSatID);
-                var xlInfo1 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter2).FirstOrDefaultAsync();
-                if (xlInfo1 == null)
-                {
-                    Serilog.Log.Error($"未找到卫星[{dto.MainSatID}]的双行根数星历");
-                    return Error<PosRes>($"未找到卫星[{dto.MainSatID}]的双行根数星历");
-                }
-                Serilog.Log.Information($"卫星{dto.MainSatID}使用{xlInfo1.TwoLine}进行星历推算");
-                var settings = await db.SysSetings.FirstOrDefaultAsync();
-                var client = new HttpClient();
-                string url = string.Format("http://{0}:{1}/Api/", IpHelper.GetLocalIp(), settings.HttpPort);
-                url += string.Format("Xl/Calc?tleStr={0}&dt={1}", xlInfo1.TwoLine, dto.SigTime);
-                var response = await client.GetAsync(url);
-                if (!response.IsSuccessStatusCode) // 处理响应失败
-                {
-                    Serilog.Log.Error($"[{dto.MainSatID}]星厉推算失败");
-                    return Error<PosRes>($"[{dto.MainSatID}]星厉推算失败");
+                    Serilog.Log.Warning($"接收到一星一地测向带参定位(含星历)参数,由于任务没有运行中忽略本次定位!");
+                    return Error<PosRes>($"多模式融合定位平台没有启动一星一地测向定位任务");
                 }
-                var content = await response.Content.ReadAsStringAsync();
-                var ephMain = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content).data;
-                //var ephMain = EphHelper.Calc(xlInfo1.TwoLine, dto.SigTime);
-                var listTx = new List<TxInfo>();
-                var cgRes = new CgRes();
-                var cxRes = new CxRes();
-                cgRes = db.CgRes.Add(new CgRes()
+                var cgRes = db.CgRes.Add(new CgRes()
                 {
                     SigTime = dto.SigTime,
                     DtoCdb = dto.XdDto * 1e6,
                     DfoCdb = dto.XdDfo * 1e6,
                     SnrCdb = dto.XdSnr,
                     YbMain = dto.MainYbDto * 1e6,
-                    MainX = ephMain.X,
-                    MainY = ephMain.Y,
-                    MainZ = ephMain.Z,
+                    MainX = dto.MainX,
+                    MainY = dto.MainY,
+                    MainZ = dto.MainZ,
+
                 });
-                listTx = await db.TxInfos.ToListAsync();
-                cxRes = db.CxRes.Add(new CxRes()
+
+                var cxRes = db.CxRes.Add(new CxRes()
                 {
                     SigTime = dto.SigTime,
                     Fx = dto.CxRes,
                 });
+
+                var StationRes = db.StationRes.Add(new StationRes()
+                {
+                    SatTxLon = dto.StationResInfo.SatTxLon,
+                    SatTxLat = dto.StationResInfo.SatTxLat,
+                    CdbTxLon = dto.StationResInfo.CdbTxLon,
+                    CdbTxLat = dto.StationResInfo.CdbTxLat,
+                    CxLon = dto.StationResInfo.CxLon,
+                    CxLat = dto.StationResInfo.CxLat,
+                    RefLon = dto.StationResInfo.RefLon,
+                    RefLat = dto.StationResInfo.RefLat,
+                });
+
                 double[] res = new double[6];
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-                var cxTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
-                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
                 double[] mainSat = new double[3] { cgRes.MainX, cgRes.MainY, cgRes.MainZ };
-                double[] satStation = new double[3] { satTx.Lon, satTx.Lat, 0 };
-                double[] cdbStation = new double[3] { cdbTx.Lon, cdbTx.Lat, 0 };
-                double[] cxStation = new double[3] { cxTx.Lon, cxTx.Lat, 0 };
-                double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
+                double[] satStation = new double[3] { dto.StationResInfo.SatTxLon, dto.StationResInfo.SatTxLat, 0 };
+                double[] cdbStation = new double[3] { dto.StationResInfo.CdbTxLon, dto.StationResInfo.CdbTxLat, 0 };
+                double[] cxStation = new double[3] { dto.StationResInfo.CxLon, dto.StationResInfo.CxLat, 0 };
+                double[] refStation = new double[3] { dto.StationResInfo.RefLon, dto.StationResInfo.RefLat, 0 };
                 double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
                 double theta = cxRes.Fx;//单位°
-                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, res);
+                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, res);
                 PosRes posRes = new PosRes()
                 {
-                    SigTime = dto.SigTime,
-                    TaskID = runTask.ID,
+                    SigTime = cgRes.SigTime,
+                    TaskInfoID = runTask.ID,
+                    CxResID = cxRes.ID,
                     CgResID = cgRes.ID,
                     TarName = string.IsNullOrWhiteSpace(dto.TarName) ? "未知目标" : dto.TarName,
                     TsName = dto.TsName,
-                    PosLon = res[0],
-                    PosLat = res[1],
-                    MirrLon = res[3],
-                    MirrLat = res[4],
+                    PosLon = Math.Round(res[0], 4),
+                    PosLat = Math.Round(res[1], 4),
+                    MirrLon = Math.Round(res[3], 4),
+                    MirrLat = Math.Round(res[4], 4),
                 };
                 db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -125,63 +113,22 @@ namespace XdCxRhDW.App.WebAPI
         }
 
         /// <summary>
-        /// 两星一地带参定位(无星历)
+        /// 两星一地定位(含星历)
         /// </summary>
-        /// <returns>返回定位结果ID</returns>
+        /// <param name="dto">定位参数</param>
+        /// <returns></returns>
         [HttpPost]
-        public async Task<AjaxResult<PosRes>> PosX2D1NoXlAsync(X2D1NoXlPosDto dto)
+        public async Task<AjaxResult<PosRes>> PosX2D1Async(X2D1PosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
             {
-                var runTask = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && p.PosType == EnumPosType.X2D1).FirstOrDefaultAsync();
+                var runTask = await db.TaskInfos.FirstOrDefaultAsync(p => p.PosType == EnumPosType.X2D1 && p.TaskState == EnumTaskState.Running);
                 if (runTask == null)
                 {
-                    Serilog.Log.Warning($"接收到两星一地定位参数,由于任务没有运行中忽略本次定位!");
+                    Serilog.Log.Warning($"接收到两星一地带参定位(含星历)参数,由于任务没有运行中忽略本次定位!");
                     return Error<PosRes>($"多模式融合定位平台没有启动两星一地定位任务");
                 }
-                var parameter1 = new SQLiteParameter("@sigTime", dto.SigTime);
-                var parameter2 = new SQLiteParameter("@satcode", dto.MainSatID);
-                var parameter3 = new SQLiteParameter("@satcode", dto.AdjaSatID);
-                var xlInfo1 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter2).FirstOrDefaultAsync();
-                if (xlInfo1 == null)
-                {
-                    Serilog.Log.Error($"未找到卫星[{dto.MainSatID}]的双行根数星历");
-                    return Error<PosRes>($"未找到卫星[{dto.MainSatID}]的双行根数星历");
-                }
-
-                var xlInfo2 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter3).FirstOrDefaultAsync();
-                if (xlInfo2 == null)
-                {
-                    Serilog.Log.Error($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
-                    return Error<PosRes>($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
-                }
-                Serilog.Log.Information($"卫星{dto.MainSatID}使用{xlInfo1.TwoLine}进行星历推算");
-                Serilog.Log.Information($"卫星{dto.AdjaSatID}使用{xlInfo2.TwoLine}进行星历推算");
-                var settings = await db.SysSetings.FirstOrDefaultAsync();
-                var client = new HttpClient();
-                string url = string.Format("http://{0}:{1}/Api/", IpHelper.GetLocalIp(), settings.HttpPort);
-                var url1 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo1.TwoLine, dto.SigTime);
-                var response = await client.GetAsync(url1);
-                if (!response.IsSuccessStatusCode) // 处理响应失败
-                {
-                    Serilog.Log.Error($"[{dto.MainSatID}]星厉推算失败");
-                    return Error<PosRes>($"[{dto.MainSatID}]星厉推算失败");
-                }
-                var content = await response.Content.ReadAsStringAsync();
-                var ephMain = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content).data;
-
-                var url2 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo2.TwoLine, dto.SigTime);
-                var response2 = await client.GetAsync(url2);
-                if (!response2.IsSuccessStatusCode) // 处理响应失败
-                {
-                    Serilog.Log.Error($"[{dto.AdjaSatID}]星厉推算失败");
-                    return Error<PosRes>($"[{dto.AdjaSatID}]星厉推算失败");
-                }
-                var content2 = await response2.Content.ReadAsStringAsync();
-                var ephAdja = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content2).data;
-                //var ephMain = EphHelper.Calc(xlInfo1.TwoLine, dto.SigTime);
-                //var ephAdja = EphHelper.Calc(xlInfo2.TwoLine, dto.SigTime);
-                var cgRes = db.CgRes.Add(new Model.CgRes()
+                var cgRes = db.CgRes.Add(new CgRes()
                 {
                     SigTime = dto.SigTime,
                     DtoSx = dto.SxDto * 1e6,
@@ -192,37 +139,44 @@ namespace XdCxRhDW.App.WebAPI
                     SnrCdb = dto.XdSnr,
                     YbMain = dto.MainYbDto * 1e6,
                     YbAdja = dto.AdjaYbDto * 1e6,
-                    MainX = ephMain.X,
-                    MainY = ephMain.Y,
-                    MainZ = ephMain.Z,
-                    AdjaX = ephAdja.X,
-                    AdjaY = ephAdja.Y,
-                    AdjaZ = ephAdja.Z,
+                    MainX = dto.MainX,
+                    MainY = dto.MainY,
+                    MainZ = dto.MainZ,
+                    AdjaX = dto.AdjaX,
+                    AdjaY = dto.AdjaY,
+                    AdjaZ = dto.AdjaZ,
+                });
+                var StationRes = db.StationRes.Add(new StationRes()
+                {
+                    SatTxLon = dto.StationResInfo.SatTxLon,
+                    SatTxLat = dto.StationResInfo.SatTxLat,
+                    CdbTxLon = dto.StationResInfo.CdbTxLon,
+                    CdbTxLat = dto.StationResInfo.CdbTxLat,
+                    CxLon = dto.StationResInfo.CxLon,
+                    CxLat = dto.StationResInfo.CxLat,
+                    RefLon = dto.StationResInfo.RefLon,
+                    RefLat = dto.StationResInfo.RefLat,
                 });
-                var listTx = await db.TxInfos.ToListAsync();
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-                var cxTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
-                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
-                double[] mainSat = new double[3] { ephMain.X, ephMain.Y, ephMain.Z };
-                double[] adjaSat = new double[3] { ephAdja.X, ephAdja.Y, ephAdja.Z };
-                double[] satStation = new double[3] { satTx.Lon, satTx.Lat, 0 };
-                double[] cdbStation = new double[3] { cdbTx.Lon, cdbTx.Lat, 0 };
-                double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
-                double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
                 double[] res = new double[6];
-                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, dto.SxDto / 1e6, dto.XdDto / 1e6, dto.MainYbDto / 1e6, dto.AdjaYbDto / 1e6, res);
+                double[] mainSat = new double[3] { cgRes.MainX, cgRes.MainY, cgRes.MainZ };
+                double[] adjaSat = new double[3] { cgRes.AdjaX, cgRes.AdjaY, cgRes.AdjaZ };
+                double[] satStation = new double[3] { dto.StationResInfo.SatTxLon, dto.StationResInfo.SatTxLat, 0 };
+                double[] cdbStation = new double[3] { dto.StationResInfo.CdbTxLon, dto.StationResInfo.CdbTxLat, 0 };
+                double[] cxStation = new double[3] { dto.StationResInfo.CxLon, dto.StationResInfo.CxLat, 0 };
+                double[] refStation = new double[3] { dto.StationResInfo.RefLon, dto.StationResInfo.RefLat, 0 };
+                double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
+                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx.Value / 1e6, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, cgRes.YbAdja.Value / 1e6, res);
                 PosRes posRes = new PosRes()
                 {
-                    SigTime = dto.SigTime,
-                    TaskID = runTask.ID,
+                    SigTime = cgRes.SigTime,
+                    TaskInfoID = runTask.ID,
                     CgResID = cgRes.ID,
                     TarName = string.IsNullOrWhiteSpace(dto.TarName) ? "未知目标" : dto.TarName,
                     TsName = dto.TsName,
-                    PosLon = res[0],
-                    PosLat = res[1],
-                    MirrLon = res[3],
-                    MirrLat = res[4],
+                    PosLon = Math.Round(res[0], 4),
+                    PosLat = Math.Round(res[1], 4),
+                    MirrLon = Math.Round(res[3], 4),
+                    MirrLat = Math.Round(res[4], 4),
                 };
                 db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -231,66 +185,23 @@ namespace XdCxRhDW.App.WebAPI
         }
 
         /// <summary>
-        /// 融合带参定位(无星历)
+        /// 融合定位(含星历)
         /// </summary>
-        /// <returns>返回定位结果ID</returns>
+        /// <param name="dto">定位参数</param>
+        /// <returns></returns>
         [HttpPost]
-        public async Task<AjaxResult<PosRes>> PosRhNoXlAsync(RHNoXlPosDto dto)
+        public async Task<AjaxResult<PosRes>> PosRhAsync(RHPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
             {
-                var runTask = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && p.PosType == EnumPosType.RH).FirstOrDefaultAsync();
+                var runTask = await db.TaskInfos.FirstOrDefaultAsync(p => p.PosType == EnumPosType.RH && p.TaskState == EnumTaskState.Running);
                 if (runTask == null)
                 {
-                    Serilog.Log.Warning($"接收到融合定位参数,由于任务没有运行中忽略本次定位!");
-                    return Error<PosRes>($"多模式融合定位平台没有启动融合定位任务");
-                }
-                var parameter1 = new SQLiteParameter("@sigTime", dto.SigTime);
-                var parameter2 = new SQLiteParameter("@satcode", dto.MainSatID);
-                var parameter3 = new SQLiteParameter("@satcode", dto.AdjaSatID);
-                var xlInfo1 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter2).FirstOrDefaultAsync();
-                if (xlInfo1 == null)
-                {
-                    Serilog.Log.Error($"未找到卫星[{dto.MainSatID}]的双行根数星历");
-                    return Error<PosRes>($"未找到卫星[{dto.MainSatID}]的双行根数星历");
-                }
-
-                var xlInfo2 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter3).FirstOrDefaultAsync();
-                if (xlInfo2 == null)
-                {
-                    Serilog.Log.Error($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
-                    return Error<PosRes>($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
-                }
-                Serilog.Log.Information($"卫星{dto.MainSatID}使用{xlInfo1.TwoLine}进行星历推算");
-                Serilog.Log.Information($"卫星{dto.AdjaSatID}使用{xlInfo2.TwoLine}进行星历推算");
-                var settings = await db.SysSetings.FirstOrDefaultAsync();
-                var client = new HttpClient();
-                string url = string.Format("http://{0}:{1}/Api/", IpHelper.GetLocalIp(), settings.HttpPort);
-                var url1 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo1.TwoLine, dto.SigTime);
-                var response = await client.GetAsync(url1);
-                if (!response.IsSuccessStatusCode) // 处理响应失败
-                {
-                    Serilog.Log.Error($"[{dto.MainSatID}]星厉推算失败");
-                    return Error<PosRes>($"[{dto.MainSatID}]星厉推算失败");
-                }
-                var content = await response.Content.ReadAsStringAsync();
-                var ephMain = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content).data;
-
-                var url2 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo2.TwoLine, dto.SigTime);
-                var response2 = await client.GetAsync(url2);
-                if (!response2.IsSuccessStatusCode) // 处理响应失败
-                {
-                    Serilog.Log.Error($"[{dto.AdjaSatID}]星厉推算失败");
-                    return Error<PosRes>($"[{dto.AdjaSatID}]星厉推算失败");
+                    Serilog.Log.Warning($"接收到融合带参定位(含星历)参数,由于任务没有运行中忽略本次定位!");
+                    return Error<PosRes>($"多模式融合定位平台没有启动两星一地定位任务");
                 }
-                var content2 = await response2.Content.ReadAsStringAsync();
-                var ephAdja = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content2).data;
-                //var ephMain = EphHelper.Calc(xlInfo1.TwoLine, dto.SigTime);
-                //var ephAdja = EphHelper.Calc(xlInfo2.TwoLine, dto.SigTime);
                 var listTx = new List<TxInfo>();
-                var cgRes = new CgRes();
-                var cxRes = new CxRes();
-                cgRes = db.CgRes.Add(new CgRes()
+                var cgRes = db.CgRes.Add(new CgRes()
                 {
                     SigTime = dto.SigTime,
                     DtoSx = dto.SxDto * 1e6,
@@ -301,38 +212,45 @@ namespace XdCxRhDW.App.WebAPI
                     SnrCdb = dto.XdSnr,
                     YbMain = dto.MainYbDto * 1e6,
                     YbAdja = dto.AdjaYbDto * 1e6,
-                    MainX = ephMain.X,
-                    MainY = ephMain.Y,
-                    MainZ = ephMain.Z,
-                    AdjaX = ephAdja.X,
-                    AdjaY = ephAdja.Y,
-                    AdjaZ = ephAdja.Z,
+                    MainX = dto.MainX,
+                    MainY = dto.MainY,
+                    MainZ = dto.MainZ,
+                    AdjaX = dto.AdjaX,
+                    AdjaY = dto.AdjaY,
+                    AdjaZ = dto.AdjaZ,
                 });
-                listTx = await db.TxInfos.ToListAsync();
-                cxRes = db.CxRes.Add(new CxRes()
+
+                var cxRes = db.CxRes.Add(new CxRes()
                 {
                     SigTime = dto.SigTime,
                     Fx = dto.CxRes,
                 });
-
+              
+                var StationRes = db.StationRes.Add(new StationRes()
+                {
+                    SatTxLon = dto.StationResInfo.SatTxLon,
+                    SatTxLat = dto.StationResInfo.SatTxLat,
+                    CdbTxLon = dto.StationResInfo.CdbTxLon,
+                    CdbTxLat = dto.StationResInfo.CdbTxLat,
+                    CxLon = dto.StationResInfo.CxLon,
+                    CxLat = dto.StationResInfo.CxLat,
+                    RefLon = dto.StationResInfo.RefLon,
+                    RefLat = dto.StationResInfo.RefLat,
+                });
                 double[] resX1D1 = new double[6];
                 double[] resX2D1 = new double[6];
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-                var cxTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
-                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
                 double[] mainSat = new double[3] { cgRes.MainX, cgRes.MainY, cgRes.MainZ };
                 double[] adjaSat = new double[3] { cgRes.AdjaX, cgRes.AdjaY, cgRes.AdjaZ };
-                double[] satStation = new double[3] { satTx.Lon, satTx.Lat, 0 };
-                double[] cdbStation = new double[3] { cdbTx.Lon, cdbTx.Lat, 0 };
-                double[] cxStation = new double[3] { cxTx.Lon, cxTx.Lat, 0 };
-                double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
+                double[] satStation = new double[3] { dto.StationResInfo.SatTxLon, dto.StationResInfo.SatTxLat, 0 };
+                double[] cdbStation = new double[3] { dto.StationResInfo.CdbTxLon, dto.StationResInfo.CdbTxLat, 0 };
+                double[] cxStation = new double[3] { dto.StationResInfo.CxLon, dto.StationResInfo.CxLat, 0 };
+                double[] refStation = new double[3] { dto.StationResInfo.RefLon, dto.StationResInfo.RefLat, 0 };
                 double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
                 double theta = cxRes.Fx;//单位°
 
-                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, resX1D1);
+                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, resX1D1);
 
-                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx / 1e6, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, cgRes.YbAdja / 1e6, resX2D1);
+                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx.Value / 1e6, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, cgRes.YbAdja.Value / 1e6, resX2D1);
 
                 double[] res = new double[] { 999, 999, 0, 999, 999, 0 };
                 if (PosApi.IsGeoPoint(resX1D1) && PosApi.IsGeoPoint(resX2D1))
@@ -375,7 +293,7 @@ namespace XdCxRhDW.App.WebAPI
                 PosRes posRes = new PosRes()
                 {
                     SigTime = cgRes.SigTime,
-                    TaskID = runTask.ID,
+                    TaskInfoID = runTask.ID,
                     CxResID = cxRes.ID,
                     CgResID = cgRes.ID,
                     TarName = string.IsNullOrWhiteSpace(dto.TarName) ? "未知目标" : dto.TarName,
@@ -390,68 +308,96 @@ namespace XdCxRhDW.App.WebAPI
                 return Success(posRes);
             }
         }
+        #endregion
 
+        #region 带参无星历
         /// <summary>
-        /// 一星一地测向带参定位(含星历)
+        /// 一星一地带参定位(无星历)
         /// </summary>
-        /// <param name="dto">定位参数</param>
-        /// <returns></returns>
+        /// <returns>返回定位结果ID</returns>
         [HttpPost]
-        public async Task<AjaxResult<PosRes>> PosX1D1Async(X1D1PosDto dto)
+        public async Task<AjaxResult<PosRes>> PosX1D1NoXlAsync(X1D1NoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
             {
-                var runTask = await db.TaskInfos.FirstOrDefaultAsync(p => p.PosType == EnumPosType.X1D1CX && p.TaskState == EnumTaskState.Running);
+                var runTask = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && p.PosType == EnumPosType.X1D1CX).FirstOrDefaultAsync();
                 if (runTask == null)
                 {
-                    Serilog.Log.Warning($"接收到一星一地测向带参定位(含星历)参数,由于任务没有运行中忽略本次定位!");
-                    return Error<PosRes>($"多模式融合定位平台没有启动一星一地测向定位任务");
+                    Serilog.Log.Warning($"接收到一星一地定位参数,由于任务没有运行中忽略本次定位!");
+                    return Error<PosRes>($"多模式融合定位平台没有启动一星一地定位任务");
                 }
-                var listTx = new List<TxInfo>();
-                var cgRes = new CgRes();
-                var cxRes = new CxRes();
-                cgRes = db.CgRes.Add(new CgRes()
+                var parameter1 = new SQLiteParameter("@sigTime", dto.SigTime);
+                var parameter2 = new SQLiteParameter("@satcode", dto.MainSatID);
+                var xlInfo1 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter2).FirstOrDefaultAsync();
+                if (xlInfo1 == null)
+                {
+                    Serilog.Log.Error($"未找到卫星[{dto.MainSatID}]的双行根数星历");
+                    return Error<PosRes>($"未找到卫星[{dto.MainSatID}]的双行根数星历");
+                }
+                Serilog.Log.Information($"卫星{dto.MainSatID}使用{xlInfo1.TwoLine}进行星历推算");
+                var settings = await db.SysSetings.FirstOrDefaultAsync();
+                var client = new HttpClient();
+                string url = string.Format("http://{0}:{1}/Api/", IpHelper.GetLocalIp(), settings.HttpPort);
+                url += string.Format("Xl/Calc?tleStr={0}&dt={1}", xlInfo1.TwoLine, dto.SigTime);
+                var response = await client.GetAsync(url);
+                if (!response.IsSuccessStatusCode) // 处理响应失败
+                {
+                    Serilog.Log.Error($"[{dto.MainSatID}]星厉推算失败");
+                    return Error<PosRes>($"[{dto.MainSatID}]星厉推算失败");
+                }
+                var content = await response.Content.ReadAsStringAsync();
+                var ephMain = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content).data;
+                //var ephMain = EphHelper.Calc(xlInfo1.TwoLine, dto.SigTime);
+                var cgRes = db.CgRes.Add(new CgRes()
                 {
                     SigTime = dto.SigTime,
                     DtoCdb = dto.XdDto * 1e6,
                     DfoCdb = dto.XdDfo * 1e6,
                     SnrCdb = dto.XdSnr,
                     YbMain = dto.MainYbDto * 1e6,
-                    MainX = dto.MainX,
-                    MainY = dto.MainY,
-                    MainZ = dto.MainZ,
+                    MainX = ephMain.X,
+                    MainY = ephMain.Y,
+                    MainZ = ephMain.Z,
                 });
-                listTx = await db.TxInfos.ToListAsync();
-                cxRes = db.CxRes.Add(new CxRes()
+
+                var cxRes = db.CxRes.Add(new CxRes()
                 {
                     SigTime = dto.SigTime,
                     Fx = dto.CxRes,
                 });
+
+                var StationRes = db.StationRes.Add(new StationRes()
+                {
+                    SatTxLon = dto.StationResInfo.SatTxLon,
+                    SatTxLat = dto.StationResInfo.SatTxLat,
+                    CdbTxLon = dto.StationResInfo.CdbTxLon,
+                    CdbTxLat = dto.StationResInfo.CdbTxLat,
+                    CxLon = dto.StationResInfo.CxLon,
+                    CxLat = dto.StationResInfo.CxLat,
+                    RefLon = dto.StationResInfo.RefLon,
+                    RefLat = dto.StationResInfo.RefLat,
+                });
+
                 double[] res = new double[6];
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-                var cxTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
-                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
                 double[] mainSat = new double[3] { cgRes.MainX, cgRes.MainY, cgRes.MainZ };
-                double[] satStation = new double[3] { satTx.Lon, satTx.Lat, 0 };
-                double[] cdbStation = new double[3] { cdbTx.Lon, cdbTx.Lat, 0 };
-                double[] cxStation = new double[3] { cxTx.Lon, cxTx.Lat, 0 };
-                double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
+                double[] satStation = new double[3] { dto.StationResInfo.SatTxLon, dto.StationResInfo.SatTxLat, 0 };
+                double[] cdbStation = new double[3] { dto.StationResInfo.CdbTxLon, dto.StationResInfo.CdbTxLat, 0 };
+                double[] cxStation = new double[3] { dto.StationResInfo.CxLon, dto.StationResInfo.CxLat, 0 };
+                double[] refStation = new double[3] { dto.StationResInfo.RefLon, dto.StationResInfo.RefLat, 0 };
                 double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
                 double theta = cxRes.Fx;//单位°
-                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, res);
+                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, res);
                 PosRes posRes = new PosRes()
                 {
-                    SigTime = cgRes.SigTime,
-                    TaskID = runTask.ID,
-                    CxResID = cxRes.ID,
+                    SigTime = dto.SigTime,
+                    TaskInfoID = runTask.ID,
                     CgResID = cgRes.ID,
                     TarName = string.IsNullOrWhiteSpace(dto.TarName) ? "未知目标" : dto.TarName,
                     TsName = dto.TsName,
-                    PosLon = Math.Round(res[0], 4),
-                    PosLat = Math.Round(res[1], 4),
-                    MirrLon = Math.Round(res[3], 4),
-                    MirrLat = Math.Round(res[4], 4),
+                    PosLon = res[0],
+                    PosLat = res[1],
+                    MirrLon = res[3],
+                    MirrLat = res[4],
                 };
                 db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -460,24 +406,63 @@ namespace XdCxRhDW.App.WebAPI
         }
 
         /// <summary>
-        /// 两星一地定位(含星历)
+        /// 两星一地带参定位(无星历)
         /// </summary>
-        /// <param name="dto">定位参数</param>
-        /// <returns></returns>
+        /// <returns>返回定位结果ID</returns>
         [HttpPost]
-        public async Task<AjaxResult<PosRes>> PosX2D1Async(X2D1PosDto dto)
+        public async Task<AjaxResult<PosRes>> PosX2D1NoXlAsync(X2D1NoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
             {
-                var runTask = await db.TaskInfos.FirstOrDefaultAsync(p => p.PosType == EnumPosType.X2D1 && p.TaskState == EnumTaskState.Running);
+                var runTask = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && p.PosType == EnumPosType.X2D1).FirstOrDefaultAsync();
                 if (runTask == null)
                 {
-                    Serilog.Log.Warning($"接收到两星一地带参定位(含星历)参数,由于任务没有运行中忽略本次定位!");
+                    Serilog.Log.Warning($"接收到两星一地定位参数,由于任务没有运行中忽略本次定位!");
                     return Error<PosRes>($"多模式融合定位平台没有启动两星一地定位任务");
                 }
-                var listTx = new List<TxInfo>();
-                var cgRes = new CgRes();
-                cgRes = db.CgRes.Add(new CgRes()
+                var parameter1 = new SQLiteParameter("@sigTime", dto.SigTime);
+                var parameter2 = new SQLiteParameter("@satcode", dto.MainSatID);
+                var parameter3 = new SQLiteParameter("@satcode", dto.AdjaSatID);
+                var xlInfo1 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter2).FirstOrDefaultAsync();
+                if (xlInfo1 == null)
+                {
+                    Serilog.Log.Error($"未找到卫星[{dto.MainSatID}]的双行根数星历");
+                    return Error<PosRes>($"未找到卫星[{dto.MainSatID}]的双行根数星历");
+                }
+
+                var xlInfo2 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter3).FirstOrDefaultAsync();
+                if (xlInfo2 == null)
+                {
+                    Serilog.Log.Error($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
+                    return Error<PosRes>($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
+                }
+                Serilog.Log.Information($"卫星{dto.MainSatID}使用{xlInfo1.TwoLine}进行星历推算");
+                Serilog.Log.Information($"卫星{dto.AdjaSatID}使用{xlInfo2.TwoLine}进行星历推算");
+                var settings = await db.SysSetings.FirstOrDefaultAsync();
+                var client = new HttpClient();
+                string url = string.Format("http://{0}:{1}/Api/", IpHelper.GetLocalIp(), settings.HttpPort);
+                var url1 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo1.TwoLine, dto.SigTime);
+                var response = await client.GetAsync(url1);
+                if (!response.IsSuccessStatusCode) // 处理响应失败
+                {
+                    Serilog.Log.Error($"[{dto.MainSatID}]星厉推算失败");
+                    return Error<PosRes>($"[{dto.MainSatID}]星厉推算失败");
+                }
+                var content = await response.Content.ReadAsStringAsync();
+                var ephMain = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content).data;
+
+                var url2 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo2.TwoLine, dto.SigTime);
+                var response2 = await client.GetAsync(url2);
+                if (!response2.IsSuccessStatusCode) // 处理响应失败
+                {
+                    Serilog.Log.Error($"[{dto.AdjaSatID}]星厉推算失败");
+                    return Error<PosRes>($"[{dto.AdjaSatID}]星厉推算失败");
+                }
+                var content2 = await response2.Content.ReadAsStringAsync();
+                var ephAdja = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content2).data;
+                //var ephMain = EphHelper.Calc(xlInfo1.TwoLine, dto.SigTime);
+                //var ephAdja = EphHelper.Calc(xlInfo2.TwoLine, dto.SigTime);
+                var cgRes = db.CgRes.Add(new Model.CgRes()
                 {
                     SigTime = dto.SigTime,
                     DtoSx = dto.SxDto * 1e6,
@@ -488,39 +473,46 @@ namespace XdCxRhDW.App.WebAPI
                     SnrCdb = dto.XdSnr,
                     YbMain = dto.MainYbDto * 1e6,
                     YbAdja = dto.AdjaYbDto * 1e6,
-                    MainX = dto.MainX,
-                    MainY = dto.MainY,
-                    MainZ = dto.MainZ,
-                    AdjaX = dto.AdjaX,
-                    AdjaY = dto.AdjaY,
-                    AdjaZ = dto.AdjaZ,
+                    MainX = ephMain.X,
+                    MainY = ephMain.Y,
+                    MainZ = ephMain.Z,
+                    AdjaX = ephAdja.X,
+                    AdjaY = ephAdja.Y,
+                    AdjaZ = ephAdja.Z,
+                });
+
+                var StationRes = db.StationRes.Add(new StationRes()
+                {
+                    SatTxLon = dto.StationResInfo.SatTxLon,
+                    SatTxLat = dto.StationResInfo.SatTxLat,
+                    CdbTxLon = dto.StationResInfo.CdbTxLon,
+                    CdbTxLat = dto.StationResInfo.CdbTxLat,
+                    CxLon = dto.StationResInfo.CxLon,
+                    CxLat = dto.StationResInfo.CxLat,
+                    RefLon = dto.StationResInfo.RefLon,
+                    RefLat = dto.StationResInfo.RefLat,
                 });
-                listTx = await db.TxInfos.ToListAsync();
 
                 double[] res = new double[6];
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-                var cxTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
-                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
                 double[] mainSat = new double[3] { cgRes.MainX, cgRes.MainY, cgRes.MainZ };
                 double[] adjaSat = new double[3] { cgRes.AdjaX, cgRes.AdjaY, cgRes.AdjaZ };
-                double[] satStation = new double[3] { satTx.Lon, satTx.Lat, 0 };
-                double[] cdbStation = new double[3] { cdbTx.Lon, cdbTx.Lat, 0 };
-                double[] cxStation = new double[3] { cxTx.Lon, cxTx.Lat, 0 };
-                double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
+                double[] satStation = new double[3] { dto.StationResInfo.SatTxLon, dto.StationResInfo.SatTxLat, 0 };
+                double[] cdbStation = new double[3] { dto.StationResInfo.CdbTxLon, dto.StationResInfo.CdbTxLat, 0 };
+                double[] cxStation = new double[3] { dto.StationResInfo.CxLon, dto.StationResInfo.CxLat, 0 };
+                double[] refStation = new double[3] { dto.StationResInfo.RefLon, dto.StationResInfo.RefLat, 0 };
                 double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
-                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx / 1e6, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, cgRes.YbAdja / 1e6, res);
+                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, dto.SxDto / 1e6, dto.XdDto / 1e6, dto.MainYbDto / 1e6, dto.AdjaYbDto / 1e6, res);
                 PosRes posRes = new PosRes()
                 {
-                    SigTime = cgRes.SigTime,
-                    TaskID = runTask.ID,
+                    SigTime = dto.SigTime,
+                    TaskInfoID = runTask.ID,
                     CgResID = cgRes.ID,
                     TarName = string.IsNullOrWhiteSpace(dto.TarName) ? "未知目标" : dto.TarName,
                     TsName = dto.TsName,
-                    PosLon = Math.Round(res[0], 4),
-                    PosLat = Math.Round(res[1], 4),
-                    MirrLon = Math.Round(res[3], 4),
-                    MirrLat = Math.Round(res[4], 4),
+                    PosLon = res[0],
+                    PosLat = res[1],
+                    MirrLon = res[3],
+                    MirrLat = res[4],
                 };
                 db.PosRes.Add(posRes);
                 await db.SaveChangesAsync();
@@ -529,25 +521,63 @@ namespace XdCxRhDW.App.WebAPI
         }
 
         /// <summary>
-        /// 融合定位(含星历)
+        /// 融合带参定位(无星历)
         /// </summary>
-        /// <param name="dto">定位参数</param>
-        /// <returns></returns>
+        /// <returns>返回定位结果ID</returns>
         [HttpPost]
-        public async Task<AjaxResult<PosRes>> PosRhAsync(RHPosDto dto)
+        public async Task<AjaxResult<PosRes>> PosRhNoXlAsync(RHNoXlPosDto dto)
         {
             using (RHDWContext db = new RHDWContext())
             {
-                var runTask = await db.TaskInfos.FirstOrDefaultAsync(p => p.PosType == EnumPosType.RH && p.TaskState == EnumTaskState.Running);
+                var runTask = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && p.PosType == EnumPosType.RH).FirstOrDefaultAsync();
                 if (runTask == null)
                 {
-                    Serilog.Log.Warning($"接收到融合带参定位(含星历)参数,由于任务没有运行中忽略本次定位!");
-                    return Error<PosRes>($"多模式融合定位平台没有启动两星一地定位任务");
+                    Serilog.Log.Warning($"接收到融合定位参数,由于任务没有运行中忽略本次定位!");
+                    return Error<PosRes>($"多模式融合定位平台没有启动融合定位任务");
                 }
-                var listTx = new List<TxInfo>();
-                var cgRes = new CgRes();
-                var cxRes = new CxRes();
-                cgRes = db.CgRes.Add(new CgRes()
+                var parameter1 = new SQLiteParameter("@sigTime", dto.SigTime);
+                var parameter2 = new SQLiteParameter("@satcode", dto.MainSatID);
+                var parameter3 = new SQLiteParameter("@satcode", dto.AdjaSatID);
+                var xlInfo1 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter2).FirstOrDefaultAsync();
+                if (xlInfo1 == null)
+                {
+                    Serilog.Log.Error($"未找到卫星[{dto.MainSatID}]的双行根数星历");
+                    return Error<PosRes>($"未找到卫星[{dto.MainSatID}]的双行根数星历");
+                }
+
+                var xlInfo2 = await db.XlInfos.SqlQuery("select * from XlInfo where ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))=(select min(ABS(JULIANDAY(TimeBJ)-JULIANDAY(@sigTime))) from XlInfo where satcode=@satcode)", parameter1, parameter3).FirstOrDefaultAsync();
+                if (xlInfo2 == null)
+                {
+                    Serilog.Log.Error($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
+                    return Error<PosRes>($"未找到卫星[{dto.AdjaSatID}]的双行根数星历");
+                }
+                Serilog.Log.Information($"卫星{dto.MainSatID}使用{xlInfo1.TwoLine}进行星历推算");
+                Serilog.Log.Information($"卫星{dto.AdjaSatID}使用{xlInfo2.TwoLine}进行星历推算");
+                var settings = await db.SysSetings.FirstOrDefaultAsync();
+                var client = new HttpClient();
+                string url = string.Format("http://{0}:{1}/Api/", IpHelper.GetLocalIp(), settings.HttpPort);
+                var url1 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo1.TwoLine, dto.SigTime);
+                var response = await client.GetAsync(url1);
+                if (!response.IsSuccessStatusCode) // 处理响应失败
+                {
+                    Serilog.Log.Error($"[{dto.MainSatID}]星厉推算失败");
+                    return Error<PosRes>($"[{dto.MainSatID}]星厉推算失败");
+                }
+                var content = await response.Content.ReadAsStringAsync();
+                var ephMain = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content).data;
+
+                var url2 = string.Format(url + "Xl/Calc?tleStr={0}&dt={1}", xlInfo2.TwoLine, dto.SigTime);
+                var response2 = await client.GetAsync(url2);
+                if (!response2.IsSuccessStatusCode) // 处理响应失败
+                {
+                    Serilog.Log.Error($"[{dto.AdjaSatID}]星厉推算失败");
+                    return Error<PosRes>($"[{dto.AdjaSatID}]星厉推算失败");
+                }
+                var content2 = await response2.Content.ReadAsStringAsync();
+                var ephAdja = JsonConvert.DeserializeObject<AjaxResult<SatEphDto>>(content2).data;
+                //var ephMain = EphHelper.Calc(xlInfo1.TwoLine, dto.SigTime);
+                //var ephAdja = EphHelper.Calc(xlInfo2.TwoLine, dto.SigTime);
+                var cgRes = db.CgRes.Add(new CgRes()
                 {
                     SigTime = dto.SigTime,
                     DtoSx = dto.SxDto * 1e6,
@@ -558,38 +588,46 @@ namespace XdCxRhDW.App.WebAPI
                     SnrCdb = dto.XdSnr,
                     YbMain = dto.MainYbDto * 1e6,
                     YbAdja = dto.AdjaYbDto * 1e6,
-                    MainX = dto.MainX,
-                    MainY = dto.MainY,
-                    MainZ = dto.MainZ,
-                    AdjaX = dto.AdjaX,
-                    AdjaY = dto.AdjaY,
-                    AdjaZ = dto.AdjaZ,
+                    MainX = ephMain.X,
+                    MainY = ephMain.Y,
+                    MainZ = ephMain.Z,
+                    AdjaX = ephAdja.X,
+                    AdjaY = ephAdja.Y,
+                    AdjaZ = ephAdja.Z,
                 });
-                listTx = await db.TxInfos.ToListAsync();
-                cxRes = db.CxRes.Add(new CxRes()
+
+                var cxRes = db.CxRes.Add(new CxRes()
                 {
                     SigTime = dto.SigTime,
                     Fx = dto.CxRes,
                 });
 
+                var StationRes = db.StationRes.Add(new StationRes()
+                {
+                    SatTxLon = dto.StationResInfo.SatTxLon,
+                    SatTxLat = dto.StationResInfo.SatTxLat,
+                    CdbTxLon = dto.StationResInfo.CdbTxLon,
+                    CdbTxLat = dto.StationResInfo.CdbTxLat,
+                    CxLon = dto.StationResInfo.CxLon,
+                    CxLat = dto.StationResInfo.CxLat,
+                    RefLon = dto.StationResInfo.RefLon,
+                    RefLat = dto.StationResInfo.RefLat,
+                });
+
                 double[] resX1D1 = new double[6];
                 double[] resX2D1 = new double[6];
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-                var cxTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
-                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
                 double[] mainSat = new double[3] { cgRes.MainX, cgRes.MainY, cgRes.MainZ };
                 double[] adjaSat = new double[3] { cgRes.AdjaX, cgRes.AdjaY, cgRes.AdjaZ };
-                double[] satStation = new double[3] { satTx.Lon, satTx.Lat, 0 };
-                double[] cdbStation = new double[3] { cdbTx.Lon, cdbTx.Lat, 0 };
-                double[] cxStation = new double[3] { cxTx.Lon, cxTx.Lat, 0 };
-                double[] refStation = new double[3] { refTx.Lon, refTx.Lat, 0 };
+                double[] satStation = new double[3] { dto.StationResInfo.SatTxLon, dto.StationResInfo.SatTxLat, 0 };
+                double[] cdbStation = new double[3] { dto.StationResInfo.CdbTxLon, dto.StationResInfo.CdbTxLat, 0 };
+                double[] cxStation = new double[3] { dto.StationResInfo.CxLon, dto.StationResInfo.CxLat, 0 };
+                double[] refStation = new double[3] { dto.StationResInfo.RefLon, dto.StationResInfo.RefLat, 0 };
                 double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
                 double theta = cxRes.Fx;//单位°
 
-                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, resX1D1);
+                PosApi.X1D1_POS2023_Core(mainSat, satStation, cdbStation, cxStation, refStation, zone, theta, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, resX1D1);
 
-                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx / 1e6, cgRes.DtoCdb / 1e6, cgRes.YbMain / 1e6, cgRes.YbAdja / 1e6, resX2D1);
+                PosApi.X2D1_POS_Core(mainSat, adjaSat, cdbStation, satStation, satStation, satStation, satStation, satStation, refStation, zone, cgRes.DtoSx.Value / 1e6, cgRes.DtoCdb.Value / 1e6, cgRes.YbMain.Value / 1e6, cgRes.YbAdja.Value / 1e6, resX2D1);
 
                 double[] res = new double[] { 999, 999, 0, 999, 999, 0 };
                 if (PosApi.IsGeoPoint(resX1D1) && PosApi.IsGeoPoint(resX2D1))
@@ -632,7 +670,7 @@ namespace XdCxRhDW.App.WebAPI
                 PosRes posRes = new PosRes()
                 {
                     SigTime = cgRes.SigTime,
-                    TaskID = runTask.ID,
+                    TaskInfoID = runTask.ID,
                     CxResID = cxRes.ID,
                     CgResID = cgRes.ID,
                     TarName = string.IsNullOrWhiteSpace(dto.TarName) ? "未知目标" : dto.TarName,
@@ -647,6 +685,7 @@ namespace XdCxRhDW.App.WebAPI
                 return Success(posRes);
             }
         }
+        #endregion
 
         /// <summary>
         /// 查询定位结果(暂未实现)

+ 1 - 0
XdCxRhDW.Sender/Form1.cs

@@ -70,6 +70,7 @@ namespace XdCxRhDW.Sender
                                 var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                                 SendDto dto = new SendDto()
                                 {
+                                    SignalTime = DateTime.Now,
                                     SxDto = Convert.ToDouble(items[0]),
                                     XdDto = Convert.ToDouble(items[1]),
                                     MainYbDto = Convert.ToDouble(items[2]),

+ 101 - 0
XdCxRhDw.Dto/PosDto/RHNoParPosDto.cs

@@ -0,0 +1,101 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    /// 融合无参定位参数DTO(含星历)
+    /// </summary>
+    public class RHNoParPosDto
+    {
+        /// <summary>
+        /// 信号时刻(北京时间)
+        /// </summary>
+        public DateTime SigTime { get; set; }
+
+        /// <summary>
+        /// 目标双星时差(us)
+        /// </summary>
+        public double SxDto { get; set; }
+
+        /// <summary>
+        /// 目标双星频差(Hz)
+        /// </summary>
+        public double SxDfo { get; set; }
+
+        /// <summary>
+        /// 目标双星信噪比(dB)
+        /// </summary>
+        public double SxSnr { get; set; }
+
+        /// <summary>
+        /// 目标星地时差(us)
+        /// </summary>
+        public double XdDto { get; set; }
+
+        /// <summary>
+        /// 目标星地频差(Hz)
+        /// </summary>
+        public double XdDfo { get; set; }
+
+        /// <summary>
+        /// 目标星地信噪比(dB)
+        /// </summary>
+        public double XdSnr { get; set; }
+
+        /// <summary>
+        /// 测向结果
+        /// </summary>
+        public double CxRes { get; set; }
+
+        /// <summary>
+        /// 目标名称(可空)
+        /// </summary>
+        public string TarName { get; set; }
+
+        /// <summary>
+        /// 时隙名称(可空)
+        /// </summary>
+        public string TsName { get; set; }
+
+        /// <summary>
+        ///  主星X坐标
+        /// </summary>
+        public double MainX { get; set; }
+
+        /// <summary>
+        /// 主星Y坐标
+        /// </summary>
+        public double MainY { get; set; }
+
+        /// <summary>
+        /// 主星Z坐标
+        /// </summary>
+        public double MainZ { get; set; }
+
+        /// <summary>
+        ///  邻星X坐标
+        /// </summary>
+        public double AdjaX { get; set; }
+
+        /// <summary>
+        ///  邻星Y坐标
+        /// </summary>
+        public double AdjaY { get; set; }
+
+        /// <summary>
+        ///  邻星Z坐标
+        /// </summary>
+        public double AdjaZ { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+    }
+        
+}

+ 72 - 0
XdCxRhDw.Dto/PosDto/RHNoXlNoParPosDto.cs

@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    /// 融合无参定位参数DTO(无星历)
+    /// </summary>
+    public class RHNoXlNoParPosDto
+    {
+        /// <summary>
+        /// 信号时刻(北京时间)
+        /// </summary>
+        public DateTime SigTime { get; set; }
+
+        /// <summary>
+        /// 目标双星时差(us)
+        /// </summary>
+        public double SxDto { get; set; }
+
+        /// <summary>
+        /// 目标双星频差(Hz)
+        /// </summary>
+        public double SxDfo { get; set; }
+
+        /// <summary>
+        /// 目标双星信噪比(dB)
+        /// </summary>
+        public double SxSnr { get; set; }
+
+        /// <summary>
+        /// 目标星地时差(us)
+        /// </summary>
+        public double XdDto { get; set; }
+
+        /// <summary>
+        /// 目标星地频差(Hz)
+        /// </summary>
+        public double XdDfo { get; set; }
+
+        /// <summary>
+        /// 目标星地信噪比(dB)
+        /// </summary>
+        public double XdSnr { get; set; }
+
+        /// <summary>
+        /// 测向结果
+        /// </summary>
+        public double CxRes { get; set; }
+
+        /// <summary>
+        /// 目标名称(可空)
+        /// </summary>
+        public string TarName { get; set; }
+
+        /// <summary>
+        /// 时隙名称(可空)
+        /// </summary>
+        public string TsName { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+
+    }
+        
+}

+ 7 - 1
XdCxRhDw.Dto/PosDto/RHNoXlPosDto.cs

@@ -3,11 +3,12 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
 
 namespace XdCxRhDw.Dto
 {
     /// <summary>
-    /// 一星一地带参定位参数DTO(含星历)
+    /// 融合带参定位参数DTO(无星历)
     /// </summary>
     public class RHNoXlPosDto
     {
@@ -80,5 +81,10 @@ namespace XdCxRhDw.Dto
         /// 时隙名称(可空)
         /// </summary>
         public string TsName { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
     }
 }

+ 7 - 1
XdCxRhDw.Dto/PosDto/RHPosDto.cs

@@ -3,11 +3,12 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
 
 namespace XdCxRhDw.Dto
 {
     /// <summary>
-    /// 一星一地带参定位参数DTO(含星历)
+    /// 融合带参定位参数DTO(含星历)
     /// </summary>
     public class RHPosDto
     {
@@ -100,6 +101,11 @@ namespace XdCxRhDw.Dto
         ///  邻星Z坐标
         /// </summary>
         public double AdjaZ { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
     }
         
 }

+ 54 - 0
XdCxRhDw.Dto/PosDto/StationResDto.cs

@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDw.Dto.PosDto
+{
+    /// <summary>
+    /// 站点信息
+    /// </summary>
+    public class StationResDto
+    {
+        /// <summary>
+        /// 卫星接收天线经度
+        /// </summary>
+        public double SatTxLon { get; set; }
+
+        /// <summary>
+        /// 卫星接收天线纬度
+        /// </summary>
+        public double SatTxLat { get; set; }
+
+        /// <summary>
+        /// 超短波天线经度
+        /// </summary>
+        public double CdbTxLon { get; set; }
+
+        /// <summary>
+        /// 超短波接收天线纬度
+        /// </summary>
+        public double CdbTxLat { get; set; }
+
+        /// <summary>
+        /// 测向站经度
+        /// </summary>
+        public double CxLon { get; set; }
+
+        /// <summary>
+        /// 测向站纬度
+        /// </summary>
+        public double CxLat { get; set; }
+
+        /// <summary>
+        /// 参考站经度
+        /// </summary>
+        public double RefLon { get; set; }
+
+        /// <summary>
+        /// 参考站纬度
+        /// </summary>
+        public double RefLat { get; set; }
+    }
+}

+ 71 - 0
XdCxRhDw.Dto/PosDto/X1D1NoParPosDto.cs

@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    /// 一星一地无参定位参数DTO(含星历)
+    /// </summary>
+    public class X1D1NoParPosDto
+    {
+        /// <summary>
+        /// 信号时刻(北京时间)
+        /// </summary>
+        public DateTime SigTime { get; set; }
+
+        /// <summary>
+        /// 目标星地时差(us)
+        /// </summary>
+        public double XdDto { get; set; }
+
+        /// <summary>
+        /// 目标星地频差(Hz)
+        /// </summary>
+        public double XdDfo { get; set; }
+
+        /// <summary>
+        /// 目标星地信噪比(dB)
+        /// </summary>
+        public double XdSnr { get; set; }
+
+        /// <summary>
+        /// 测向结果
+        /// </summary>
+        public double CxRes { get; set; }
+
+        /// <summary>
+        /// 目标名称(可空)
+        /// </summary>
+        public string TarName { get; set; }
+
+        /// <summary>
+        /// 时隙名称(可空)
+        /// </summary>
+        public string TsName { get; set; }
+
+        /// <summary>
+        ///  卫星X坐标
+        /// </summary>
+        public double MainX { get; set; }
+
+        /// <summary>
+        /// 卫星Y坐标
+        /// </summary>
+        public double MainY { get; set; }
+
+        /// <summary>
+        /// 卫星Z坐标
+        /// </summary>
+        public double MainZ { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+    }
+        
+}

+ 60 - 0
XdCxRhDw.Dto/PosDto/X1D1NoXlNoParPosDto.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    ///一星一地无参定位参数DTO(无星历)
+    /// </summary>
+    public class X1D1NoXlNoParPosDto
+    {
+        /// <summary>
+        /// 信号时刻(北京时间)
+        /// </summary>
+        public DateTime SigTime { get; set; }
+
+        /// <summary>
+        /// 卫星编号
+        /// </summary>
+        public int MainSatID { get; set; }
+
+        /// <summary>
+        /// 目标星地时差(us)
+        /// </summary>
+        public double XdDto { get; set; }
+
+        /// <summary>
+        /// 目标星地频差(Hz)
+        /// </summary>
+        public double XdDfo { get; set; }
+
+        /// <summary>
+        /// 目标星地信噪比(dB)
+        /// </summary>
+        public double XdSnr { get; set; }
+
+        /// <summary>
+        /// 测向结果
+        /// </summary>
+        public double CxRes { get; set; }
+
+        /// <summary>
+        /// 目标名称(可空)
+        /// </summary>
+        public string TarName { get; set; }
+
+        /// <summary>
+        /// 时隙名称(可空)
+        /// </summary>
+        public string TsName { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+    }
+}

+ 7 - 1
XdCxRhDw.Dto/PosDto/X1D1NoXlPosDto.cs

@@ -3,11 +3,12 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
 
 namespace XdCxRhDw.Dto
 {
     /// <summary>
-    /// 两星一地定位参数DTO
+    /// 一星一地带参定位参数DTO(无星历)
     /// </summary>
     public class X1D1NoXlPosDto
     {
@@ -55,5 +56,10 @@ namespace XdCxRhDw.Dto
         /// 时隙名称(可空)
         /// </summary>
         public string TsName { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
     }
 }

+ 6 - 5
XdCxRhDw.Dto/PosDto/X1D1PosDto.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
 
 namespace XdCxRhDw.Dto
 {
@@ -36,11 +37,6 @@ namespace XdCxRhDw.Dto
         /// </summary>
         public double MainYbDto { get; set; }
 
-        /// <summary>
-        /// 参考样本邻时差(us)
-        /// </summary>
-        public double AdjaYbDto { get; set; }
-
         /// <summary>
         /// 测向结果
         /// </summary>
@@ -70,6 +66,11 @@ namespace XdCxRhDw.Dto
         /// 卫星Z坐标
         /// </summary>
         public double MainZ { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
     }
         
 }

+ 97 - 0
XdCxRhDw.Dto/PosDto/X2D1NoParPosDto.cs

@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    /// 两星一地无参定位参数DTO(含星历)
+    /// </summary>
+    public class X2D1NoParPosDto
+    {
+        /// <summary>
+        /// 信号时刻(北京时间)
+        /// </summary>
+        public DateTime SigTime { get; set; }
+
+        /// <summary>
+        /// 目标双星时差(us)
+        /// </summary>
+        public double SxDto { get; set; }
+
+        /// <summary>
+        /// 目标双星频差(Hz)
+        /// </summary>
+        public double SxDfo { get; set; }
+
+        /// <summary>
+        /// 目标双星信噪比(dB)
+        /// </summary>
+        public double SxSnr { get; set; }
+
+        /// <summary>
+        /// 目标星地时差(us)
+        /// </summary>
+        public double XdDto { get; set; }
+
+        /// <summary>
+        /// 目标星地频差(Hz)
+        /// </summary>
+        public double XdDfo { get; set; }
+
+        /// <summary>
+        /// 目标星地信噪比(dB)
+        /// </summary>
+        public double XdSnr { get; set; }
+
+        /// <summary>
+        /// 目标名称(可空)
+        /// </summary>
+        public string TarName { get; set; }
+
+        /// <summary>
+        /// 时隙名称(可空)
+        /// </summary>
+        public string TsName { get; set; }
+
+        /// <summary>
+        ///  主星X坐标
+        /// </summary>
+        public double MainX { get; set; }
+
+        /// <summary>
+        /// 主星Y坐标
+        /// </summary>
+        public double MainY { get; set; }
+
+        /// <summary>
+        /// 主星Z坐标
+        /// </summary>
+        public double MainZ { get; set; }
+
+        /// <summary>
+        ///  邻星X坐标
+        /// </summary>
+        public double AdjaX { get; set; }
+
+        /// <summary>
+        ///  邻星Y坐标
+        /// </summary>
+        public double AdjaY { get; set; }
+
+        /// <summary>
+        ///  邻星Z坐标
+        /// </summary>
+        public double AdjaZ { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+
+    }
+        
+}

+ 67 - 0
XdCxRhDw.Dto/PosDto/X2D1NoXNoParlPosDto.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    /// 两星一地无参定位参数DTO(无星历)
+    /// </summary>
+    public class X2D1NoXNoParlPosDto
+    {
+        /// <summary>
+        /// 信号时刻(北京时间)
+        /// </summary>
+        public DateTime SigTime { get; set; }
+
+        /// <summary>
+        /// 目标双星时差(us)
+        /// </summary>
+        public double SxDto { get; set; }
+
+        /// <summary>
+        /// 目标双星频差(Hz)
+        /// </summary>
+        public double SxDfo { get; set; }
+
+        /// <summary>
+        /// 目标双星信噪比(dB)
+        /// </summary>
+        public double SxSnr { get; set; }
+
+        /// <summary>
+        /// 目标星地时差(us)
+        /// </summary>
+        public double XdDto { get; set; }
+
+        /// <summary>
+        /// 目标星地频差(Hz)
+        /// </summary>
+        public double XdDfo { get; set; }
+
+        /// <summary>
+        /// 目标星地信噪比(dB)
+        /// </summary>
+        public double XdSnr { get; set; }
+
+        /// <summary>
+        /// 目标名称(可空)
+        /// </summary>
+        public string TarName { get; set; }
+
+        /// <summary>
+        /// 时隙名称(可空)
+        /// </summary>
+        public string TsName { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+
+    }
+        
+}

+ 6 - 0
XdCxRhDw.Dto/PosDto/X2D1NoXlPosDto.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
 
 namespace XdCxRhDw.Dto
 {
@@ -79,5 +80,10 @@ namespace XdCxRhDw.Dto
         /// 时隙名称(可空)
         /// </summary>
         public string TsName { get; set; }
+
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
     }
 }

+ 6 - 0
XdCxRhDw.Dto/PosDto/X2D1PosDto.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDw.Dto.PosDto;
 
 namespace XdCxRhDw.Dto
 {
@@ -96,6 +97,11 @@ namespace XdCxRhDw.Dto
         /// </summary>
         public double AdjaZ { get; set; }
 
+        /// <summary>
+        /// 站点信息
+        /// </summary>
+        public StationResDto StationResInfo { get; set; }
+
     }
         
 }

+ 4 - 0
XdCxRhDw.Dto/SendDto.cs

@@ -11,6 +11,10 @@ namespace XdCxRhDW.Dto
     /// </summary>
     public class SendDto
     {
+        /// <summary>
+        /// 信号时间(北京)
+        /// </summary>
+        public DateTime SignalTime { get; set; }
         /// <summary>
         /// 双星目标时差
         /// </summary>

+ 7 - 0
XdCxRhDw.Dto/XdCxRhDw.Dto.csproj

@@ -52,7 +52,14 @@
     <Compile Include="EstimationResDto.cs" />
     <Compile Include="FileDto.cs" />
     <Compile Include="PosDto\RHNoXlPosDto.cs" />
+    <Compile Include="PosDto\RHNoXlNoParPosDto.cs" />
+    <Compile Include="PosDto\RHNoParPosDto.cs" />
+    <Compile Include="PosDto\StationResDto.cs" />
+    <Compile Include="PosDto\X1D1NoXlNoParPosDto.cs" />
     <Compile Include="PosDto\X1D1NoXlPosDto.cs" />
+    <Compile Include="PosDto\X1D1NoParPosDto.cs" />
+    <Compile Include="PosDto\X2D1NoXNoParlPosDto.cs" />
+    <Compile Include="PosDto\X2D1NoParPosDto.cs" />
     <Compile Include="PosResQueryDto.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="SendDto.cs" />