From 3344696781289275533c13d2f833d2bc5481d002 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 22 Aug 1998 23:36:22 +0000 Subject: [PATCH] Hopefully squashed a bug that was causing a segfault in an inline pow() call. --- LaRCsim/atmos_62.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LaRCsim/atmos_62.c b/LaRCsim/atmos_62.c index f2863a82a..3415c529c 100644 --- a/LaRCsim/atmos_62.c +++ b/LaRCsim/atmos_62.c @@ -89,6 +89,8 @@ void ls_atmos( SCALAR altitude, SCALAR * sigma, SCALAR * v_sound, int index; SCALAR daltp, daltn, daltp3, daltn3, density; SCALAR t_amb_r, p_amb_r; + int nonconstant_const_param = 5.256; + static SCALAR d_a_table[MAX_ALT_INDEX][5] = { { 0., 2.37701E-03, 1.11642E+03, 0.00000E+00, 0.00000E+00 }, @@ -251,7 +253,9 @@ void ls_atmos( SCALAR altitude, SCALAR * sigma, SCALAR * v_sound, { t_amb_r = 1. - 6.875e-6*altitude; // printf("index = %d t_amb_r = %.2f\n", index, t_amb_r); - p_amb_r = pow( t_amb_r, 5.256 ); + // p_amb_r = pow( t_amb_r, 5.256 ); + p_amb_r = pow( t_amb_r, nonconstant_const_param ); + // printf("p_amb_r = %.2f\n", p_amb_r); } else { -- 2.39.2