fixed .MM calculation

pull/79/head
alanbjohnston 5 years ago committed by GitHub
parent bb3ecac66c
commit a79dbdd7e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1980,7 +1980,7 @@ float toAprsFormat(float input) {
// converts decimal coordinate (lattitude or longitude) to APRS DDMM.MM format
int dd = (int) input;
int mm1 = (int)((input - dd) * 60);
int mm2 = (int)((input - dd - mm1/60) * 60) ;
int mm2 = (int)((input - dd - mm1/60) * 60 * 60) ;
float output = dd * 100 + mm1 + mm2 * 0.01;
return(output);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.