Gentlemen, I have been looking at the atmosperic system of flightgear and altitude and airspeed calcs in particular. I have been checking it for correctness and later looked a bit in the code.
I must admit that I am not quite clear on how it works, particular the interaction between FDM and the atmospheric module, but it seems to work correctly. Although the many unit conversions and lack of significant numbers tend to decrease accuracy considerably. The real fault I found was the calculation of /systems/pitot/total-pressure. Here the dynamic pressure is calculated with the calibrated airspeed (somewhat misleading property name /velocity/airspeed-kts) and added to the static pressure. As in the instrumentation/airspeed_indicator the same strategy is used, the mistake is not apparent. Total pressure is _not_ the sum of static pressure and dynamic pressure and furthermore dynamic pressure is not calculated with the calibrated airspeed! Total pressure is the static pressure plus impact pressure (q_c = p_t - p), which at low speeds and altitude is approximately the same as dynamic pressure, but for anything flying above 3000ft or at more then 200kts compressibility kicks in and values deviate. So I submitted a merge request that calculates the proper total pressure (using /velocities/mach). In addition I added a property called measured-total-pressure for supersonic speeds which assumes a normal shockwave in front of the pitot tube. Airspeed_indicator calcs are also adjusted. At the moment the new measured-total-pressure is not used. It would require more complicated calcs for calibrated airspeed and indicated-mach as the formulas are not explicit. Please have a look at the c programming in particular as I am a novice at it. As mentioned above, I would like to understand the atmospheric module of flightgear. What I would expect is that: 1) The FDM gives the "state variables" geometric altitude and airspeed 2) the atmospheric module, using METAR or any other atmospheric definitions, gives back pressure, density, temperature, Mach, dynamic and kinematic viscosity etc. etc. for the FDM to calculate all forces for the next iteration. 3) The data from the atmospheric module is also used for pitot and static system values and from that air-data instruments Instead of the above I see that the FDM-s are passing Mach and calibrated airspeed, have their own atmospheric modules. Standard atmosphere is defined about four times in the code. For JSBsim as it can run standalone I can understand that, but when running in FG it should source off the FG atmos module only. I would greatly appreciate any pointers to how and why. Cheers, Eric ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel