[Flightgear-devel] Defaults
In addition, what is the temperature and atmospheric conditions at the default runway? I'd like to run a test with known conditions - i.e. I'd like to use our JSBSim internal atmosphere. I suspect that the atmospheric conditions are getting passed in by default, true? Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
RE: [Flightgear-devel] Defaults
Jon Berndt writes: In addition, what is the temperature and atmospheric conditions at the default runway? I'd like to run a test with known conditions - i.e. I'd like to use our JSBSim internal atmosphere. I suspect that the atmospheric conditions are getting passed in by default, true? FGEnvironment::FGEnvironment() : elevation_ft(0), visibility_m(32000), temperature_sea_level_degc(15), temperature_degc(15), dewpoint_sea_level_degc(5), // guess dewpoint_degc(5), pressure_sea_level_inhg(29.92), pressure_inhg(29.92), turbulence_magnitude_norm(0), turbulence_rate_hz(1), wind_from_heading_deg(0), wind_speed_kt(0), wind_from_north_fps(0), wind_from_east_fps(0), wind_from_down_fps(0) { _setup_tables(); _recalc_density(); } but you should really just use the property browser as these are exposed under the environment void FGEnvironment::read (const SGPropertyNode * node) { maybe_copy_value(this, node, visibility-m, FGEnvironment::set_visibility_m); if (!maybe_copy_value(this, node, temperature-sea-level-degc, FGEnvironment::set_temperature_sea_level_degc)) maybe_copy_value(this, node, temperature-degc, FGEnvironment::set_temperature_degc); if (!maybe_copy_value(this, node, dewpoint-sea-level-degc, FGEnvironment::set_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, FGEnvironment::set_pressure_sea_level_inhg)) maybe_copy_value(this, node, pressure-inhg, FGEnvironment::set_pressure_inhg); maybe_copy_value(this, node, wind-from-heading-deg, FGEnvironment::set_wind_from_heading_deg); maybe_copy_value(this, node, wind-speed-kt, FGEnvironment::set_wind_speed_kt); maybe_copy_value(this, node, elevation-ft, FGEnvironment::set_elevation_ft); maybe_copy_value(this, node, turbulence/magnitude-norm, FGEnvironment::set_turbulence_magnitude_norm); maybe_copy_value(this, node, turbulence/rate-hz, FGEnvironment::set_turbulence_rate_hz); } ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
RE: [Flightgear-devel] Defaults
I'm trying to find a way to force the JSBSim atmosphere to be used. I'm still not quite sure how to do that (is a property set somewhere in a -set file?). Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Norman Vine Sent: Saturday, October 23, 2004 6:29 PM To: FlightGear developers discussions Subject: RE: [Flightgear-devel] Defaults Jon Berndt writes: In addition, what is the temperature and atmospheric conditions at the default runway? I'd like to run a test with known conditions - i.e. I'd like to use our JSBSim internal atmosphere. I suspect that the atmospheric conditions are getting passed in by default, true? FGEnvironment::FGEnvironment() : elevation_ft(0), visibility_m(32000), temperature_sea_level_degc(15), temperature_degc(15), dewpoint_sea_level_degc(5), // guess dewpoint_degc(5), pressure_sea_level_inhg(29.92), pressure_inhg(29.92), turbulence_magnitude_norm(0), turbulence_rate_hz(1), wind_from_heading_deg(0), wind_speed_kt(0), wind_from_north_fps(0), wind_from_east_fps(0), wind_from_down_fps(0) { _setup_tables(); _recalc_density(); } but you should really just use the property browser as these are exposed under the environment void FGEnvironment::read (const SGPropertyNode * node) { maybe_copy_value(this, node, visibility-m, FGEnvironment::set_visibility_m); if (!maybe_copy_value(this, node, temperature-sea-level-degc, FGEnvironment::set_temperature_sea_level_degc)) maybe_copy_value(this, node, temperature-degc, FGEnvironment::set_temperature_degc); if (!maybe_copy_value(this, node, dewpoint-sea-level-degc, FGEnvironment::set_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, FGEnvironment::set_pressure_sea_level_inhg)) maybe_copy_value(this, node, pressure-inhg, FGEnvironment::set_pressure_inhg); maybe_copy_value(this, node, wind-from-heading-deg, FGEnvironment::set_wind_from_heading_deg); maybe_copy_value(this, node, wind-speed-kt, FGEnvironment::set_wind_speed_kt); maybe_copy_value(this, node, elevation-ft, FGEnvironment::set_elevation_ft); maybe_copy_value(this, node, turbulence/magnitude-norm, FGEnvironment::set_turbulence_magnitude_norm); maybe_copy_value(this, node, turbulence/rate-hz, FGEnvironment::set_turbulence_rate_hz); } ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] defaults
Norman Vine writes: Hmm... maybe this would help untested - but it 'looks' like this will fix 'this' problem, don't thin it will cause any new ones It won't work because the properties in the *-set file will override anything specified on the command line. I'm going to go in today and try to find something that will work. All the best, David -- David Megginson, [EMAIL PROTECTED], http://www.megginson.com/ ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
[Flightgear-devel] defaults
The preferences.xml file specifies the c172 as the default. It appears that even if you request a different aircraft as the default, the c172 config files get loaded first anyway, then the alternate config file is loaded with the correct aircraft. This means that if the c172 specifies any defaults such as aileron trim that isn't specified in the desired aircraft config, it will inherit the c172 settings (i.e. they won't get overwritten, unless done so explicitely.) Is this what we want the behavior to be? I'm guessing it got this way for a reason, but I'm not sure we want things to act this way. For instance, if the default c172 has an electrical system, then the j3cub will have the same one, unless it explicitely requests a different electrical system. Curt. -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities[EMAIL PROTECTED] [EMAIL PROTECTED] Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] defaults
Curtis L. Olson wwrites: David Megginson writes: Curtis L. Olson writes: The preferences.xml file specifies the c172 as the default. It appears that even if you request a different aircraft as the default, the c172 config files get loaded first anyway, then the alternate config file is loaded with the correct aircraft. This means that if the c172 specifies any defaults such as aileron trim that isn't specified in the desired aircraft config, it will inherit the c172 settings (i.e. they won't get overwritten, unless done so explicitely.) Is this what we want the behavior to be? No. Ok, good to know. I'm guessing it got this way for a reason, but I'm not sure we want things to act this way. It's almost certainly an initialization-order problem. We want the aircraft settings to take precedence over preferences.xml and the command-line options to take precedence over the aircraft settings. Feel free to fix it, if you can think of a way to. I haven't actually looked into it beyond observing that an addition to the c172-set.xml file shows up no matter what aircraft I choose. So, I haven't dug into the code at all to see what is actually going on. Hmm... maybe this would help untested - but it 'looks' like this will fix 'this' problem, don't thin it will cause any new ones // Read in configuration (file and command line) bool fgInitConfig ( int argc, char **argv ) { // First, set some sane default values fgSetDefaults(); // Read global preferences from $FG_ROOT/preferences.xml SGPath props_path(globals-get_fg_root()); props_path.append(preferences.xml); SG_LOG(SG_INPUT, SG_INFO, Reading global preferences); readProperties(props_path.str(), globals-get_props()); SG_LOG(SG_INPUT, SG_INFO, Finished Reading global preferences); // Attempt to locate and parse the various config files in order // from least precidence to greatest precidence // Check for $fg_root/system.fgfsrc SGPath config( globals-get_fg_root() ); config.append( system.fgfsrc ); fgParseOptions(config.str()); #if defined( unix ) || defined( __CYGWIN__ ) char name[256]; // Check for $fg_root/system.fgfsrc.hostname gethostname( name, 256 ); config.concat( . ); config.concat( name ); fgParseOptions(config.str()); #endif // Check for ~/.fgfsrc char* envp = ::getenv( HOME ); if ( envp != NULL ) { config.set( envp ); config.append( .fgfsrc ); fgParseOptions(config.str()); } #if defined( unix ) || defined( __CYGWIN__ ) // Check for ~/.fgfsrc.hostname gethostname( name, 256 ); config.concat( . ); config.concat( name ); fgParseOptions(config.str()); #endif // Parse remaining command line options // These will override anything specified in a config file fgParseArgs(argc, argv); // Read the default aircraft config file. string aircraft = fgGetString(/sim/aircraft, ); if (aircraft.size() 0) { SGPath aircraft_path(globals-get_fg_root()); aircraft_path.append(Aircraft); aircraft_path.append(aircraft); aircraft_path.concat(-set.xml); SG_LOG(SG_INPUT, SG_INFO, Reading default aircraft: aircraft from aircraft_path.str()); try { readProperties(aircraft_path.str(), globals-get_props()); } catch (const sg_exception e) { string message = Error reading default aircraft: ; message += e.getFormattedMessage(); SG_LOG(SG_INPUT, SG_ALERT, message); exit(2); } } else { SG_LOG(SG_INPUT, SG_ALERT, No default aircraft specified); } return true; } ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel