Skip to content

Commit 6227422

Browse files
show range in meters when under 10km
1 parent ed273f2 commit 6227422

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/tracker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ function update_lookangles(idx) {
146146
$("#lookanglesbox .azimuth").text("Azimuth: " + Math.round(look.azimuth * 10000)/10000 + "°");
147147
$("#lookanglesbox .bearing").text(look.bearing);
148148
$("#lookanglesbox .elevation").text("Elevation: " + Math.round(look.elevation * 10000)/10000 + "°");
149-
$("#lookanglesbox .range").text(Math.round(look.range/1000) + " km");
149+
150+
var range_string = (look.range < 10000) ? Math.round(look.range) + "m" : Math.round(look.range/1000) + " km";
151+
$("#lookanglesbox .range").text(range_string);
150152

151153
}
152154

0 commit comments

Comments
 (0)