AP_Declination: Changed test to run in increments of 10 degrees. 1 was too granular.

This commit is contained in:
Adam M Rivera 2012-03-17 01:16:19 -05:00 committed by Andrew Tridgell
parent 289d7a2784
commit c0813f8d62

View File

@ -55,19 +55,19 @@ void setup(void)
Serial.begin(115200); Serial.begin(115200);
for(int i = -90; i <= 90; i++) for(int i = -90; i <= 90; i+=10)
{ {
for(int j = -180; j <= 180; j++) for(int j = -180; j <= 180; j+=10)
{ {
declination = AP_Declination::get_declination(i, j); declination = AP_Declination::get_declination(i, j);
declination_test = get_declination(i, j); declination_test = get_declination(i, j);
if(declination == declination_test) if(declination == declination_test)
{ {
Serial.printf("Pass: %i, %i", i, j); Serial.printf("Pass: %i, %i : %f, %f\n", i, j, declination, declination_test);
} }
else else
{ {
Serial.printf("Fail: %i, %i", i, j); Serial.printf("Fail: %i, %i : %f, %f\n", i, j, declination, declination_test);
} }
} }
} }