-
-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identifying meteomodem m20 radiosondes & extract GNSS location #932
Identifying meteomodem m20 radiosondes & extract GNSS location #932
Conversation
The convertion for altitude looks fishy, can you elaborate about why it's 10 % not good ? |
I didn't understand the original data format/units coming from the packet and how it has to be converted. So I used sondehub.org to compare altitude with my results on the portapack and made an approximative conversion in the code. |
You can find pre-release binary to flash your portapack/hackrf here to test it if you are not away from m20 launches or if you already collected some m20 : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we make a clear choice over the altitude thing, then it can be merged
firmware/common/sonde_packet.cpp
Outdated
@@ -109,6 +111,12 @@ GPS_data Packet::get_GPS_data() const | |||
result.lat = reader_bi_m.read(14 * 8, 32) / ((1ULL << 32) / 360.0); | |||
result.lon = reader_bi_m.read(18 * 8, 32) / ((1ULL << 32) / 360.0); | |||
} | |||
else if (type_ == Type::Meteomodem_M20) | |||
{ | |||
result.alt = ((reader_bi_m.read(8 * 8, 32) / 100) - 48) / 250 ; //Conversion of altitude is actually a bit shifted, needs to be more accurate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reading the linked decoder code, the translation would be:
result.alt = reader_bi_m.read(8 * 8, 24) / 10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I changed from your code is that I only read 3 bytes as the alt is encoded on 3 bytes only (3 * 8 =24)
I dunno if it is compiling and I have no sonde to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've read further, just combining the 3 bytes and divide by 10 should do it
@joyel24 have you read my review message? |
Yes I'm gonna work on it but I wanted to allow people to decode at least geolocation. It's more than enough for radiosondes hunters that want to collect them once on the ground. And I'm not sure I will be able to decode everything. I think it's better for everyone : Of course I want to make it work, more than that, I'd like to add other data like pressure or vertical/horizontal speed for example... |
Okay let's do it your way :-) |
Didn't expect changing the branch name will close PR... I'm gonna reopen this PR after working on altitude decoding or another data. |
Harf you deleted the branch before I merge! |
Okay |
#934 You can merge this one, I will use the current PR for further work. |
Done for that. You can if you need to delete your source branch and sync your 'next' |
GNSS location is ok, no altitude yet.