Skip to content

Commit ed273f2

Browse files
fix bug parsing coords as int insteado float
1 parent bd7d203 commit ed273f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

js/tracker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ var EARTH_RADIUS = 6371000.0;
9090
// based on earthmath.py
9191
// Copyright 2012 (C) Daniel Richman; GNU GPL 3
9292
function calculate_lookangles(a, b) {
93-
9493
// degrees to radii
9594
a.lat = a.lat * DEG_TO_RAD;
9695
a.lon = a.lon * DEG_TO_RAD;
@@ -140,7 +139,7 @@ function update_lookangles(idx) {
140139
var a = {lat: GPS_lat, lon: GPS_lon, alt: GPS_alt};
141140

142141
var xref = vehicles[idx].curr_position;
143-
var b = {lat: parseInt(xref.gps_lat), lon: parseInt(xref.gps_lon), alt: parseInt(xref.gps_alt)};
142+
var b = {lat: parseFloat(xref.gps_lat), lon: parseFloat(xref.gps_lon), alt: parseFloat(xref.gps_alt)};
144143

145144
var look = calculate_lookangles(a,b);
146145

0 commit comments

Comments
 (0)