diff --git a/doc/research.md b/doc/research.md index 2e4393a..590d70b 100644 --- a/doc/research.md +++ b/doc/research.md @@ -122,8 +122,8 @@ Density: - 500km-1029.2km: `rho[kg/m³](x[m]) = exp(-15.98781474626208 - 0.00000816092074*x)` - 200km-500km: `rho[kg/m³](x[m]) = exp(-4.22487505187567 - 0.00003251947782*x)` - 0km-200km: `rho[kg/m³](x[m]) = exp(-1.83275074106303 - 0.00004486861245*x)` -- -62000km-0km: `rho[kg/m³](x[m]) = -0.0725781*x + 0.16` (linear regression) -- -70000km-62000km: `rho[kg/m³](x[m]) = 25000.0 / (1 + exp(0.00580528 * x + 361.44394)))` (logistic regression) +- -62000km-0km: `rho[kg/m³](x[m]) = -0.0000725781*x + 0.16` (linear regression) +- -70000km-62000km: `rho[kg/m³](x[m]) = 25000.0 / (1 + exp(0.00000580528 * x + 361.44394)))` (logistic regression) ### Designing the in-game atmosphere diff --git a/src/nature.rs b/src/nature.rs index a3560e3..57e9298 100644 --- a/src/nature.rs +++ b/src/nature.rs @@ -325,7 +325,7 @@ pub fn jupiter_altitude_to_density(altitude: f64) -> f64 { } else if x >= 0.0 { return (-1.83275074106303 - 0.00004486861245 * x).exp(); } else if x >= -62000e3 { - return -0.0725781 * x + 0.16; + return -0.0000725781 * x + 0.16; } - return 25000.0 / (1.0 + (0.00580528 * x + 361.44394)).exp(); + return 25000.0 / (1.0 + (0.00000580528 * x + 361.44394).exp()); }