From 51fe80b8c4556dd6bb32fae2ee2a0e1010cf373c Mon Sep 17 00:00:00 2001 From: olive <01ive@free.fr> Date: Sat, 27 Jul 2024 12:11:10 +0200 Subject: [PATCH] Remove speed and vario gauges. Add duration instead of time. --- bundle.js | 8 ++++++ common.js | 74 +++--------------------------------------------------- index.css | 23 ++++++----------- index.html | 11 +++----- 4 files changed, 22 insertions(+), 94 deletions(-) diff --git a/bundle.js b/bundle.js index 1edab7d..5d05f24 100644 --- a/bundle.js +++ b/bundle.js @@ -107,6 +107,7 @@ class Flight { this.paragliding_info.calculate_speeds(); this.paragliding_info.calculate_bearing(); this.paragliding_info.calculate_finesse(); + this.paragliding_info.calculate_duration(); // Process flight info this.flight_info.number_of_point = this.paragliding_info.length(); @@ -245,6 +246,13 @@ class ParaglidingPoint { } } } + + calculate_duration() { + this[0].duration = 0; + for(let i=1; iGeoportail France', @@ -358,8 +296,6 @@ function refresh_map(flight) { // Display all elements document.getElementById('title').style.visibility = 'unset'; - document.getElementById('speed_gauge').style.visibility = 'unset'; - document.getElementById('vario').style.visibility = 'unset'; document.getElementById('elevation').style.visibility = 'unset'; document.getElementById('point_info').style.visibility = 'unset'; document.getElementById('zoom_control').style.visibility = 'unset'; @@ -493,8 +429,4 @@ function refresh_map(flight) { elevation_graph.on('plotly_hover', function(data){ update_position(data.points[0].pointIndex); }); - // Create speed graph - Plotly.newPlot('speed_gauge', gauge_data, gauge_layout, { displayModeBar: false }); - // Create Vario - Plotly.newPlot('vario', vario_data, vario_layout, { displayModeBar: false }); } \ No newline at end of file diff --git a/index.css b/index.css index 4c38d11..85b94e3 100644 --- a/index.css +++ b/index.css @@ -140,21 +140,6 @@ visibility: hidden; } -#speed_gauge { - position: absolute; - bottom: 20vh; - z-index: 5; - cursor: move; -} - -#vario { - position: absolute; - bottom: 20vh; - right: 0; - z-index: 5; - cursor: move; -} - #point_info { position: absolute; bottom: 0; @@ -173,7 +158,7 @@ visibility: hidden; } -#point_info_time, #point_info_elevation_gps, #point_info_elevation_pressure, #point_info_distance, #point_info_finesse, #point_info_bearing, #point_info_terrain { +#point_info_time, #point_info_elevation_gps, #point_info_distance, #point_info_finesse, #point_info_bearing, #point_info_terrain, #point_info_speed, #point_info_vario { flex: 1 0 auto; display: flex; } @@ -183,6 +168,12 @@ #point_info_terrain { color: orange; } +#point_info_speed { + color: green; +} +#point_info_vario { + color: brown; +} #title { position: absolute; diff --git a/index.html b/index.html index 12d13a7..d3c0cfe 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ - + @@ -60,8 +60,6 @@

-
-



@@ -71,13 +69,12 @@
-
-
-
time 
__:__:__
+
duration 
__:__:__
elevation (gps) 
----
terrain 
----
-
elevation (pressure) 
----
+
speed 
----
+
vario 
----
distance 
----
finesse 
----
bearing 
----
GENERAL INFOS
date__:__:__
time----
time (utc)----
logger----
duration----
high----