Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
hemei
Commits
bd869878
Commit
bd869878
authored
Apr 15, 2020
by
LiGuohua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugs
parent
9cd5e4f1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
11 deletions
+28
-11
UC_AirRingShift.xaml.cs
...Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml.cs
+11
-0
IThickHeatData.cs
....ThickHeatAnalyst.Fix/FLY.HeatingHelper/IThickHeatData.cs
+2
-0
ThickHeatData.cs
...Y.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData.cs
+14
-10
thick_public
thick_public
+1
-1
No files found.
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper.UI/UIModule/UC_AirRingShift.xaml.cs
View file @
bd869878
...
...
@@ -489,6 +489,8 @@ namespace FLY.HeatingHelper.UI.UiModule
int
end
=
vm1
.
MaxFrame
;
if
(
LockFrames
==
2
)
{
int
idx1
=
vm1
.
SelectedFrame
;
int
idx2
=
vm2
.
SelectedFrame
;
if
(!
LockAngle
)
SearchAngle
();
else
{
...
...
@@ -497,6 +499,15 @@ namespace FLY.HeatingHelper.UI.UiModule
NewResetBolt
=
tmp
.
Item1
;
TandH_Corel
=
tmp
.
Item2
;
}
var
heat
=
DataHelper
.
VectorSub
(
_data
.
GetHeatsByIndex
(
idx1
,
-
1
,
-
1
),
_data
.
GetHeatsByIndex
(
idx2
,
-
1
,
-
1
));
var
t1
=
_data
.
GetThicksByIndex
(
idx1
,
NewResetBolt
,
double
.
MaxValue
);
var
th
=
DataHelper
.
VectorSub
(
_data
.
GetThicksByIndex
(
idx2
,
NewResetBolt
,
double
.
MaxValue
),
t1
);
Kp
=
_data
.
CalculateHeatToThickFactor
(
heat
,
th
,
Misc
.
MyMath
.
Avg
(
t1
));
//double b;
//double a;
//Misc.MyMath.Linest(heat, th, out a, out b);
//Kp = a;
SearchEnabled
=
true
;
UpdateVarChart
();
return
;
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper/IThickHeatData.cs
View file @
bd869878
...
...
@@ -135,6 +135,8 @@ namespace FLY.HeatingHelper
/// <param name="SearchRotAngle"></param>
/// <returns>返回值:Tuple<偏转数,相关系数,旋转角度变化量></returns>
Tuple
<
int
,
double
,
double
>
SearchMaxSimilarity
(
int
idxL
,
int
idxB
,
double
searchRange
,
bool
SearchRotAngle
);
double
CalculateHeatToThickFactor
(
double
[]
heats
,
double
[]
thicks
,
double
thickmean
);
#
endregion
#
region
数据处理
-
数据分类接口
...
...
Project.FLY.ThickHeatAnalyst.Fix/FLY.HeatingHelper/ThickHeatData.cs
View file @
bd869878
...
...
@@ -751,7 +751,7 @@ namespace FLY.HeatingHelper
/// <param name="thicks">厚度变化量</param>
/// <param name="thickmean">厚度均值</param>
/// <returns></returns>
p
rivate
double
CalculateHeatToThickFactor
(
double
[]
heats
,
double
[]
thicks
,
double
thickmean
)
p
ublic
double
CalculateHeatToThickFactor
(
double
[]
heats
,
double
[]
thicks
,
double
thickmean
)
{
int
cnt
=
thicks
.
Count
();
if
(
cnt
<
2
)
return
double
.
NaN
;
...
...
@@ -774,14 +774,15 @@ namespace FLY.HeatingHelper
// Step 3
for
(
i
=
0
;
i
<
t
.
Count
;
i
++)
{
if
(
h
[
i
]
<
5
)
h
[
i
]
=
0
;
if
(
Math
.
Abs
(
h
[
i
])
<
5
)
h
[
i
]
=
0
;
}
// Step 4
if
(
h
.
Count
()
<=
0
)
return
double
.
NaN
;
var
hh
=
EffectFilter
(
h
.
ToArray
());
// step 5
for
(
i
=
0
;
i
<
hh
.
Count
();
i
++)
{
if
(
hh
[
i
]
<
0.001
)
t
[
i
]
=
0
;
if
(
Math
.
Abs
(
hh
[
i
])
<
0.001
)
t
[
i
]
=
0
;
}
// step 6
double
sumt
=
0
,
sumh
=
0
;
...
...
@@ -792,6 +793,7 @@ namespace FLY.HeatingHelper
}
// Step 7
if
(
sumt
<
0.001
)
return
double
.
NaN
;
return
sumh
/
(
sumt
*
100
/
thickmean
);
}
...
...
@@ -1321,7 +1323,7 @@ namespace FLY.HeatingHelper
double
maxcorel
=
-
100
;
int
theshift
=
0
;
int
idx1
=
fmin
,
idx2
=
fmax
;
double
deltaAngle
=
0
;
double
deltaAngle
=
_rotAngles
[
fmax
]
;
double
factor
=
1
;
if
(
midbolt
==
int
.
MaxValue
)
{
...
...
@@ -1355,12 +1357,14 @@ namespace FLY.HeatingHelper
result
.
frameShift
=
theshift
;
result
.
similarity
=
maxcorel
;
result
.
deltaAngle
=
deltaAngle
;
var
angle
=
GetRotAngleByIndex
(
idx1
)
+
deltaAngle
;
var
heat
=
DataHelper
.
VectorSub
(
GetHeatsByIndex
(
idx1
,
-
1
,
-
1
),
GetHeatsByIndex
(
idx2
,
-
1
,
-
1
));
var
t1
=
GetThicksByIndex
(
idx1
,
1
,
angle
);
var
th
=
DataHelper
.
VectorSub
(
GetThicksByIndex
(
idx2
,
1
,
angle
),
t1
);
result
.
ThickToHeatFactor
=
CalculateHeatToThickFactor
(
heat
,
th
,
MathNet
.
Numerics
.
Statistics
.
Statistics
.
Mean
(
t1
));
var
t1
=
GetThicksByIndex
(
idx1
,
theshift
,
deltaAngle
);
var
th
=
DataHelper
.
VectorSub
(
GetThicksByIndex
(
idx2
,
theshift
,
deltaAngle
),
t1
);
result
.
ThickToHeatFactor
=
CalculateHeatToThickFactor
(
heat
,
th
,
Misc
.
MyMath
.
Avg
(
t1
));
//double b;
//double a;
//Misc.MyMath.Linest(heat, th, out a, out b);
//result.ThickToHeatFactor = a;
});
if
(
report
!=
null
)
{
...
...
@@ -1394,7 +1398,7 @@ namespace FLY.HeatingHelper
{
double
maxcorel
=
double
.
MinValue
;
int
theshift
=
0
;
double
deltaAngle
=
0
;
double
deltaAngle
=
_rotAngles
[
idxB
]
;
if
(
idxL
>
idxB
)
{
var
tmp
=
idxL
;
...
...
thick_public
@
78c4f7f6
Subproject commit
3af52b4745114d8237751a4dc1db4d97eac42da2
Subproject commit
78c4f7f65edf7dda0b64ebf5d5cfcca10b6611ab
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment