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
d8dadf3d
Commit
d8dadf3d
authored
Aug 21, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化线速度 平均值
parent
ce2de262
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
BlowingDetect.cs
...Y.Thick.Blowing/FLY.Thick.Blowing/Server/BlowingDetect.cs
+13
-2
No files found.
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/BlowingDetect.cs
View file @
d8dadf3d
...
...
@@ -1192,9 +1192,20 @@ namespace FLY.Thick.Blowing.Server
DateTime
dt2
=
mRollList
[
mRollList
.
Count
-
cnt
].
dt
;
DateTime
dt11
=
mRollList
[
mRollList
.
Count
-
(
cnt
-
1
)].
dt
;
TimeSpan
ts_last
=
TimeSpan
.
FromTicks
((
dt1
-
dt2
).
Ticks
/
(
cnt
-
1
));
//5次的平均滤波
TimeSpan
ts_now
=
DateTime
.
Now
-
dt1
;
TimeSpan
ts_max
=
(
ts_now
>
(
ts_last
+
ts_last
))
?
ts_now
:
ts_last
;
TimeSpan
ts_now
=
TimeSpan
.
FromTicks
((
DateTime
.
Now
-
dt11
).
Ticks
/
(
cnt
-
1
));
TimeSpan
ts_max
;
if
(
ts_now
>
(
ts_last
+
ts_last
))
{
ts_max
=
ts_now
;
}
else
{
ts_max
=
ts_last
;
}
FilmVelocity
=
RollPerimeter
/
1000.0
/
ts_max
.
TotalMinutes
;
BufTotalTime
=
DateTime
.
Now
-
mRollList
[
0
].
dt
;
...
...
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