There is a change coming to the JSBSim modeled atmosphere. A new standard atmosphere class is being completed that models the U.S. Standard Atmosphere (1972) all the way up to 1000 km. FlightGear interacts with the FDM atmosphere in a predictable way, since the user may want to set conditions. Currently, this is the code that permits the controlling application (FlightGear) to control the atmosphere:
If the property /environment/params/control-fdm-atmosphere is set to true, then the JSBSim atmosphere model is set to UseExternal and the Temp, Press, and Density are set: Atmosphere->UseExternal(); Atmosphere->UseExternal(); Atmosphere->SetExTemperature( Atmosphere->SetExPressure(pressure->getDoubleValue()*70.726566); Atmosphere->SetExDensity(density->getDoubleValue()); Otherwise, UseInternal is set. Atmosphere->UseInternal(); Each pass through the copyToJSBSim function is called, these parameters are set: Atmosphere->SetExTemperature( Atmosphere->SetExPressure(pressure->getDoubleValue()*70.726566); Atmosphere->SetExDensity(density->getDoubleValue()); These have no effect if UseInternal is set. That was the old way. None of these API methods are present in the new model. The new way isn't here yet, but will be after the upcoming release of FlightGear. As reported on the JSBSim developer mailing list, I have submitted new updates to Codestriker for the new standard atmosphere model if anyone wants to have another look at how it is shaping up: https://sourceforge.net/apps/codestriker/jsbsim/codestriker.pl?action=list_t opics&sstate=0 The documentation is shaping up at the same time here: http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.htm l In the new version of the standard atmosphere model, external applications such as FlightGear will be able to control the atmosphere by setting sea level conditions, or at-altitude conditions using any of these API calls (see the documentation at the second link, above, for more information on these): void SetSLTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> (double t, eTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> unit=eFahrenheit); void SetTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> (double t, double h, eTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> unit=eFahrenheit) {}; void SetTemperatureBias <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> (double t, eTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> unit=eFahrenheit); void SetSLTemperatureGradedDelta <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> (double t, eTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> unit=eFahrenheit); void SetTemperatureGradedDelta <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> (double t, double h, eTemperature <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> unit=eFahrenheit); void SetSeaLevelPressure <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> (double pressure, ePressure <http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGStandardAtmosphere.ht ml> unit=ePSF); Several units are available for the setters - both metric and English. The density is calculated from the temperature and pressure, so it is not specified. The point of this is that the temperature - and the temperature profile - are controllable by the calling application. The sea level pressure can be set by the calling application. I will be adding the ability to set the pressure at a particular altitude/elevation, but that's not ready yet. These two items should allow a great deal of control over the atmosphere, with the atmosphere remaining internally consistent. The winds modeling have been moved to another class, FGWinds. Additional wind effects are hoped to be modeled, such as downbursts, 1 minus cosine gusts, etc. Additionally, I am considering the modeling of temperature and pressure "turbulence", as well - slight fluctuations of those parameters based on temporal and spatial conditions. Comments? Jon
<<attachment: winmail.dat>>
------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel