Skip to content

Commit 3241061

Browse files
fix another bug in altitude graph logic
1 parent da2047f commit 3241061

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 33
2+
# version 34
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

js/tracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ function addPosition(position) {
734734
// if vehicle is not a car, record altitude
735735
if(vehicle.vehicle_type != "car") {
736736
// only record altitude values in 10minute interval
737-
if(convert_time(vehicle.curr_position.gps_time) - vehicle.alt_last >= 150) { // 150s = 2.5minutes
737+
if(convert_time(vehicle.curr_position.gps_time) - vehicle.alt_last >= 120) { // 120s = 2minutes
738738
vehicle.alt_last = convert_time(vehicle.curr_position.gps_time);
739739
var alt = parseInt(vehicle.curr_position.gps_alt);
740740

@@ -984,7 +984,7 @@ function update(response) {
984984

985985
// update the altitude profile, only if its a balloon
986986
if(vehicles[i].vehicle_type != "car") {
987-
var graph_src = graph_url.replace("{AA}",vehicles[i].max_alt); // top range, buttom is always 0
987+
var graph_src = graph_url.replace("{AA}",vehicles[i].alt_max); // top range, buttom is always 0
988988
graph_src += GChartEncodeData(vehicles[i].alt_list, vehicles[i].alt_max); // encode datapoint to preserve bandwith
989989

990990
// update img element

0 commit comments

Comments
 (0)