rs1729 / RS

radiosonde decoding
GNU General Public License v3.0
170 stars 56 forks source link

RS41 - Add battery voltage extraction. #13

Closed darksidelemm closed 5 years ago

darksidelemm commented 5 years ago

I've only added this to the rs41-sgm decoder, since I'm guessing that's going to replace rs41mod.c very soon!

Works OK, tested on bench with variable power supply and it tracks the input voltage just fine.

rs1729 commented 5 years ago

Yes, have seen this somewhere, don't know, who came up with this first. Is the data 16 or 24 bit (like the meas[]-data)? Although even 16 bit would allow for very high voltage.

Since it is not so interesting anyway, I would move it to -vv output, so the normal output is not overloaded (json is not affected): 1064: if (gpx->option.vbs == 3) fprintf(stdout, " (%.1f V) ", gpx->batt); like sat-num.

darksidelemm commented 5 years ago

Bazjo's page suggests it is 24-bits, but I don't see how it would ever get to that high a value, hence I only used 16-bits. No probs moving the text output to the -vv area, I just stuck it in every line mainly for testing...

I'll be adding support for this field to auto_rx in the next update.

rs1729 commented 5 years ago

Moved batt-voltage to "-vv".

And rs41_sgm.c is now the new rs41mod.c, kept the old as rs41mod18.c.

DFM-09 has also STM32F1, I think the voltage and internal/mcu-temperature are 16 bit, though different factor (1e3 for voltage). For RS41 it could be that one of the other values following voltage is mcu-temperature. For DFM-09 these values are a bit more interesting, in particular the internal temperature when related to the frequency drift.

rs1729 commented 4 years ago

If Volt*10.0 is stored, 1 byte should be enough. Also there are reports that occasionally bit14 (2nd byte) is switched on just before shut down, if timer is set. https://github.com/rs1729/RS/commit/870014f45d88bd269b93e4e0545ff3fce1e76569