Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
7ea0eeb2
Commit
7ea0eeb2
authored
Jan 28, 2021
by
潘栩锋
🚴
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模拟AD盒支持360旋转
parent
f0287233
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
Blowing.cs
Project.FLY.FlyADBase/FLY.Simulation.Blowing/Blowing.cs
+16
-12
FlyAD7.cs
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
+1
-1
No files found.
Project.FLY.FlyADBase/FLY.Simulation.Blowing/Blowing.cs
View file @
7ea0eeb2
...
...
@@ -500,7 +500,13 @@ namespace FLY.Simulation.Blowing
return
GetData
(
position
,
angle
);
}
double
GetValidAngle
(
double
a
)
{
while
(
a
>=
360
)
a
-=
360
;
while
(
a
<
0
)
a
+=
360
;
return
a
;
}
/// <summary>
/// 获取膜泡数据
/// </summary>
...
...
@@ -518,17 +524,8 @@ namespace FLY.Simulation.Blowing
//压扁对面的角度
double
a_other
=
360
-
a
;
a
+=
angle
;
if
(
a
>=
360
)
a
-=
360
;
else
if
(
a
<
0
)
a
+=
360
;
a_other
+=
angle
;
if
(
a_other
>=
360
)
a_other
-=
360
;
else
if
(
a_other
<
0
)
a_other
+=
360
;
a
=
GetValidAngle
(
a
+
angle
);
a_other
=
GetValidAngle
(
a_other
+
angle
);
int
dat_idx1
=
(
int
)(
a
/
360
*
AfterDatas
.
Count
());
int
dat_idx2
=
(
int
)(
a_other
/
360
*
AfterDatas
.
Count
());
...
...
@@ -704,7 +701,14 @@ namespace FLY.Simulation.Blowing
double
angle
=
CurrAngle
+
CurrAngleVelocity
*
ts
.
TotalSeconds
;
double
delta
=
angle
-
CurrAngle
;
GlobalAngle
+=
delta
;
while
(
angle
>=
360
)
angle
-=
360
;
while
(
angle
<
0
)
angle
+=
360
;
CurrAngle
=
angle
;
}
/// <summary>
...
...
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
View file @
7ea0eeb2
...
...
@@ -632,7 +632,7 @@ namespace FlyADBase
}
int
ms
=
systick
-
systick_1st
;
if
((
ms
<
1000
)||
if
((
ms
<
-
1000
)
||
//时间被提前
(
ms
>
1000
*
60
*
3
))
//记录与新的timemark 相差3分钟,太大了,重新生成 timemark 与 dt 的关系
{
//被复位了
...
...
潘栩锋
🚴
@panruising
mentioned in commit
809883b9
·
Mar 16, 2021
mentioned in commit
809883b9
mentioned in commit 809883b99cc7ee0830e23059c8b83385e117d3ca
Toggle commit list
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