1
0
Fork 0
Commit graph

168 commits

Author SHA1 Message Date
david
682feb8f2d Flattened src/Systems/ subtree.
Added src/Instrumentation/ with partial stab at a vacuum-driven
attitude indicator.
2002-09-24 14:51:37 +00:00
david
7c057de4fe Started new module and sub-modules for aircraft systems, including an
initial simplistic vacuum system that's not yet connected to anything.
2002-09-23 19:55:10 +00:00
curt
df6989a37a Bernie Bright:
Here is a FGIO class derived from FGSubsystem that replaces the fgIOInit()
and fgIOProcess() functions.  The FGIO::update(double delta) doesn't use the
delta argument yet.  I suspect it could be used as a replacement for the
calculated interval value but I'm not familiar enough with that piece of code
just yet.

I've also added two "command properties" to fg_commands.cxx that select the
next or previous view.  Writing any value to these properties triggers the
corresponding action.  As an example I modified my keyboard.xml:

 <key n="118">
  <name>v</name>
  <desc>Next view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/next</property>
   <value type="bool">true</value>
  </binding>
 </key>

 <key n="86">
  <name>V</name>
  <desc>Prev view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/prev</property>
   <value type="bool">true</value>
  </binding>
 </key>

And of course these actions can also be triggered from external scripts via
the props server.
2002-08-25 20:56:16 +00:00
david
49bb3306d9 Environment manager overhaul -- return a copy of an FGEnvironment
object rather than a pointer.

FGEnvironment now has the beginning of an atmospheric model, and will
recalculate temperature (not pressure or density, yet) based on
elevation.

FGEnvironment has a copy constructor.
2002-05-11 23:23:42 +00:00
david
5a849b66e8 Major overhaul:
- changed FGSubsystem::update(int) to
  FGSubsystem::update(delta_time_sec); the argument is now delta time
  in seconds rather than milliseconds

- added FGSubsystem::suspend(), FGSubsystem::suspend(bool),
  FGSubsystem::resume(), and FGSubsystem::is_suspended(), all with
  default implementations; is_suspended takes account of the master
  freeze as well as the subsystem's individual suspended state

- the FDMs now use the delta time argument the same as the rest of
  FlightGear; formerly, main.cxx made a special case and passed a
  multiloop argument

- FDMs now calculate multiloop internally instead of relying on
  main.cxx

There are probably some problems -- I've done basic testing with the
major FDMs and subsystems, but we'll probably need a few weeks to
sniff out bugs.
2002-05-11 16:28:50 +00:00
curt
586d767ab6 There was an integer overflow in the way elapsed_time_ms. Because the
SGTimeStamp "-" operator returns it's result in usec's, there is an upper bound of 37.8 minutes on the maximum difference this operator can reliably report
before the math overflows.  I change the global "int elapsed_time_ms" variable
to a "double sim_time_ms" and restructured how the value is calculated.
----
The practical result of the overflow bug is that a large negative dt was
passed to the event manager and the end effect was that no events would
be run until their counters caught up ... in another 37.8 minutes or so.
2002-04-20 14:52:43 +00:00
david
d2344cbabb Removed dependency on viewmgr.hxx from globals.hxx, so that changes to
the viewer code do not require most of FlightGear to be rebuilt.
Added some now-required includes to environment.cxx.
2002-04-05 18:46:47 +00:00
david
d0eaafb1e1 Patches from Tony Peden to separate property XML I/O operations into a
separate header file.  This change will help integrate properties into
JSBSim.

Also, I (David Megginson) removed most of the SimGear include
statements from globals.hxx, reducing the amount of recompilation
every time SimGear changes.  This required making minor changes to a
lot of files that were depending on the side-effects of the inclusions
in globals.hxx.
2002-03-16 00:18:38 +00:00
david
0d3b0f27ba Add support for elapsed time and logging. 2002-03-12 16:30:27 +00:00
david
2e4f836a98 General cleanups to cut cross-dependencies and speed up compilation.
Added two new properties:

  /environment/temperature-sea-level-degc
  /environment/pressure-sea-level-inhg

These are now supported in FGEnvironment as well, though they always
have the same value for now.  They need to be hooked up to the FDMs.
2002-02-22 23:37:45 +00:00
curt
dea7284cc7 Restructured the 'freeze' property a bit. We now have
/sim/freeze/master      (implimented)
  /sim/freeze/fuel        (implimented)
  /sim/freeze/position    (not implimented)
  /sim/freeze/time-of-day (not implimented)

/sim/freeze/master is bound to the 'p' key via keyboard.xml, however,
/sim/freeze/fuel is not bound to anything at the moment so you must
change it via the external property interface, or specify an initial
value on the command line.
2002-01-20 03:52:36 +00:00
david
f29978fb42 Added fullscreen to globals, and fixed compile bug for 3DFX cards. 2002-01-06 16:51:31 +00:00
curt
d839e84f99 Cleaned up various warning messages. 2001-06-14 22:18:01 +00:00
curt
1b0878a835 - modified setup so that the globals object creates and deletes its
own instances of the property and command managers
2001-06-01 17:52:40 +00:00
curt
182fd42b40 SG-ified logstream. 2001-03-24 06:03:11 +00:00
curt
e1dd52d38a The FlightGear patches add new saveInitialState and
restoreInitialState methods to FGGlobals, as well as the two-stage
commit described above for loading saved files.  fgInit now takes a
snapshot of the initial state before handing off to the main loop, and
the GUI reInit function restores that state explicitly before calling
fgReInit.

The FlightGear patches also modify fg_props.hxx to add optional
useDefault arguments to all of the fgTie functions -- that lets you
choose whether you want to pick up any default value in the property
tree when you tie the property (the default is true).
2001-01-19 22:57:24 +00:00
curt
bc99033c96 Integrated FGOptions with the property manager (by David Megginson) 2001-01-12 15:37:40 +00:00
curt
6654ae5f49 Initial revision. 2000-07-07 17:27:53 +00:00