During testing (the old test_danger_space unittest), with an absurdly dense atmosphere (1000 hPa) that led to a trajectory drop through 4000ft, the t in conditions.py::get_density_factor_and_mach_for_altitude() went negative. As best I can tell this is a temperature, so this shouldn't be possible no matter how extreme the variables. This function is probably supposed to do calculations in Kelvin, but it appears to be doing them in whatever Temperature units were set. So we need some test cases here.
Specific values found in this test case:
t = -.008055
_p0 = 1000
_t0 = 15
cP = -5.255876
ta = 57.82
tb = 72.8
altitude = -3878
x = 1038
y = -4208
During testing (the old
test_danger_spaceunittest), with an absurdly dense atmosphere (1000 hPa) that led to a trajectory drop through 4000ft, thetinconditions.py::get_density_factor_and_mach_for_altitude()went negative. As best I can tell this is a temperature, so this shouldn't be possible no matter how extreme the variables. This function is probably supposed to do calculations in Kelvin, but it appears to be doing them in whatever Temperature units were set. So we need some test cases here.Specific values found in this test case:
t= -.008055_p0= 1000_t0= 15cP= -5.255876ta= 57.82tb= 72.8altitude= -3878x= 1038y= -4208