]> git.gag.com Git - fw/altos/commit
altoslib: Handle pressure values which are too low (including negative)
authorKeith Packard <keithp@keithp.com>
Wed, 23 Apr 2025 16:23:00 +0000 (09:23 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 23 Apr 2025 18:37:08 +0000 (11:37 -0700)
commit8756a1215a69f7fef40de0e10fcd61980ec3a018
tree2dec94cc2f48da1623bddedb04bc094f61b3bbcc
parent029c4ad372c9872c0fce514f52f487a9a837066d
altoslib: Handle pressure values which are too low (including negative)

The atmospheric model didn't deal with pressures below the minimum
value correctly and crashed with accesses outside of the base_altitude
array.

Instead of returning errors, clamp pressure within the model and
return a fixed maximum altitude value of 100km.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosConvert.java