mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 15:29:28 -05:00
ADSB RX: fix negative lat/lon formatting and insure two decimal places (#293)
This commit is contained in:
parent
31439accd5
commit
8fd2d4b1fc
@ -226,9 +226,9 @@ void ADSBRxView::on_frame(const ADSBFrameMessage * message) {
|
||||
if (entry.pos.valid) {
|
||||
str_info = "Alt:" + to_string_dec_uint(entry.pos.altitude) +
|
||||
" Lat" + to_string_dec_int(entry.pos.latitude) +
|
||||
"." + to_string_dec_int((int)(entry.pos.latitude * 1000) % 100) +
|
||||
"." + to_string_dec_int((int)abs(entry.pos.latitude * 1000) % 100, 2, '0') +
|
||||
" Lon" + to_string_dec_int(entry.pos.longitude) +
|
||||
"." + to_string_dec_int((int)(entry.pos.longitude * 1000) % 100);
|
||||
"." + to_string_dec_int((int)abs(entry.pos.longitude * 1000) % 100, 2, '0');
|
||||
|
||||
entry.set_info_string(str_info);
|
||||
logentry+=str_info+ " ";
|
||||
|
Loading…
Reference in New Issue
Block a user