atmosphere: fix pressure calculation (convert km to m)
This commit is contained in:
parent
9cef15f49e
commit
08d7265905
|
@ -79,10 +79,10 @@ Based on Figure 27 from SRC1, and Figure 28 using the middle of the 3 temperatur
|
|||
|
||||
### Regression analysis
|
||||
|
||||
- 350km-850km: `p[bar](a[km]) = e^(-8.0920583983 - 0.0066339143 * a)`
|
||||
- 50km-350km: `p[bar](a[km]) = e^(-0.969198983 - 0.027000953 * a)`
|
||||
- -125km-50km: `p[bar](a[km]) = e^(0.0626589359 - 0.0473755348 * a)`
|
||||
- <-125km: `p[bar](a[km]) = -715.5577817531 * a - 89044.7227191413` (low-effort linear regression assuming p(-70000km) = 5e7 bar)
|
||||
- 350km-850km: `p[bar](a[m]) = e^(-8.0920583983 - 0.0000066339143 * a)`
|
||||
- 50km-350km: `p[bar](a[m]) = e^(-0.969198983 - 0.000027000953 * a)`
|
||||
- -125km-50km: `p[bar](a[m]) = e^(0.0626589359 - 0.0000473755348 * a)`
|
||||
- <-125km: `p[bar](a[m]) = -0.7155577817531 * a - 89044.7227191413` (low-effort linear regression assuming p(-70000km) = 5e7 bar)
|
||||
|
||||
### Designing the in-game atmosphere
|
||||
|
||||
|
|
|
@ -278,11 +278,11 @@ pub fn jupiter_altitude_to_pressure(altitude: f64) -> f64 {
|
|||
if a >= 1e6 {
|
||||
return 0.0;
|
||||
} else if a >= 350e3 {
|
||||
return (-8.0920583983 - 0.0066339143 * a).exp();
|
||||
return (-8.0920583983 - 0.0000066339143 * a).exp();
|
||||
} else if a >= 50e3 {
|
||||
return (-0.969198983 - 0.027000953 * a).exp();
|
||||
return (-0.969198983 - 0.000027000953 * a).exp();
|
||||
} else if a >= -125e3 {
|
||||
return (0.0626589359 - 0.0473755348 * a).exp();
|
||||
return (0.0626589359 - 0.0000473755348 * a).exp();
|
||||
}
|
||||
return -715.5577817531 * a - 89044.7227191413;
|
||||
return -0.7155577817531 * a - 89044.7227191413;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue