From 41920268a6cd9a4fc0f4797564450f691b2203d5 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 10 Nov 2003 21:55:49 +0000 Subject: [PATCH] I had made a change on 6/24/2003 relating to temperature interpolation. Upon further review, I was very misguided, and unfortunately no one slapped my hand at the time. Factoring in the environment manager's interpolation scheme, it makes complete sense to specify the sea level temperature at each boundary and aloft layer. In fact, this is the only way that allows the temperature interpolation to make sense, especially around the boundary layer. This is confusing stuff, but it now works perfectly. :-) --- src/Environment/environment.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Environment/environment.cxx b/src/Environment/environment.cxx index e6eb0b8a6..47e4d061f 100644 --- a/src/Environment/environment.cxx +++ b/src/Environment/environment.cxx @@ -184,14 +184,14 @@ FGEnvironment::read (const SGPropertyNode * node) maybe_copy_value(this, node, "visibility-m", &FGEnvironment::set_visibility_m); - if (!maybe_copy_value(this, node, "temperature-degc", + if (!maybe_copy_value(this, node, "temperature-sea-level-degc", &FGEnvironment::set_temperature_sea_level_degc)) - maybe_copy_value(this, node, "temperature-sea-level-degc", + maybe_copy_value(this, node, "temperature-degc", &FGEnvironment::set_temperature_degc); - if (!maybe_copy_value(this, node, "dewpoint-degc", + if (!maybe_copy_value(this, node, "dewpoint-sea-level-degc", &FGEnvironment::set_dewpoint_sea_level_degc)) - maybe_copy_value(this, node, "dewpoint-sea-level-degc", + maybe_copy_value(this, node, "dewpoint-degc", &FGEnvironment::set_dewpoint_degc); if (!maybe_copy_value(this, node, "pressure-sea-level-inhg", @@ -576,14 +576,14 @@ interpolate (const FGEnvironment * env1, const FGEnvironment * env2, env2->get_visibility_m(), fraction)); - result->set_temperature_degc - (do_interp(env1->get_temperature_degc(), - env2->get_temperature_degc(), + result->set_temperature_sea_level_degc + (do_interp(env1->get_temperature_sea_level_degc(), + env2->get_temperature_sea_level_degc(), fraction)); result->set_dewpoint_degc - (do_interp(env1->get_dewpoint_degc(), - env2->get_dewpoint_degc(), + (do_interp(env1->get_dewpoint_sea_level_degc(), + env2->get_dewpoint_sea_level_degc(), fraction)); result->set_pressure_sea_level_inhg -- 2.39.5