From 873e54deb1e8d17ad10b8b5570912eaac35153a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 29 Aug 2013 15:05:38 +1000 Subject: [PATCH] AP_Math: fixed example build --- libraries/AP_Math/examples/location/location.pde | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/AP_Math/examples/location/location.pde b/libraries/AP_Math/examples/location/location.pde index 3b1c2d74fc..a830aa6812 100644 --- a/libraries/AP_Math/examples/location/location.pde +++ b/libraries/AP_Math/examples/location/location.pde @@ -142,19 +142,19 @@ static void test_accuracy(void) loc2 = loc; loc2.lat += 10000000; v2 = Vector2f(loc2.lat*1.0e-7f, loc2.lng*1.0e-7f); - hal.console->printf("1 degree lat dist=%.4f\n", get_distance(&loc, &loc2)); + hal.console->printf("1 degree lat dist=%.4f\n", get_distance(loc, loc2)); loc2 = loc; loc2.lng += 10000000; v2 = Vector2f(loc2.lat*1.0e-7f, loc2.lng*1.0e-7f); - hal.console->printf("1 degree lng dist=%.4f\n", get_distance(&loc, &loc2)); + hal.console->printf("1 degree lng dist=%.4f\n", get_distance(loc, loc2)); for (int32_t i=0; i<100; i++) { loc2 = loc; loc2.lat += i; v2 = Vector2f((loc.lat+i)*1.0e-7f, loc.lng*1.0e-7f); if (v2.x != v.x || v2.y != v.y) { - hal.console->printf("lat v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(&loc, &loc2)); + hal.console->printf("lat v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(loc, loc2)); break; } } @@ -163,7 +163,7 @@ static void test_accuracy(void) loc2.lng += i; v2 = Vector2f(loc.lat*1.0e-7f, (loc.lng+i)*1.0e-7f); if (v2.x != v.x || v2.y != v.y) { - hal.console->printf("lng v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(&loc, &loc2)); + hal.console->printf("lng v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(loc, loc2)); break; } } @@ -173,7 +173,7 @@ static void test_accuracy(void) loc2.lat -= i; v2 = Vector2f((loc.lat-i)*1.0e-7f, loc.lng*1.0e-7f); if (v2.x != v.x || v2.y != v.y) { - hal.console->printf("-lat v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(&loc, &loc2)); + hal.console->printf("-lat v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(loc, loc2)); break; } } @@ -182,7 +182,7 @@ static void test_accuracy(void) loc2.lng -= i; v2 = Vector2f(loc.lat*1.0e-7f, (loc.lng-i)*1.0e-7f); if (v2.x != v.x || v2.y != v.y) { - hal.console->printf("-lng v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(&loc, &loc2)); + hal.console->printf("-lng v2 != v at i=%d dist=%.4f\n", (int)i, get_distance(loc, loc2)); break; } }