Commit 58070276 authored by Roque's avatar Roque

erp5_officejs_drone_simulator: fix log format issue

parent d223aede
Pipeline #26864 passed with stage
in 0 seconds
......@@ -27,7 +27,7 @@ var DroneLogAPI = /** @class */ (function () {
var i, line_list = log.split('\n'), log_entry_list = [], log_entry,
log_header_found;
for (i = 0; i < line_list.length; i += 1) {
if (!log_header_found && !line_list[i].includes("timestamp;")) {
if (!log_header_found && !line_list[i].includes("timestamp (ms);")) {
continue;
}
log_header_found = true;
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1006.4961.7659.53043</string> </value>
<value> <string>1006.43901.65103.9898</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1675263473.08</float>
<float>1677599947.8</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -527,9 +527,12 @@ var GameManager = /** @class */ (function () {
if (GAMEPARAMETERS.draw_flight_path) {
this._last_position_drawn = [];
this._trace_objects_per_drone = [];
header_list = ["timestamp (ms)", "latitude (°)", "longitude (°)", "AMSL (m)",
"rel altitude (m)", "yaw (°)", "ground speed (m/s)",
"climb rate (m/s)"];
// ! Be aware that the following functions relies on this log format:
// - getLogEntries at Drone Simulator Log Page
// - getLogEntries at Dron Log Follower API
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);
......@@ -1054,4 +1057,4 @@ var runGame, updateGame;
}(this));
/******************************************************************************/
/******************************************************************************/
\ No newline at end of file
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1006.36707.19986.52872</string> </value>
<value> <string>1006.43905.28804.11980</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1677168868.23</float>
<float>1677600104.11</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -123,7 +123,7 @@
var i, line_list = log.split('\n'), log_entry_list = [], log_entry,
log_header_found;
for (i = 0; i < line_list.length; i += 1) {
if (!log_header_found && !line_list[i].includes("timestamp;")) {
if (!log_header_found && !line_list[i].includes("timestamp (ms);")) {
continue;
} else {
log_header_found = true;
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.28725.31731.34065</string> </value>
<value> <string>1006.43898.62059.64102</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1672757496.65</float>
<float>1677600140.0</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment