feature:extend sideview vertical range to 99km / Fix #2935#2936
feature:extend sideview vertical range to 99km / Fix #2935#2936ReimarBauer merged 4 commits intodevelopfrom
Conversation
| assert thermolib.isa_temperature(51000 * units.m).magnitude == pytest.approx(270.65) | ||
| assert thermolib.isa_temperature(71000 * units.m).magnitude == pytest.approx(214.65) | ||
| assert thermolib.isa_temperature(84852 * units.m).magnitude == pytest.approx(186.95) | ||
| assert thermolib.isa_temperature(99999 * units.m).magnitude == pytest.approx(186.95) |
There was a problem hiding this comment.
why is this the same value pytest.approx(186.95) as the line before? Seeing that other checks show this pattern too. it looks like a range which gives the same result.
Is that 99999 a 99.999 with fractions? (I can't enter that in the UI)
There was a problem hiding this comment.
The conversion routine works from 0 to 99999m/99.999km (effectively for any number < 100km).
I changed the order of the tests to make this more apparent.
The SideView goes only to 99km as we add internally 1km to the selected top height to define the grid.
But this can be improved upon. I just changed the code to allow values up to 99.9km and changed the precision to be dependent on the type, ie for pressure_altitude, a single digit is allowed. 4 digits is only allowed for pressure, where this is necessary for the large altitudes.
I also adapted the code to allow smaller pressures, as previously above 99km the pressure could not be converted back to km.
|
Setting the largest value and toggling through the vertical axis options shows a traceback. traceback.mp4 |
ReimarBauer
left a comment
There was a problem hiding this comment.
besides the linter failure I pushed last version, it looks now good, see PR #2961
Extend range of SideView to 99km.
Purpose of PR?:
Fixes #2935
Does this PR introduce a breaking change?
no
Additional information for reviewer? :
See also #2930
Checklist:
<type>: <subject>