Skip to content

Commit

Permalink
Correct problems if pressure not available
Browse files Browse the repository at this point in the history
  • Loading branch information
01ive committed Jun 15, 2024
1 parent 1dc99a9 commit ba5ab5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ function display_stats(point) {
document.getElementById("point_info_time").innerHTML = point.time;
document.getElementById("point_info_elevation_gps").innerHTML = point.gpsAltitude.toPrecision(4) + "m";
document.getElementById("point_info_terrain").innerHTML = point.terrain_elevation.toPrecision(4) + "m";
document.getElementById("point_info_elevation_pressure").innerHTML = point.pressureAltitude.toPrecision(4) + "m";
if(point.pressureAltitud != null) {
document.getElementById("point_info_elevation_pressure").innerHTML = point.pressureAltitude.toPrecision(4) + "m";
}
document.getElementById("point_info_distance").innerHTML = point.distance_total.toPrecision(4) + "m";
document.getElementById("point_info_finesse").innerHTML = point.finesse.toPrecision(4);
document.getElementById("point_info_bearing").innerHTML = point.bearing.toPrecision(4) + "°N";
Expand Down

0 comments on commit ba5ab5b

Please sign in to comment.