AP_Math: move print_latlon into sole caller

This commit is contained in:
Peter Barker
2019-04-02 10:19:38 +11:00
committed by Andrew Tridgell
parent e869eaeda4
commit 431bd77d7e
2 changed files with 0 additions and 26 deletions
-21
View File
@@ -156,27 +156,6 @@ bool location_sanitize(const struct Location &defaultLoc, struct Location &loc)
return has_changed;
}
/*
print a int32_t lat/long in decimal degrees
*/
void print_latlon(AP_HAL::BetterStream *s, int32_t lat_or_lon)
{
int32_t dec_portion, frac_portion;
int32_t abs_lat_or_lon = labs(lat_or_lon);
// extract decimal portion (special handling of negative numbers to ensure we round towards zero)
dec_portion = abs_lat_or_lon / 10000000UL;
// extract fractional portion
frac_portion = abs_lat_or_lon - dec_portion*10000000UL;
// print output including the minus sign
if( lat_or_lon < 0 ) {
s->printf("-");
}
s->printf("%ld.%07ld",(long)dec_portion,(long)frac_portion);
}
// return true when lat and lng are within range
bool check_lat(float lat)
{