|
@@ -83,7 +83,7 @@ namespace XdCxRhDW.App.EditForms
|
|
var adja2Eph = (cg.Adja2X, cg.Adja2Y, cg.Adja2Z);
|
|
var adja2Eph = (cg.Adja2X, cg.Adja2Y, cg.Adja2Z);
|
|
ucEphXYZAdja2.SetXYZ($"邻星2", cg.Adja2Code, adja2Eph, Color.Black);
|
|
ucEphXYZAdja2.SetXYZ($"邻星2", cg.Adja2Code, adja2Eph, Color.Black);
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
if (station != null)
|
|
if (station != null)
|
|
@@ -95,10 +95,10 @@ namespace XdCxRhDW.App.EditForms
|
|
}
|
|
}
|
|
if (info.PosResType != EnumPosResType.X3TwoDto)
|
|
if (info.PosResType != EnumPosResType.X3TwoDto)
|
|
{
|
|
{
|
|
- txtYbMain.Properties.ReadOnly = true;
|
|
|
|
- txtYbAdja.Properties.ReadOnly = true;
|
|
|
|
- txtYbAdja1.Properties.ReadOnly = true;
|
|
|
|
- txtRefLocation.Properties.ReadOnly = true;
|
|
|
|
|
|
+ //txtYbMain.Properties.ReadOnly = true;
|
|
|
|
+ //txtYbAdja.Properties.ReadOnly = true;
|
|
|
|
+ //txtYbAdja1.Properties.ReadOnly = true;
|
|
|
|
+ //txtRefLocation.Properties.ReadOnly = true;
|
|
this.txtRefLocation.Text = $"{0},{0}";
|
|
this.txtRefLocation.Text = $"{0},{0}";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -111,7 +111,7 @@ namespace XdCxRhDW.App.EditForms
|
|
{
|
|
{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if (info.PosResType == EnumPosResType.X3TwoDto && !txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(txtRefLocation.Text) && !txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
|
|
{
|
|
{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -123,15 +123,15 @@ namespace XdCxRhDW.App.EditForms
|
|
{
|
|
{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if (info.PosResType == EnumPosResType.X3TwoDto && !txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(txtYbMain.Text) && !txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
|
|
{
|
|
{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if (info.PosResType == EnumPosResType.X3TwoDto && !txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星1时差"))
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(txtYbAdja.Text) && !txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星1时差"))
|
|
{
|
|
{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if (info.PosResType == EnumPosResType.X3TwoDto && !txtYbAdja1.CheckDouble(dxErrorProvider, "样本邻星2时差"))
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(txtYbAdja1.Text) && !txtYbAdja1.CheckDouble(dxErrorProvider, "样本邻星2时差"))
|
|
{
|
|
{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -160,14 +160,13 @@ namespace XdCxRhDW.App.EditForms
|
|
var MsAnt = txtsatStation1.GetLonLat();
|
|
var MsAnt = txtsatStation1.GetLonLat();
|
|
var Ns1Ant = txtsatStation2.GetLonLat();
|
|
var Ns1Ant = txtsatStation2.GetLonLat();
|
|
var Ns2Ant = txtsatStation3.GetLonLat();
|
|
var Ns2Ant = txtsatStation3.GetLonLat();
|
|
- var RefGeod = info.PosResType == EnumPosResType.X3TwoDto ? txtRefLocation.GetLonLat() : new double[3] { 0, 0, 0 };
|
|
|
|
|
|
+ var RefGeod = string.IsNullOrWhiteSpace(txtRefLocation.Text) ? new double[3] { 0, 0, 0 } : txtRefLocation.GetLonLat();
|
|
|
|
|
|
var DtoSx = Convert.ToDouble(this.txtDtoSx.Text);
|
|
var DtoSx = Convert.ToDouble(this.txtDtoSx.Text);
|
|
var DtoSx1 = Convert.ToDouble(this.txtDtoSx1.Text);
|
|
var DtoSx1 = Convert.ToDouble(this.txtDtoSx1.Text);
|
|
- var YbMainDto = info.PosResType == EnumPosResType.X3TwoDto ? Convert.ToDouble(this.txtYbMain.Text) : 0;
|
|
|
|
- var YbAdja1Dto = info.PosResType == EnumPosResType.X3TwoDto ? Convert.ToDouble(this.txtYbAdja.Text) : 0;
|
|
|
|
- var YbAdja2Dto = info.PosResType == EnumPosResType.X3TwoDto ? Convert.ToDouble(this.txtYbAdja1.Text) : 0;
|
|
|
|
-
|
|
|
|
|
|
+ var YbMainDto = string.IsNullOrWhiteSpace(txtYbMain.Text) ? 0 : Convert.ToDouble(this.txtYbMain.Text);
|
|
|
|
+ var YbAdja1Dto = string.IsNullOrWhiteSpace(txtYbAdja.Text) ? 0 : Convert.ToDouble(this.txtYbAdja.Text);
|
|
|
|
+ var YbAdja2Dto = string.IsNullOrWhiteSpace(txtYbAdja1.Text) ? 0 : Convert.ToDouble(this.txtYbAdja1.Text);
|
|
|
|
|
|
double[] msEph = ucEphXYZMain.EphXYZ();
|
|
double[] msEph = ucEphXYZMain.EphXYZ();
|
|
double[] Ns1Eph = ucEphXYZAdja1.EphXYZ();
|
|
double[] Ns1Eph = ucEphXYZAdja1.EphXYZ();
|
|
@@ -190,7 +189,10 @@ namespace XdCxRhDW.App.EditForms
|
|
if (string.IsNullOrWhiteSpace(nsat)) nsat = cg.Adja1Code.Value.ToString();
|
|
if (string.IsNullOrWhiteSpace(nsat)) nsat = cg.Adja1Code.Value.ToString();
|
|
var ad2sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat;
|
|
var ad2sat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat;
|
|
if (string.IsNullOrWhiteSpace(ad2sat)) ad2sat = cg.Adja2Code.Value.ToString();
|
|
if (string.IsNullOrWhiteSpace(ad2sat)) ad2sat = cg.Adja2Code.Value.ToString();
|
|
- if (info.PosResType == EnumPosResType.X3TwoDto)
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(txtRefLocation.Text)
|
|
|
|
+ && !string.IsNullOrWhiteSpace(txtYbMain.Text)
|
|
|
|
+ && !string.IsNullOrWhiteSpace(txtYbAdja.Text)
|
|
|
|
+ && !string.IsNullOrWhiteSpace(txtYbAdja1.Text))
|
|
{
|
|
{
|
|
var tsDtoLine = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
|
|
var tsDtoLine = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
|
|
mapControl1.DrawDtoLine($"[{msat},{nsat}]带参时差线", tsDtoLine);
|
|
mapControl1.DrawDtoLine($"[{msat},{nsat}]带参时差线", tsDtoLine);
|
|
@@ -283,14 +285,14 @@ namespace XdCxRhDW.App.EditForms
|
|
var MsAnt = txtsatStation1.GetLonLat();
|
|
var MsAnt = txtsatStation1.GetLonLat();
|
|
var Ns1Ant = txtsatStation2.GetLonLat();
|
|
var Ns1Ant = txtsatStation2.GetLonLat();
|
|
var Ns2Ant = txtsatStation3.GetLonLat();
|
|
var Ns2Ant = txtsatStation3.GetLonLat();
|
|
- var RefGeod = info.PosResType == EnumPosResType.X3TwoDto ? txtRefLocation.GetLonLat() : new double[3] { 0, 0, 0 };
|
|
|
|
|
|
+ var RefGeod = string.IsNullOrWhiteSpace(txtRefLocation.Text) ? new double[3] { 0, 0, 0 } : txtRefLocation.GetLonLat();
|
|
|
|
|
|
var sigTime = this.sigTime.DateTime;
|
|
var sigTime = this.sigTime.DateTime;
|
|
var DtoSx = Convert.ToDouble(this.txtDtoSx.Text);
|
|
var DtoSx = Convert.ToDouble(this.txtDtoSx.Text);
|
|
var DtoSx1 = Convert.ToDouble(this.txtDtoSx1.Text);
|
|
var DtoSx1 = Convert.ToDouble(this.txtDtoSx1.Text);
|
|
- var YbMainDto = info.PosResType == EnumPosResType.X3TwoDto ? Convert.ToDouble(this.txtYbMain.Text) : 0;
|
|
|
|
- var YbAdja1Dto = info.PosResType == EnumPosResType.X3TwoDto ? Convert.ToDouble(this.txtYbAdja.Text) : 0;
|
|
|
|
- var YbAdja2Dto = info.PosResType == EnumPosResType.X3TwoDto ? Convert.ToDouble(this.txtYbAdja1.Text) : 0;
|
|
|
|
|
|
+ var YbMainDto = string.IsNullOrWhiteSpace(txtYbMain.Text) ? 0 : Convert.ToDouble(this.txtYbMain.Text);
|
|
|
|
+ var YbAdja1Dto = string.IsNullOrWhiteSpace(txtYbAdja.Text) ? 0 : Convert.ToDouble(this.txtYbAdja.Text);
|
|
|
|
+ var YbAdja2Dto = string.IsNullOrWhiteSpace(txtYbAdja1.Text) ? 0 : Convert.ToDouble(this.txtYbAdja1.Text);
|
|
|
|
|
|
double[] msEph = ucEphXYZMain.EphXYZ();
|
|
double[] msEph = ucEphXYZMain.EphXYZ();
|
|
double[] Ns1Eph = ucEphXYZAdja1.EphXYZ();
|
|
double[] Ns1Eph = ucEphXYZAdja1.EphXYZ();
|
|
@@ -327,8 +329,20 @@ namespace XdCxRhDW.App.EditForms
|
|
Adja2Y = Ns2Eph[1],
|
|
Adja2Y = Ns2Eph[1],
|
|
Adja2Z = Ns2Eph[2],
|
|
Adja2Z = Ns2Eph[2],
|
|
};
|
|
};
|
|
- var res = info.PosResType == EnumPosResType.X3TwoDto ? PosApi.X3_Pos(cgRes, StationRes) : PosApi.X3_PosNoRef(cgRes, StationRes);
|
|
|
|
- this.txtPosRes.Text = $"{info.PosResType.GetEnumDisplayName()}定位点:[{res[0]:f4},{res[1]:f4}] 镜像点:[{res[3]:f4},{res[4]:f4}]";
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(txtRefLocation.Text)
|
|
|
|
+ && !string.IsNullOrWhiteSpace(txtYbMain.Text)
|
|
|
|
+ && !string.IsNullOrWhiteSpace(txtYbAdja.Text)
|
|
|
|
+ && !string.IsNullOrWhiteSpace(txtYbAdja1.Text))
|
|
|
|
+ {
|
|
|
|
+ var res = PosApi.X3_Pos(cgRes, StationRes);
|
|
|
|
+ this.txtPosRes.Text = $"带参定位点:[{res[0]:f4},{res[1]:f4}] 镜像点:[{res[3]:f4},{res[4]:f4}]";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ var res = PosApi.X3_PosNoRef(cgRes, StationRes);
|
|
|
|
+ this.txtPosRes.Text = $"无参定位点:[{res[0]:f4},{res[1]:f4}] 镜像点:[{res[3]:f4},{res[4]:f4}]";
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|