|
@@ -302,19 +302,34 @@ namespace XdCxRhDW.App.UserControl
|
|
|
{
|
|
|
case EnumPosType.X1D1CX:
|
|
|
//一星一地 测向线
|
|
|
- btnDrawDfo.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
+ btnDrawDto.Visibility = btnDrawDfo.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
break;
|
|
|
case EnumPosType.X2D1:
|
|
|
//两星一地 GDOP 时差线
|
|
|
- btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
+ btnDrawDto.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
btnDrawCX.Visibility = btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
break;
|
|
|
case EnumPosType.RH:
|
|
|
//融合DW GDOP 时差线 测向线
|
|
|
- btnDrawCX.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
+ btnDrawDto.Visibility = btnDrawCX.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
break;
|
|
|
+ case EnumPosType.X3TwoDto:
|
|
|
+ //三星双时差DW GDOP 时差线
|
|
|
+ btnDrawDto.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
+ btnDrawCX.Visibility = btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
+ break;
|
|
|
+ case EnumPosType.X3TwoDfo:
|
|
|
+ //三星双频差DW GDOP 频差线
|
|
|
+ btnDrawDfo.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
+ btnDrawDto.Visibility = btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
+ break;
|
|
|
+ case EnumPosType.X2Dfo:
|
|
|
+ //双星时频差DW GDOP 时频差线
|
|
|
+ btnDrawDto.Visibility = btnDrawDfo.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
|
|
|
+ btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -632,10 +647,10 @@ namespace XdCxRhDW.App.UserControl
|
|
|
var posRes = info.Item1;
|
|
|
if (posRes == null) return;
|
|
|
var posType = info.Item2;
|
|
|
- DrawGDOP(posRes.SigTime, posType);
|
|
|
+ DrawGDOP(posRes, posType);
|
|
|
}
|
|
|
|
|
|
- private void DrawGDOP(DateTime sigTime, EnumPosType posType)
|
|
|
+ private void DrawGDOP(PosRes item, EnumPosType posType)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
@@ -648,7 +663,7 @@ namespace XdCxRhDW.App.UserControl
|
|
|
break;
|
|
|
case EnumPosType.X2D1:
|
|
|
case EnumPosType.RH:
|
|
|
- X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(sigTime);
|
|
|
+ X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item);
|
|
|
x2D1GdopParam.mapControl1 = mapControl1;
|
|
|
DxHelper.PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
|
|
|
break;
|
|
@@ -681,6 +696,11 @@ namespace XdCxRhDW.App.UserControl
|
|
|
DrawXDtoLine(item, EnumPosType.X1D1CX);
|
|
|
DrawXDtoLine(item, EnumPosType.X2D1);
|
|
|
break;
|
|
|
+ case EnumPosType.X3TwoDto:
|
|
|
+ case EnumPosType.X2Dfo:
|
|
|
+ DrawX3toLine(item, posType);
|
|
|
+ break;
|
|
|
+
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -691,72 +711,133 @@ namespace XdCxRhDW.App.UserControl
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- List<TxInfo> listTx = new List<TxInfo>();
|
|
|
+ StationRes station;
|
|
|
List<SatInfo> listSat = new List<SatInfo>();
|
|
|
CgRes cg;
|
|
|
using (RHDWContext db = new RHDWContext())
|
|
|
{
|
|
|
- listTx = db.TxInfos.ToList();
|
|
|
+
|
|
|
listSat = db.SatInfos.ToList();
|
|
|
cg = await db.CgRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
|
|
|
-
|
|
|
+ station = await db.StationRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
|
|
|
}
|
|
|
if (cg == null)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"未找到定位相关的计算[{item.CgResID}]信息");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
|
|
|
- if (satTx == null)
|
|
|
+ if (station == null)
|
|
|
{
|
|
|
- DxHelper.MsgBoxHelper.ShowWarning($"主星天线信息为空!");
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"站点信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
- var satNTx = listTx.Find(p => p.TxType == EnumTxType.AdjaSat);
|
|
|
- if (posType == EnumPosType.X2D1 && satNTx == null)
|
|
|
+ if (station.SatTxLon == 0 || station.SatTxLat == 0)
|
|
|
{
|
|
|
- DxHelper.MsgBoxHelper.ShowWarning($"邻星天线信息为空!");
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"天线信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
- var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
|
|
|
- if (cdbTx == null)
|
|
|
+
|
|
|
+ if (station.CdbTxLon == 0 || station.CdbTxLat == 0)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"超短波信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
- var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
|
|
|
- if (refTx == null)
|
|
|
+ if (station.RefLon == 0 || station.RefLat == 0)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"参考站信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
DtoLineXdOption dtoLineXd = new DtoLineXdOption();
|
|
|
dtoLineXd.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, 0, 0, 0 };
|
|
|
- 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.MsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ dtoLineXd.CDBAnt = new double[] { station.CdbTxLon, station.CdbTxLat, 0 };
|
|
|
+ dtoLineXd.RefGeod = new double[] { station.RefLon, station.RefLat, 0 };
|
|
|
dtoLineXd.xdDto = cg.DtoCdb.Value;
|
|
|
dtoLineXd.RefDto = cg.YbMainDto.Value;
|
|
|
dtoLineXd.PosLon = item.PosLon;
|
|
|
dtoLineXd.PosLat = item.PosLat;
|
|
|
+
|
|
|
+ var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
|
|
|
var xdDtoLine = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
|
|
|
- mapControl1.DrawDtoPonit($"星地[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat},{listSat.FirstOrDefault(m => m.ID == cdbTx.ID)?.Sat}]时差线", xdDtoLine);
|
|
|
+ mapControl1.DrawDtoPonit($"星地[{msat},[{station.CdbTxLon}°]]时差线", xdDtoLine);
|
|
|
|
|
|
if (posType == EnumPosType.X2D1)
|
|
|
{
|
|
|
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[] { satTx.Lon, satTx.Lat, 0 };
|
|
|
- twoStartOption.NsAnt = new double[] { satNTx.Lon, satNTx.Lat, 0 };
|
|
|
- twoStartOption.RefGeod = new double[] { refTx.Lon, refTx.Lat, 0 };
|
|
|
+ twoStartOption.MsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ twoStartOption.NsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ twoStartOption.RefGeod = new double[] { station.RefLon, station.RefLat, 0 };
|
|
|
twoStartOption.TargetDto = cg.Dto1.Value;
|
|
|
twoStartOption.RefDto = cg.YbMainDto.Value - cg.YbAdja1Dto.Value;
|
|
|
twoStartOption.PosLon = item.PosLon;
|
|
|
twoStartOption.PosLat = item.PosLat;
|
|
|
var tsDtoLine = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
|
|
|
- mapControl1.DrawDtoPonit($"双星[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat},{listSat.FirstOrDefault(m => m.ID == satNTx.ID)?.Sat}]时差线", tsDtoLine);
|
|
|
+ mapControl1.DrawDtoPonit($"双星[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat}]时差线", tsDtoLine);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Serilog.Log.Error($"绘制{posType.GetEnumDisplayName()}时差线失败", ex);
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"绘制{posType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private async void DrawX3toLine(PosRes item, EnumPosType posType)
|
|
|
+ {
|
|
|
+ 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.CgResID).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[] { station.RefLon, station.RefLat, 0 };
|
|
|
+ twoStartOption.TargetDto = cg.Dto1.Value;
|
|
|
+ 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($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat}]时差线", tsDtoLine);
|
|
|
+ if (posType == EnumPosType.X3TwoDto)
|
|
|
+ {
|
|
|
+ twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, 0, 0, 0 };
|
|
|
+ twoStartOption.TargetDto = cg.Dto2.Value;
|
|
|
+ twoStartOption.RefDto = cg.YbMainDto.Value - cg.YbAdja2Dto.Value;
|
|
|
+ twoStartOption.PosLon = item.PosLon;
|
|
|
+ twoStartOption.PosLat = item.PosLat;
|
|
|
+ var tsDtoLine1 = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
|
|
|
+ mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]时差线", tsDtoLine1);
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -769,78 +850,73 @@ namespace XdCxRhDW.App.UserControl
|
|
|
{
|
|
|
switch (posType)
|
|
|
{
|
|
|
- case EnumPosType.X1D1CX:
|
|
|
- case EnumPosType.X2D1:
|
|
|
- DrawXDfoLine(item, posType);
|
|
|
- break;
|
|
|
- case EnumPosType.RH:
|
|
|
- DrawXDfoLine(item, EnumPosType.X1D1CX);
|
|
|
- DrawXDfoLine(item, EnumPosType.X2D1);
|
|
|
+ case EnumPosType.X3TwoDfo:
|
|
|
+ case EnumPosType.X2Dfo:
|
|
|
+ DrawX3DfoLine(item, posType);
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- private async void DrawXDfoLine(PosRes item, EnumPosType posType)
|
|
|
+ private async void DrawX3DfoLine(PosRes item, EnumPosType posType)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- List<TxInfo> listTx = new List<TxInfo>();
|
|
|
+ StationRes station;
|
|
|
List<SatInfo> listSat = new List<SatInfo>();
|
|
|
CgRes cg;
|
|
|
using (RHDWContext db = new RHDWContext())
|
|
|
{
|
|
|
- listTx = db.TxInfos.ToList();
|
|
|
+
|
|
|
listSat = db.SatInfos.ToList();
|
|
|
cg = await db.CgRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
|
|
|
|
|
|
+ station = await db.StationRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
|
|
|
}
|
|
|
if (cg == null)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"未找到定位相关的计算[{item.CgResID}]信息");
|
|
|
return;
|
|
|
}
|
|
|
- var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
|
|
|
- if (satTx == null)
|
|
|
+ if (station == null)
|
|
|
{
|
|
|
- DxHelper.MsgBoxHelper.ShowWarning($"主星天线信息为空!");
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"站点信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
- var satNTx = listTx.Find(p => p.TxType == EnumTxType.AdjaSat);
|
|
|
- if (posType == EnumPosType.X2D1 && satNTx == null)
|
|
|
+ if (station.SatTxLon == 0 || station.SatTxLat == 0)
|
|
|
{
|
|
|
- DxHelper.MsgBoxHelper.ShowWarning($"邻星天线信息为空!");
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"天线信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
- var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
|
|
|
- if (cdbTx == null)
|
|
|
- {
|
|
|
- DxHelper.MsgBoxHelper.ShowWarning($"超短波信息为空!");
|
|
|
- return;
|
|
|
- }
|
|
|
- var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
|
|
|
- if (refTx == null)
|
|
|
+ if (station.RefLon == 0 || station.RefLat == 0)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"参考站信息为空!");
|
|
|
return;
|
|
|
}
|
|
|
- if (posType == EnumPosType.X2D1)
|
|
|
- {
|
|
|
- DfoLineTwoStartOption twoStartOption = new DfoLineTwoStartOption();
|
|
|
- twoStartOption.Freq = cg.TarFreqUp.HasValue ? cg.TarFreqUp.Value : 0;
|
|
|
- twoStartOption.RefFreq = cg.RefFreqUp.HasValue ? cg.RefFreqUp.Value : 0;
|
|
|
- twoStartOption.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, cg.MainVx.Value, cg.MainVy.Value, cg.MainVz.Value };
|
|
|
- twoStartOption.NsEph = new double[] { cg.Adja1X.Value, cg.Adja1Y.Value, cg.Adja1Z.Value, cg.Adja1Vx.Value, cg.Adja1Vy.Value, cg.Adja1Vz.Value };
|
|
|
- twoStartOption.MsAnt = new double[] { satTx.Lon, satTx.Lat };
|
|
|
- twoStartOption.NsAnt = new double[] { satNTx.Lon, satNTx.Lat };
|
|
|
- twoStartOption.RefGeod = new double[] { refTx.Lon, refTx.Lat };
|
|
|
- twoStartOption.TargetDfo = cg.Dfo1.Value;
|
|
|
- twoStartOption.Turn1 = Math.Abs(twoStartOption.Freq - (cg.TarFreqDown.HasValue ? cg.TarFreqDown.Value : 0));
|
|
|
- twoStartOption.Turn2 = Math.Abs(twoStartOption.RefFreq - (cg.RefFreqDown.HasValue ? cg.RefFreqDown.Value : 0));
|
|
|
- twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja1Dfo.Value;
|
|
|
- var tsDtoLine = DrawDfoLineHelper.DtfoLineTwoStart(twoStartOption);
|
|
|
- mapControl1.DrawDtoPonit($"双星[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat},{listSat.FirstOrDefault(m => m.ID == satNTx.ID)?.Sat}]频差线", tsDtoLine);
|
|
|
+ DfoLineTwoStartOption twoStartOption = new DfoLineTwoStartOption();
|
|
|
+ twoStartOption.Freq = cg.TarFreqUp.HasValue ? cg.TarFreqUp.Value : 0;
|
|
|
+ twoStartOption.RefFreq = cg.RefFreqUp.HasValue ? cg.RefFreqUp.Value : 0;
|
|
|
+ twoStartOption.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, cg.MainVx.Value, cg.MainVy.Value, cg.MainVz.Value };
|
|
|
+ twoStartOption.NsEph = new double[] { cg.Adja1X.Value, cg.Adja1Y.Value, cg.Adja1Z.Value, cg.Adja1Vx.Value, cg.Adja1Vy.Value, cg.Adja1Vz.Value };
|
|
|
+ twoStartOption.MsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ twoStartOption.NsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
|
|
|
+ twoStartOption.RefGeod = new double[] { station.RefLon, station.RefLat, 0 };
|
|
|
+ twoStartOption.TargetDfo = cg.Dfo1.Value;
|
|
|
+ twoStartOption.Turn1 = Math.Abs(twoStartOption.Freq - (cg.TarFreqDown.HasValue ? cg.TarFreqDown.Value : 0));
|
|
|
+ twoStartOption.Turn2 = Math.Abs(twoStartOption.RefFreq - (cg.RefFreqDown.HasValue ? cg.RefFreqDown.Value : 0));
|
|
|
+ twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja1Dfo.Value;
|
|
|
+ var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
|
|
|
+ var tsDtoLine = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
|
|
|
+ mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1X.Value)?.Sat}]频差线", tsDtoLine);
|
|
|
+
|
|
|
+ if (posType == EnumPosType.X3TwoDfo)
|
|
|
+ {
|
|
|
+ twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, cg.Adja2Vx.Value, cg.Adja2Vy.Value, cg.Adja2Vz.Value };
|
|
|
+ twoStartOption.TargetDfo = cg.Dfo2.Value;
|
|
|
+ twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja2Dfo.Value;
|
|
|
+ var tsDtoLine1 = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
|
|
|
+ mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]频差线", tsDtoLine1);
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -858,21 +934,25 @@ namespace XdCxRhDW.App.UserControl
|
|
|
}
|
|
|
try
|
|
|
{
|
|
|
- List<TxInfo> listTx = new List<TxInfo>();
|
|
|
CxRes cx;
|
|
|
+ StationRes station;
|
|
|
using (RHDWContext db = new RHDWContext())
|
|
|
{
|
|
|
- listTx = db.TxInfos.ToList();
|
|
|
cx = await db.CxRes.Where(m => m.ID == item.CxResID.Value).FirstOrDefaultAsync();
|
|
|
-
|
|
|
+ station = await db.StationRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
|
|
|
}
|
|
|
if (cx == null)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"未找到定位相关的测向[{item.CxResID.Value}]信息");
|
|
|
return;
|
|
|
}
|
|
|
- var satTx = listTx.Find(p => p.TxType == EnumTxType.Cx);
|
|
|
- if (satTx == null)
|
|
|
+ if (station == null)
|
|
|
+ {
|
|
|
+ DxHelper.MsgBoxHelper.ShowWarning($"站点信息为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (station.CxLon== 0 || station.CxLat == 0)
|
|
|
{
|
|
|
DxHelper.MsgBoxHelper.ShowWarning($"测向站信息为空!");
|
|
|
return;
|
|
@@ -880,10 +960,10 @@ namespace XdCxRhDW.App.UserControl
|
|
|
double startdeg = 360;
|
|
|
double deg = startdeg - cx.Fx;//向北顺时针方向为夹角
|
|
|
//计算测向站到定位点之间的距离
|
|
|
- var km = MapControlEx.CalcLineKm(satTx.Lon, satTx.Lat, item.PosLon, item.PosLat);
|
|
|
- var endpoint = MapControlEx.CalcSituation(satTx.Lon, satTx.Lat, deg, (km + 100) * 1000);
|
|
|
+ var km = MapControlEx.CalcLineKm(station.CxLon, station.CxLat, item.PosLon, item.PosLat);
|
|
|
+ var endpoint = MapControlEx.CalcSituation(station.CxLon, station.CxLat, deg, (km + 100) * 1000);
|
|
|
List<(double, double)> points = new List<(double, double)>();
|
|
|
- points.Add((satTx.Lon, satTx.Lat));
|
|
|
+ points.Add((station.CxLon, station.CxLat));
|
|
|
points.Add((endpoint.Item1, endpoint.Item2));
|
|
|
mapControl1.DrawCXLine($"测向线角度:{cx.Fx}°\t\n", points);
|
|
|
}
|