Commit c9c69005 authored by 潘栩锋's avatar 潘栩锋 🚴

正在编写自动查找旋转角度

parent 478d0284
...@@ -398,9 +398,6 @@ ...@@ -398,9 +398,6 @@
<PackageReference Include="NLog"> <PackageReference Include="NLog">
<Version>4.6.7</Version> <Version>4.6.7</Version>
</PackageReference> </PackageReference>
<PackageReference Include="NLog.Config">
<Version>4.6.7</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody"> <PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version> <Version>2.6.1</Version>
</PackageReference> </PackageReference>
......
...@@ -120,6 +120,18 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -120,6 +120,18 @@ namespace FLY.Thick.BlowingScan.UI.Client
#endregion #endregion
#region 自动
/// <summary>
/// 旋转架转动角度 查找范围 ±25°
/// </summary>
public int RAngleRange { get; set; } = 25;
/// <summary>
/// 旋转架转动角度 查找范围 ±10m
/// </summary>
public int FilmLengthRange { get; set; } = 10;
#endregion
BlowingAngleDetect mAngleDetect = new BlowingAngleDetect(); BlowingAngleDetect mAngleDetect = new BlowingAngleDetect();
...@@ -151,6 +163,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -151,6 +163,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
return idx; return idx;
} }
private void MarkNo_PropertyChanged(object sender, PropertyChangedEventArgs e) private void MarkNo_PropertyChanged(object sender, PropertyChangedEventArgs e)
{ {
MarkData markdata = sender as MarkData; MarkData markdata = sender as MarkData;
...@@ -160,20 +173,23 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -160,20 +173,23 @@ namespace FLY.Thick.BlowingScan.UI.Client
if (idx >= 0) if (idx >= 0)
{ {
markdata.IsValid = true; markdata.IsValid = true;
if (!ScanInfoList[idx].HasCast)//解方程 var scanInfo = ScanInfoList[idx];
var flydata = mBufList[idx];
if (!scanInfo.HasCast)//解方程
ToThicks_SolveEquation(idx); ToThicks_SolveEquation(idx);
markdata.StartTime = ScanInfoList[idx].StartTime; markdata.StartTime = scanInfo.StartTime;
markdata.ThicksDT = ScanInfoList[idx].ThicksDT; markdata.ThicksDT = scanInfo.ThicksDT;
markdata.Thicks = ScanInfoList[idx].thicks; markdata.Thicks = scanInfo.thicks;
markdata.R = scanInfo.R;
markdata.Direction = ScanInfoList[idx].Direction; markdata.Direction = scanInfo.Direction;
markdata.Border = mBufList[idx].FilmRange; markdata.Border = flydata.FilmRange;
markdata.PosOfGrid = mBufList[idx].PosOfGrid; markdata.PosOfGrid = flydata.PosOfGrid;
markdata.Time = mBufList[idx].Time; markdata.Time = flydata.Time;
markdata.OrgThicks = mBufList[idx].Thicks; markdata.OrgThicks = flydata.Thicks;
markdata.Power = ScanInfoList[idx].power; markdata.Power = scanInfo.power;
markdata.AvgThicks = ScanInfoList[idx].thicks_avg; markdata.AvgThicks = scanInfo.thicks_avg;
} }
else else
{ {
...@@ -261,7 +277,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -261,7 +277,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
IsStep2Ing = false; IsStep2Ing = false;
return; return;
} }
GetSolveEquation(); GetSolveEquation(RAngle, FilmLength);
ClearAllResult(); ClearAllResult();
MarkNo1.Refresh(); MarkNo1.Refresh();
...@@ -269,10 +285,35 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -269,10 +285,35 @@ namespace FLY.Thick.BlowingScan.UI.Client
//ToThicks_SolveEquation(); //ToThicks_SolveEquation();
IsStep2Ing = false; IsStep2Ing = false;
} }
/// <summary>
/// 自动查找旋转角度
/// </summary>
public void StepAutoSearchRAngle()
{
IsStep2Ing = true;
if (mBufList == null)
{
IsStep2Ing = false;
return;
}
int idx1 = GetIdxFromRList(MarkNo1.Number);
int idx2 = GetIdxFromRList(MarkNo2.Number);
if (idx1 >= 0 && idx2>=0 && idx1!= idx2)
{
//TODO
GetSolveEquation(RAngle, FilmLength);
ClearAllResult();
double r;
bool ret = TrySolveEquationAndGetR(idx1, idx2, out r);
}
IsStep2Ing = false;
}
/// <summary> /// <summary>
/// 清除全部计算结果 /// 清除全部计算结果
/// </summary> /// </summary>
public void ClearAllResult() void ClearAllResult()
{ {
for (int i = 0; i < mBufList.Count(); i++) for (int i = 0; i < mBufList.Count(); i++)
{ {
...@@ -446,9 +487,9 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -446,9 +487,9 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// <summary> /// <summary>
/// 第2步,修改 旋转角度,膜距离 执行, 耗时很短 /// 第2步,修改 旋转角度,膜距离 执行, 耗时很短
/// </summary> /// </summary>
void GetSolveEquation() void GetSolveEquation(double rAngle,double filmLength)
{ {
mAngleDetect.RAngle = RAngle; mAngleDetect.RAngle = rAngle;// RAngle;
//mAngleDetect.FilmLength = FilmLength; //mAngleDetect.FilmLength = FilmLength;
//获取角度信息 //获取角度信息
for (int i = 0; i < mBufList.Count(); i++) for (int i = 0; i < mBufList.Count(); i++)
...@@ -467,7 +508,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -467,7 +508,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
int ret = mAngleDetect.GetFilmInfo( int ret = mAngleDetect.GetFilmInfo(
out filminfo, out filminfo,
scanpos.dt, f.FilmRange.Width, scanpos.pos, FilmLength, f.Velocity); scanpos.dt, f.FilmRange.Width, scanpos.pos, filmLength, f.Velocity);//FilmLength
//探头直径转为角度范围 //探头直径转为角度范围
double sensor_angle = 180.0 * Sensor / f.FilmRange.Width; double sensor_angle = 180.0 * Sensor / f.FilmRange.Width;
...@@ -500,21 +541,25 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -500,21 +541,25 @@ namespace FLY.Thick.BlowingScan.UI.Client
} }
} }
} }
/// <summary>
/// 最后1步,解方程
/// </summary>
void ToThicks_SolveEquation()
{
for (int i = 0; i < mBufList.Count(); i++) bool TrySolveEquationAndGetR(int scaninfo_idx0, int scaninfo_idx1,out double r)
{ {
if (ToThicks_SolveEquation(scaninfo_idx0) && ToThicks_SolveEquation(scaninfo_idx1))
ToThicks_SolveEquation(i); {
ScanInfoCell scaninfo0 = ScanInfoList[scaninfo_idx0];
ScanInfoCell scaninfo1 = ScanInfoList[scaninfo_idx1];
r = Misc.MyMath.Correl(scaninfo0.thicks, scaninfo1.thicks);
return true;
} }
else
{
r = -1;
return false;
MarkNo1.Refresh();
MarkNo2.Refresh();
} }
}
bool ToThicks_SolveEquation(int scaninfo_idx) bool ToThicks_SolveEquation(int scaninfo_idx)
{ {
ScanInfoCell scaninfo = ScanInfoList[scaninfo_idx]; ScanInfoCell scaninfo = ScanInfoList[scaninfo_idx];
...@@ -600,46 +645,84 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -600,46 +645,84 @@ namespace FLY.Thick.BlowingScan.UI.Client
scaninfo.State = ScanInfoCell.STATE.Err_Solve; scaninfo.State = ScanInfoCell.STATE.Err_Solve;
return false; return false;
} }
int[] thks = scaninfo.thicks;
SolveEquation(equationlist, ScanInfoList[scaninfo_idx].thicks); SolveEquation(equationlist, thks);
//2105 条方程,耗时 0.3s //2105 条方程,耗时 0.3s
//SolveEquation(equationlist, ScanInfoList[scaninfo_idx].thicks); //SolveEquation(equationlist, ScanInfoList[scaninfo_idx].thicks);
//不能有任何一个NULL_VALUE //不能有任何一个NULL_VALUE
for (int i = 0; i < scaninfo.thicks.Count(); i++) if(thks.Any(thk=> !Misc.MyBase.ISVALIDATA(thk)))
if (!Misc.MyBase.ISVALIDATA(scaninfo.thicks[i]))
return false; return false;
if (Smooth > 0)
SmoothFrame(thks, Smooth);
scaninfo.R = SingleR(equationlist, thks);
scaninfo.ThicksDT = ScanInfoList[scaninfo_idx - (SolveCnt - 1)].StartTime;
return true;
}
/// <summary>
/// 平滑thks
/// </summary>
/// <param name="thks"></param>
/// <param name="smooth">平滑半径</param>
static void SmoothFrame(int[] thks, int smooth)
{ {
int[] data = new int[scaninfo.thicks.Count()]; if (smooth > 0)
for (int i = 0; i < scaninfo.thicks.Count(); i++) {
int[] data = new int[thks.Count()];
for (int i = 0; i < thks.Count(); i++)
{ {
int sum = 0; int sum = 0;
for (int j = 0; j < (Smooth * 2 + 1); j++) for (int j = 0; j < (smooth * 2 + 1); j++)
{ {
int index = i + j - Smooth; int index = i + j - smooth;
if (index < 0) if (index < 0)
index += scaninfo.thicks.Count(); index += thks.Count();
else if (index >= scaninfo.thicks.Count()) else if (index >= thks.Count())
index -= scaninfo.thicks.Count(); index -= thks.Count();
sum += scaninfo.thicks[index]; sum += thks[index];
} }
data[i] = (int)(sum / (Smooth * 2 + 1)); data[i] = (int)(sum / (smooth * 2 + 1));
} }
Array.Copy(data, scaninfo.thicks, data.Count()); Array.Copy(data, thks, thks.Count());
} }
scaninfo.ThicksDT = ScanInfoList[scaninfo_idx - (SolveCnt - 1)].StartTime;
return true;
} }
/// <summary>
/// 计算方程每个原始数据 与 结果的一致性
/// </summary>
/// <param name="equationList"></param>
/// <param name="frame_out"></param>
/// <returns></returns>
static double SingleR(List<EquationCell> equationList, int[] frame_out)
{
List<int> calThks = new List<int>();
List<int> actThks = new List<int>();
foreach (EquationCell ec in equationList)
{
double[] datas = ec.GetPower(frame_out.Count());
double sum = 0;
double cnt = 0;
foreach (var kv in ec.boltPower)
{
sum += frame_out[kv.Key] * kv.Value;
cnt += frame_out[kv.Key];
}
if (cnt > 0)
{
int totalThk = (int)(sum / cnt);
calThks.Add(totalThk);
actThks.Add(ec.thick);
}
}
return Misc.MyMath.Correl(calThks, actThks);
}
/// <summary> /// <summary>
/// 解方程 /// 解方程
/// </summary> /// </summary>
...@@ -698,18 +781,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -698,18 +781,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
#region 两组数据 #region 两组数据
private double currR = -1; public double CurrR { get; set; } = -1;
public double CurrR
{
get { return currR; }
set {
if (currR != value)
{
currR = value;
NotifyPropertyChanged("CurrR");
}
}
}
public MarkData MarkNo1 = new MarkData(); public MarkData MarkNo1 = new MarkData();
public MarkData MarkNo2 = new MarkData(); public MarkData MarkNo2 = new MarkData();
...@@ -922,6 +994,10 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -922,6 +994,10 @@ namespace FLY.Thick.BlowingScan.UI.Client
[PropertyChanged.DoNotCheckEquality] [PropertyChanged.DoNotCheckEquality]
public int[] AvgThicks { get; set; } public int[] AvgThicks { get; set; }
/// <summary>
/// 方程数据与解方程后的结果相关性
/// </summary>
public double R { get; set; } = -1;
public MarkData() public MarkData()
{ {
...@@ -1731,6 +1807,10 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1731,6 +1807,10 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// </summary> /// </summary>
public DateTime ThicksDT { get; set; } = DateTime.MinValue; public DateTime ThicksDT { get; set; } = DateTime.MinValue;
/// <summary>
/// thicks 与 方程列表 的相关性
/// </summary>
public double R = -1;
/// <summary> /// <summary>
/// 一幅数据 /// 一幅数据
/// </summary> /// </summary>
......
...@@ -191,23 +191,23 @@ ...@@ -191,23 +191,23 @@
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeCurr"> <StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeCurr">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="当前范围:" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="当前范围:" />
<StackPanel Orientation="Horizontal" > <StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top"/> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top"/> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeNewest"> <StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeNewest">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="最新范围:" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="最新范围:" />
<StackPanel Orientation="Horizontal" > <StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" MinWidth="100" Text="{Binding Number}" /> <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" MinWidth="100" Text="{Binding Number}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Button> </Button>
...@@ -376,25 +376,42 @@ ...@@ -376,25 +376,42 @@
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}"> <StackPanel Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}">
<StackPanel Orientation="Horizontal">
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="旋转方向" />
<TextBlock>
<TextBlock.Style>
<Style BasedOn="{StaticResource TextBlockStyle_FieldContent2}" TargetType="TextBlock">
<Setter Property="Text" Value="正"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}">
<Setter Property="Text" Value="反"/>
</DataTrigger>
<DataTrigger Binding="{Binding Direction}" Value="{x:Static misc:DIRECTION.FIX}">
<Setter Property="Text" Value="转向"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="旋转方向" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="测量时间" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Grid> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding StartTime, StringFormat=\{0:HH:mm:ss\}}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="正" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FORWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="反" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.BACKWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="转向" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FIX}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
</Grid>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="测量时间" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="自相关性" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding StartTime, StringFormat=\{0:HH:mm:ss\}}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding R, StringFormat=\{0:F5\}}" />
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel x:Name="stackpanel_markno2" Orientation="Vertical" Grid.Column="1" > <StackPanel x:Name="stackpanel_markno2" Orientation="Vertical" Grid.Column="1" >
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
...@@ -414,7 +431,7 @@ ...@@ -414,7 +431,7 @@
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" MinWidth="100" Text="{Binding Number}" /> <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" MinWidth="100" Text="{Binding Number}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Button> </Button>
...@@ -426,21 +443,39 @@ ...@@ -426,21 +443,39 @@
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}"> <StackPanel Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}">
<StackPanel Orientation="Horizontal">
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="旋转方向" />
<TextBlock>
<TextBlock.Style>
<Style BasedOn="{StaticResource TextBlockStyle_FieldContent2}" TargetType="TextBlock">
<Setter Property="Text" Value="正"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Direction}" Value="{x:Static misc:DIRECTION.BACKWARD}">
<Setter Property="Text" Value="反"/>
</DataTrigger>
<DataTrigger Binding="{Binding Direction}" Value="{x:Static misc:DIRECTION.FIX}">
<Setter Property="Text" Value="转向"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="旋转方向" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="测量时间" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Grid> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding StartTime, StringFormat=\{0:HH:mm:ss\}}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="正" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FORWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> </StackPanel>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="反" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.BACKWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="转向" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FIX}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
</Grid>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="测量时间" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="自相关性" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding StartTime, StringFormat=\{0:HH:mm:ss\}}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding R, StringFormat=\{0:F5\}}" />
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
...@@ -452,23 +487,23 @@ ...@@ -452,23 +487,23 @@
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="相关性" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="相关性" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent}" Text="{Binding CurrR, StringFormat=\{0:F2\}}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding CurrR, StringFormat=\{0:F5\}}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="解方程数" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="解方程数" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding SolveCnt}" /> <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding SolveCnt}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="次"/> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="次"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="平滑" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="平滑" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding Smooth}" /> <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Smooth}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="分区"/> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="分区"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
...@@ -479,10 +514,10 @@ ...@@ -479,10 +514,10 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="膜距离" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="膜距离" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding FilmLength, StringFormat=\{0:F1\}}"/> <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding FilmLength, StringFormat=\{0:F1\}}"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="m" FontSize="15" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="m" FontSize="15" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Button Click="button_left_Click" > <Button Click="button_left_Click" >
...@@ -495,11 +530,11 @@ ...@@ -495,11 +530,11 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="旋转角度" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="旋转角度" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding RAngle}" /> <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding RAngle}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="°" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="°" VerticalAlignment="Top" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Button Click="button_collapse_Click" > <Button Click="button_collapse_Click" >
...@@ -511,7 +546,7 @@ ...@@ -511,7 +546,7 @@
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" > <StackPanel Orientation="Vertical" >
<Button Style="{StaticResource ResourceKey=ButtonStyle2}" Width="auto" Click="button_solve_Click" FontSize="30"> <Button Style="{StaticResource ButtonStyle2}" Width="auto" Click="button_solve_Click" FontSize="30">
<Grid> <Grid>
<TextBlock Text="更新参数"/> <TextBlock Text="更新参数"/>
<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="20" x:Name="grid_solveprogress" Visibility="{Binding IsRunning,Converter={StaticResource visbilityconv}}"> <Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="20" x:Name="grid_solveprogress" Visibility="{Binding IsRunning,Converter={StaticResource visbilityconv}}">
...@@ -562,10 +597,10 @@ ...@@ -562,10 +597,10 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="记录点" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="记录点" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" MinWidth="100" Text="{Binding Number}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" MinWidth="100" Text="{Binding Number}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Button Click="button_pre1_Click" > <Button Click="button_pre1_Click" >
...@@ -578,19 +613,19 @@ ...@@ -578,19 +613,19 @@
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}"> <StackPanel Orientation="Horizontal" Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="旋转方向" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="旋转方向" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Grid> <Grid>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="正" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FORWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="正" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FORWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="反" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.BACKWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="反" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.BACKWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="转向" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FIX}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="转向" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FIX}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
</Grid> </Grid>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="测量时间" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="测量时间" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding Time, StringFormat={}{0:HH:mm:ss}}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding Time, StringFormat={}{0:HH:mm:ss}}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
...@@ -624,10 +659,10 @@ ...@@ -624,10 +659,10 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="记录点" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="记录点" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" MinWidth="100" Text="{Binding Number}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" MinWidth="100" Text="{Binding Number}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Button Click="button_pre2_Click" > <Button Click="button_pre2_Click" >
...@@ -640,19 +675,19 @@ ...@@ -640,19 +675,19 @@
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}"> <StackPanel Orientation="Horizontal" Visibility="{Binding IsValid, Converter={StaticResource visbilityconv}}">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="旋转方向" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="旋转方向" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Grid> <Grid>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="正" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FORWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="正" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FORWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="反" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.BACKWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="反" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.BACKWARD}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="转向" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FIX}, Converter={StaticResource e2visconv}, Mode=OneWay}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="转向" Visibility="{Binding Direction, ConverterParameter={x:Static misc:DIRECTION.FIX}, Converter={StaticResource e2visconv}, Mode=OneWay}" />
</Grid> </Grid>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="测量时间" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader2}" Text="测量时间" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding Time, StringFormat=\{0:HH:mm:ss\}}" /> <TextBlock Style="{StaticResource TextBlockStyle_FieldContent2}" Text="{Binding Time, StringFormat=\{0:HH:mm:ss\}}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment