Commit 65fe6abf authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

erp5_officejs_drone_simulator: limit decimals in logs

Limit printed decimals in flight log file for readability.
parent 036f0c50
......@@ -1061,11 +1061,14 @@ var GameManager = /** @class */ (function () {
drone_position.z
);
game_manager._flight_log[index].push([
current_time, geo_coordinates.latitude,
geo_coordinates.longitude,
map_info.start_AMSL + drone_position.z,
drone_position.z, drone.getYaw(), drone.getSpeed(),
drone.getClimbRate()
current_time.toFixed(0),
geo_coordinates.latitude.toFixed(4),
geo_coordinates.longitude.toFixed(4),
(map_info.start_AMSL + drone_position.z).toFixed(4),
drone_position.z.toFixed(4),
drone.getYaw().toFixed(0),
drone.getSpeed().toFixed(2),
drone.getClimbRate().toFixed(6)
]);
}
}
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1017.22735.36044.31948</string> </value>
<value> <string>1017.23888.64540.55859</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1718719762.65</float>
<float>1730211399.63</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -844,11 +844,14 @@ var GameManager = /** @class */ (function () {
drone_position.z
);
game_manager._flight_log[index].push([
current_time, geo_coordinates.latitude,
geo_coordinates.longitude,
map_info.start_AMSL + drone_position.z,
drone_position.z, drone.getYaw(), drone.getSpeed(),
drone.getClimbRate()
current_time.toFixed(0),
geo_coordinates.latitude.toFixed(4),
geo_coordinates.longitude.toFixed(4),
(map_info.start_AMSL + drone_position.z).toFixed(4),
drone_position.z.toFixed(4),
drone.getYaw().toFixed(0),
drone.getSpeed().toFixed(2),
drone.getClimbRate().toFixed(6)
]);
}
}
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1017.22776.49981.4147</string> </value>
<value> <string>1017.23929.56045.37085</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1718722284.77</float>
<float>1719320607.48</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