Merge pull request #272 from euquiq/RADIOSONDE_METEOMAN_LAT_LON_BUG_FIX

Fix bug on radiosonde Meteoman Lat & lon calculation
This commit is contained in:
Erwin Ried 2021-03-15 11:44:21 +01:00 committed by GitHub
commit ee2ebc8302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ public:
/* The "start_bit" winds up being the MSB of the returned field value. */
/* The BitRemap functor determines which bits are read from the source
* packet. */
uint32_t read(const size_t start_bit, const size_t length) const {
int32_t read(const size_t start_bit, const size_t length) const { //Euquiq: was uint32_t, used for calculating lat / lon in radiosondes, can be negative too
uint32_t value = 0;
for(size_t i=start_bit; i<(start_bit + length); i++) {
value = (value << 1) | data[bit_remap(i)];