Closed bubeck closed 1 year ago
Thanks for your comment. The implementation does not change the LOGGING of the igc. It will always log both sensors or the values which are availble.
The PR changes READING the IGC. This is used to display a previously recorded IGC e.g. in flightbook after a flight. Some IGC files may sometimes miss baro_alt and in this case we use GNSS instead. Otherwise nothing will be shown in the fligthbook according to height.
Got it, my bad :) Thanks for the explanation!
[Disclaimer: I don't know the Source Code in detail! It's just meant as a friendly hint] Is it really wanted behavior to log "wrong" data instead of no data? As an example: let's assume you'd like to measure the difference between high side- and low side- current sensing. You'd have two current sensors in one electrical circuit. One sensor is shortly before the load, the other one is shortly aft the load. Let's assume, the sensor aft the load is failing and therefore you're just replacing it with the values of the second sensor. There won't be any differences noticable in the log file...
Back to your implementation: I think both altitudes are calculated correctly?! At least I'm always reading both on my display of the strato - as expected they are slightly different. So what would be the reason for the missing altitude in the log file? I think the problem is to be found somewhere else (although I don't know where tbh!). It just seems wrong to me to replace a faulty reading in the log file with a reading from a different sensor...
Edit: however I also see the benefits from this simple solution to have at least anything logged on each parameter