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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
16f88948
Commit
16f88948
authored
Aug 02, 2023
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_drone: improve precision in script test
- capture flag - drone simulator
parent
c09ec2e3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.js
...plateItem/web_page_module/test_capture_drone_flight_js.js
+7
-5
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.xml
...lateItem/web_page_module/test_capture_drone_flight_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.js
...ateItem/web_page_module/test_drone_simulator_flight_js.js
+5
-3
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.xml
...teItem/web_page_module/test_drone_simulator_flight_js.xml
+2
-2
No files found.
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.js
View file @
16f88948
...
...
@@ -55,7 +55,8 @@
'
);
\n
'
+
'
};
\n
'
+
'
me.onUpdate = function (timestamp) {
\n
'
+
'
var realDistance = distance(
\n
'
+
'
var current_position = me.getCurrentPosition(),
\n
'
+
'
realDistance = distance(
\n
'
+
'
me.initialPosition.x,
\n
'
+
'
me.initialPosition.y,
\n
'
+
'
me.getCurrentPosition().x,
\n
'
+
...
...
@@ -64,8 +65,9 @@
'
expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);
\n
'
+
'
assert(timestamp, 1000 / 60, "Timestamp");
\n
'
+
'
assert(realDistance, expectedDistance, "Distance");
\n
'
+
'
compare(me.getCurrentPosition(), {
\n
'
+
'
x: me.initialPosition.x + 2.3992831666911723e-06,
\n
'
+
'
current_position.x = current_position.x.toFixed(7);
\n
'
+
'
compare(current_position, {
\n
'
+
'
x: (me.initialPosition.x + 2.3992831666911723e-06).toFixed(7),
\n
'
+
'
y: me.initialPosition.y,
\n
'
+
'
z: me.initialPosition.z
\n
'
+
'
});
\n
'
+
...
...
bt5/erp5_officejs_drone_capture_flag_test/PathTemplateItem/web_page_module/test_capture_drone_flight_js.xml
View file @
16f88948
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
09.56051.15404.48947
</string>
</value>
<value>
<string>
10
10.10600.362.51182
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
1690
898400.2
6
</float>
<float>
1690
983490.5
6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.js
View file @
16f88948
...
...
@@ -68,7 +68,8 @@
'
};
\n
'
+
'
\n
'
+
'
me.onUpdate = function (timestamp) {
\n
'
+
'
var realDistance = distance(
\n
'
+
'
var current_position = me.getCurrentPosition(),
\n
'
+
'
realDistance = distance(
\n
'
+
'
me.initialPosition.x,
\n
'
+
'
me.initialPosition.y,
\n
'
+
'
me.getCurrentPosition().x,
\n
'
+
...
...
@@ -77,8 +78,9 @@
'
expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);
\n
'
+
'
assert(timestamp, 1000 / 60, "Timestamp");
\n
'
+
'
assert(realDistance, expectedDistance, "Distance");
\n
'
+
'
compare(me.getCurrentPosition(), {
\n
'
+
'
x: me.initialPosition.x + 2.3992831666911723e-06,
\n
'
+
'
current_position.x = current_position.x.toFixed(7);
\n
'
+
'
compare(current_position, {
\n
'
+
'
x: (me.initialPosition.x + 2.3992831666911723e-06).toFixed(7),
\n
'
+
'
y: me.initialPosition.y,
\n
'
+
'
z: me.initialPosition.z
\n
'
+
'
});
\n
'
+
...
...
bt5/erp5_officejs_drone_simulator_test/PathTemplateItem/web_page_module/test_drone_simulator_flight_js.xml
View file @
16f88948
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1010.
3741.38295.37973
</string>
</value>
<value>
<string>
1010.
10621.5765.11161
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
1690
898327.04
</float>
<float>
1690
900659.22
</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