|
@@ -684,7 +684,9 @@ namespace XdCxRhDW.App.UserControl
|
|
|
case EnumPosResType.X2Dfo:
|
|
|
DrawX3toLine(item);
|
|
|
break;
|
|
|
-
|
|
|
+ case EnumPosResType.X3NoRef:
|
|
|
+ DrawX3NoReftoLine(item);
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -760,7 +762,7 @@ namespace XdCxRhDW.App.UserControl
|
|
|
twoStartOption.RefDto = cg.YbMainDto.Value - cg.YbAdja1Dto.Value;
|
|
|
twoStartOption.PosLon = item.PosLon;
|
|
|
twoStartOption.PosLat = item.PosLat;
|
|
|
- var tsDtoLine = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
|
|
|
+ var tsDtoLine = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
|
|
|
string nsat = string.Empty;
|
|
|
if (cg.Adja1Code.HasValue)
|
|
|
{
|
|
@@ -817,10 +819,18 @@ namespace XdCxRhDW.App.UserControl
|
|
|
twoStartOption.RefDto = cg.YbMainDto.Value - cg.YbAdja1Dto.Value;
|
|
|
twoStartOption.PosLon = item.PosLon;
|
|
|
twoStartOption.PosLat = item.PosLat;
|
|
|
-
|
|
|
- var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
|
|
|
- var tsDtoLine = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
|
|
|
- mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat}]时差线", tsDtoLine);
|
|
|
+ string msat = string.Empty;
|
|
|
+ string ad1sat = string.Empty;
|
|
|
+ if (cg.MainCode.HasValue)
|
|
|
+ {
|
|
|
+ msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
|
|
|
+ }
|
|
|
+ if (cg.Adja1Code.HasValue)
|
|
|
+ {
|
|
|
+ ad1sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
|
|
|
+ }
|
|
|
+ var tsDtoLine = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
|
|
|
+ mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{ad1sat}]时差线", tsDtoLine);
|
|
|
if (item.PosResType == EnumPosResType.X3)
|
|
|
{
|
|
|
twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, 0, 0, 0 };
|
|
@@ -828,8 +838,13 @@ namespace XdCxRhDW.App.UserControl
|
|
|
twoStartOption.RefDto = cg.YbMainDto.Value - cg.YbAdja2Dto.Value;
|
|
|
twoStartOption.PosLon = item.PosLon;
|
|
|
twoStartOption.PosLat = item.PosLat;
|
|
|
- var tsDtoLine1 = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
|
|
|
- mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]时差线", tsDtoLine1);
|
|
|
+ var tsDtoLine1 = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
|
|
|
+ string ad2sat = string.Empty;
|
|
|
+ if (cg.Adja2Code.HasValue)
|
|
|
+ {
|
|
|
+ ad2sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat;
|
|
|
+ }
|
|
|
+ mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{ad2sat}]时差线", tsDtoLine1);
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -838,6 +853,80 @@ namespace XdCxRhDW.App.UserControl
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
|
|
|
}
|
|
|
}
|
|
|
+ private async void DrawX3NoReftoLine(PosRes item)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ StationRes station;
|
|
|
+ List<SatInfo> listSat = new List<SatInfo>();
|
|
|
+ CgRes cg;
|
|
|
+ using (RHDWContext db = new RHDWContext())
|
|
|
+ {
|
|
|
+
|
|
|
+ listSat = db.SatInfos.ToList();
|
|
|
+ cg = await db.CgRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
|
|
|
+ station = await db.StationRes.Where(m => m.ID == item.StationResID).FirstOrDefaultAsync();
|
|
|
+ }
|
|
|
+ if (cg == null)
|
|
|
+ {
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"未找到定位相关的计算[{item.CgResID}]信息");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (station == null)
|
|
|
+ {
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"站点信息为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (station.RefLon == 0 || station.RefLat == 0)
|
|
|
+ {
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"参考站信息为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ DtoLineTwoStartOption twoStartOption = new DtoLineTwoStartOption();
|
|
|
+ twoStartOption.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, 0, 0, 0 };
|
|
|
+ twoStartOption.NsEph = new double[] { cg.Adja1X.Value, cg.Adja1Y.Value, cg.Adja1Z.Value, 0, 0, 0 };
|
|
|
+ twoStartOption.MsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ twoStartOption.NsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ twoStartOption.RefGeod = new double[] { 0, 0, 0 };
|
|
|
+ twoStartOption.TargetDto = cg.Dto1.Value;
|
|
|
+ twoStartOption.RefDto = 0;
|
|
|
+ twoStartOption.PosLon = item.PosLon;
|
|
|
+ twoStartOption.PosLat = item.PosLat;
|
|
|
+ string msat = string.Empty;
|
|
|
+ string ad1sat = string.Empty;
|
|
|
+ if (cg.MainCode.HasValue)
|
|
|
+ {
|
|
|
+ msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
|
|
|
+ }
|
|
|
+ if (cg.Adja1Code.HasValue)
|
|
|
+ {
|
|
|
+ ad1sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
|
|
|
+ }
|
|
|
+ var tsDtoLine = DrawDtoLineHelper.DtoLine2XNoRefStart(twoStartOption);
|
|
|
+ mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{ad1sat}]时差线", tsDtoLine);
|
|
|
+
|
|
|
+ twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, 0, 0, 0 };
|
|
|
+ twoStartOption.TargetDto = cg.Dto2.Value;
|
|
|
+ twoStartOption.RefDto = 0;
|
|
|
+ twoStartOption.PosLon = item.PosLon;
|
|
|
+ twoStartOption.PosLat = item.PosLat;
|
|
|
+ var tsDtoLine1 = DrawDtoLineHelper.DtoLine2XNoRefStart(twoStartOption);
|
|
|
+ string ad2sat = string.Empty;
|
|
|
+ if (cg.Adja2Code.HasValue)
|
|
|
+ {
|
|
|
+ ad2sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat;
|
|
|
+ }
|
|
|
+ mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{ad2sat}]时差线", tsDtoLine1);
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Serilog.Log.Error($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败", ex);
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
|
|
|
+ }
|
|
|
+ }
|
|
|
private void DrawDfoLine(PosRes item)
|
|
|
{
|
|
|
switch (item.PosResType)
|
|
@@ -900,8 +989,17 @@ namespace XdCxRhDW.App.UserControl
|
|
|
twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja1Dfo.Value;
|
|
|
var tsDtoLine = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
|
|
|
|
|
|
- var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
|
|
|
- mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1X.Value)?.Sat}]频差线", tsDtoLine);
|
|
|
+ string msat = string.Empty;
|
|
|
+ string ad1sat = string.Empty;
|
|
|
+ if (cg.MainCode.HasValue)
|
|
|
+ {
|
|
|
+ msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat; ;
|
|
|
+ }
|
|
|
+ if (cg.Adja1Code.HasValue)
|
|
|
+ {
|
|
|
+ ad1sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
|
|
|
+ }
|
|
|
+ mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{ad1sat}]频差线", tsDtoLine);
|
|
|
|
|
|
if (item.PosResType == EnumPosResType.X3TwoDfo)
|
|
|
{
|
|
@@ -909,7 +1007,12 @@ namespace XdCxRhDW.App.UserControl
|
|
|
twoStartOption.TargetDfo = cg.Dfo2.Value;
|
|
|
twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja2Dfo.Value;
|
|
|
var tsDtoLine1 = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
|
|
|
- mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]频差线", tsDtoLine1);
|
|
|
+ string ad2sat = string.Empty;
|
|
|
+ if (cg.Adja2Code.HasValue)
|
|
|
+ {
|
|
|
+ ad2sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat;
|
|
|
+ }
|
|
|
+ mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{ad2sat}]频差线", tsDtoLine1);
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|