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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
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
Show 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 () {
...
@@ -507,6 +507,13 @@ var FixedWingDroneAPI = /** @class */ (function () {
FixedWingDroneAPI
.
prototype
.
getClimbRate
=
function
(
drone
)
{
FixedWingDroneAPI
.
prototype
.
getClimbRate
=
function
(
drone
)
{
return
drone
.
worldDirection
.
y
*
drone
.
getSpeed
();
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
)
{
FixedWingDroneAPI
.
prototype
.
triggerParachute
=
function
(
drone
)
{
var
drone_pos
=
drone
.
getCurrentPosition
();
var
drone_pos
=
drone
.
getCurrentPosition
();
drone
.
setTargetCoordinates
(
drone_pos
.
x
,
drone_pos
.
y
,
5
);
drone
.
setTargetCoordinates
(
drone_pos
.
x
,
drone_pos
.
y
,
5
);
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.xml
View file @
77e628d0
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1006.
23750.47435.55654
</string>
</value>
<value>
<string>
1006.
36731.10993.50739
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
167
6554628.54
</float>
<float>
167
7169724.0
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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 () {
...
@@ -319,6 +319,9 @@ var DroneManager = /** @class */ (function () {
DroneManager
.
prototype
.
getSpeed
=
function
()
{
DroneManager
.
prototype
.
getSpeed
=
function
()
{
return
this
.
_speed
;
return
this
.
_speed
;
};
};
DroneManager
.
prototype
.
getGroundSpeed
=
function
()
{
return
this
.
_API
.
getGroundSpeed
(
this
);
};
DroneManager
.
prototype
.
getClimbRate
=
function
()
{
DroneManager
.
prototype
.
getClimbRate
=
function
()
{
return
this
.
_API
.
getClimbRate
(
this
);
return
this
.
_API
.
getClimbRate
(
this
);
};
};
...
@@ -524,9 +527,9 @@ var GameManager = /** @class */ (function () {
...
@@ -524,9 +527,9 @@ var GameManager = /** @class */ (function () {
if
(
GAMEPARAMETERS
.
draw_flight_path
)
{
if
(
GAMEPARAMETERS
.
draw_flight_path
)
{
this
.
_last_position_drawn
=
[];
this
.
_last_position_drawn
=
[];
this
.
_trace_objects_per_drone
=
[];
this
.
_trace_objects_per_drone
=
[];
header_list
=
[
"
timestamp
"
,
"
latitude
"
,
"
longitude
"
,
"
AMSL (m)
"
,
header_list
=
[
"
timestamp
(ms)
"
,
"
latitude (°)
"
,
"
longitude (°)
"
,
"
AMSL (m)
"
,
"
rel altitude (m)
"
,
"
yaw
(°)
"
,
"
air
speed (m/s)
"
,
"
rel altitude (m)
"
,
"
yaw
(°)
"
,
"
ground
speed (m/s)
"
,
"
climb rate(m/s)
"
];
"
climb rate
(m/s)
"
];
for
(
drone
=
0
;
drone
<
GAMEPARAMETERS
.
droneList
.
length
;
drone
+=
1
)
{
for
(
drone
=
0
;
drone
<
GAMEPARAMETERS
.
droneList
.
length
;
drone
+=
1
)
{
this
.
_flight_log
[
drone
]
=
[];
this
.
_flight_log
[
drone
]
=
[];
this
.
_flight_log
[
drone
].
push
(
header_list
);
this
.
_flight_log
[
drone
].
push
(
header_list
);
...
@@ -687,7 +690,7 @@ var GameManager = /** @class */ (function () {
...
@@ -687,7 +690,7 @@ var GameManager = /** @class */ (function () {
game_manager
.
_flight_log
[
index
].
push
([
game_manager
.
_flight_log
[
index
].
push
([
game_manager
.
_game_duration
,
geo_coordinates
.
x
,
game_manager
.
_game_duration
,
geo_coordinates
.
x
,
geo_coordinates
.
y
,
map_info
.
start_AMSL
+
drone_position
.
z
,
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
()
drone
.
getClimbRate
()
]);
]);
}
}
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
View file @
77e628d0
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1006.
2016.60568.40294
</string>
</value>
<value>
<string>
1006.
36707.19986.52872
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
167
5086932.85
</float>
<float>
167
7168868.23
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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