Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
140
Merge Requests
140
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
77e628d0
Commit
77e628d0
authored
Feb 23, 2023
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_drone_simulator: log ground speed instead of air speed
parent
3e148c20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.js
...Item/web_page_module/drone_simulator_fixedwingdrone_js.js
+8
-1
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.xml
...tem/web_page_module/drone_simulator_fixedwingdrone_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
...hTemplateItem/web_page_module/drone_simulator_logic_js.js
+7
-4
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
...TemplateItem/web_page_module/drone_simulator_logic_js.xml
+2
-2
No files found.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.js
View file @
77e628d0
...
...
@@ -507,6 +507,13 @@ var FixedWingDroneAPI = /** @class */ (function () {
FixedWingDroneAPI
.
prototype
.
getClimbRate
=
function
(
drone
)
{
return
drone
.
worldDirection
.
y
*
drone
.
getSpeed
();
};
FixedWingDroneAPI
.
prototype
.
getGroundSpeed
=
function
(
drone
)
{
var
direction
=
drone
.
worldDirection
;
return
Math
.
sqrt
(
Math
.
pow
(
direction
.
x
*
drone
.
getSpeed
(),
2
)
+
Math
.
pow
(
direction
.
z
*
drone
.
getSpeed
(),
2
)
);
};
FixedWingDroneAPI
.
prototype
.
triggerParachute
=
function
(
drone
)
{
var
drone_pos
=
drone
.
getCurrentPosition
();
drone
.
setTargetCoordinates
(
drone_pos
.
x
,
drone_pos
.
y
,
5
);
...
...
@@ -534,4 +541,4 @@ var FixedWingDroneAPI = /** @class */ (function () {
return
this
.
_flight_parameters
;
};
return
FixedWingDroneAPI
;
}());
\ No newline at end of file
}());
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.xml
View file @
77e628d0
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1006.
23750.47435.55654
</string>
</value>
<value>
<string>
1006.
36731.10993.50739
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
167
6554628.54
</float>
<float>
167
7169724.0
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
View file @
77e628d0
...
...
@@ -319,6 +319,9 @@ var DroneManager = /** @class */ (function () {
DroneManager
.
prototype
.
getSpeed
=
function
()
{
return
this
.
_speed
;
};
DroneManager
.
prototype
.
getGroundSpeed
=
function
()
{
return
this
.
_API
.
getGroundSpeed
(
this
);
};
DroneManager
.
prototype
.
getClimbRate
=
function
()
{
return
this
.
_API
.
getClimbRate
(
this
);
};
...
...
@@ -524,9 +527,9 @@ var GameManager = /** @class */ (function () {
if
(
GAMEPARAMETERS
.
draw_flight_path
)
{
this
.
_last_position_drawn
=
[];
this
.
_trace_objects_per_drone
=
[];
header_list
=
[
"
timestamp
"
,
"
latitude
"
,
"
longitude
"
,
"
AMSL (m)
"
,
"
rel altitude (m)
"
,
"
yaw
(°)
"
,
"
air
speed (m/s)
"
,
"
climb rate(m/s)
"
];
header_list
=
[
"
timestamp
(ms)
"
,
"
latitude (°)
"
,
"
longitude (°)
"
,
"
AMSL (m)
"
,
"
rel altitude (m)
"
,
"
yaw
(°)
"
,
"
ground
speed (m/s)
"
,
"
climb rate
(m/s)
"
];
for
(
drone
=
0
;
drone
<
GAMEPARAMETERS
.
droneList
.
length
;
drone
+=
1
)
{
this
.
_flight_log
[
drone
]
=
[];
this
.
_flight_log
[
drone
].
push
(
header_list
);
...
...
@@ -687,7 +690,7 @@ var GameManager = /** @class */ (function () {
game_manager
.
_flight_log
[
index
].
push
([
game_manager
.
_game_duration
,
geo_coordinates
.
x
,
geo_coordinates
.
y
,
map_info
.
start_AMSL
+
drone_position
.
z
,
drone_position
.
z
,
drone
.
getYaw
(),
drone
.
getSpeed
(),
drone_position
.
z
,
drone
.
getYaw
(),
drone
.
get
Ground
Speed
(),
drone
.
getClimbRate
()
]);
}
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
View file @
77e628d0
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1006.
2016.60568.40294
</string>
</value>
<value>
<string>
1006.
36707.19986.52872
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
167
5086932.85
</float>
<float>
167
7168868.23
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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