diff options
author | Keith Packard <keithp@keithp.com> | 2014-06-05 18:47:27 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-06-05 18:47:27 -0700 |
commit | 4a29df3f9f6c4969eb01598f6917ce78c9ce37a6 (patch) | |
tree | 469d4d1444a3c76788a35a5dfb61bb245c2cb238 /src | |
parent | b619199345256cdc456f8a0b99c0ad9335e877c7 (diff) |
altos: tracker distance computation flipped arguments around
ao_distance takes (lat, lon, lat, lon) not (lat, lat, lon, lon)
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/product/ao_tracker.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/product/ao_tracker.c b/src/product/ao_tracker.c index d4960d25..b4e563ee 100644 --- a/src/product/ao_tracker.c +++ b/src/product/ao_tracker.c @@ -97,12 +97,13 @@ ao_tracker(void) break; case ao_flight_pad: ground_distance = ao_distance(ao_gps_data.latitude, - start_latitude, ao_gps_data.longitude, + start_latitude, start_longitude); height = ao_gps_data.altitude - start_altitude; if (height < 0) height = -height; + if (ground_distance >= ao_config.tracker_start_horiz || height >= ao_config.tracker_start_vert) { |