mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 19:54:39 +00:00
fix altitude inaccuracy
This commit is contained in:
parent
cfe5a6bfe4
commit
d48e25167f
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||||
* Copyright (C) 2017 Furrtek
|
* Copyright (C) 2017 Furrtek
|
||||||
|
* Early 2023 joyel24 added meteomodem M20 support
|
||||||
*
|
*
|
||||||
* This file is part of PortaPack.
|
* This file is part of PortaPack.
|
||||||
*
|
*
|
||||||
@ -113,9 +114,9 @@ GPS_data Packet::get_GPS_data() const
|
|||||||
}
|
}
|
||||||
else if (type_ == Type::Meteomodem_M20)
|
else if (type_ == Type::Meteomodem_M20)
|
||||||
{
|
{
|
||||||
result.alt = reader_bi_m.read(8 * 3, 24) / 100.0 ; // ((reader_bi_m.read(8 * 8, 32) / 100) - 48) / 250 ;
|
result.alt = reader_bi_m.read(8 * 8, 24) / 100.0 ; // <|
|
||||||
result.lat = reader_bi_m.read(28 * 8, 32) / 1000000.0 ; //https://raw.githubusercontent.com/projecthorus/radiosonde_auto_rx/master/demod/mod/m20mod.c
|
result.lat = reader_bi_m.read(28 * 8, 32) / 1000000.0 ; // <| Inspired by https://raw.githubusercontent.com/projecthorus/radiosonde_auto_rx/master/demod/mod/m20mod.c
|
||||||
result.lon = reader_bi_m.read(32 * 8, 32) / 1000000.0 ;
|
result.lon = reader_bi_m.read(32 * 8, 32) / 1000000.0 ; // <|
|
||||||
}
|
}
|
||||||
else if (type_ == Type::Vaisala_RS41_SG)
|
else if (type_ == Type::Vaisala_RS41_SG)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user