1
0
Fork 0
Commit graph

3373 commits

Author SHA1 Message Date
david
0618c2cae8 Changed the near clip plane to 0.1f regardless. Previously, it jumped
to 10m after takeoff, but that doesn't really make sense any more,
especially if models are going to have interior views.  Is there any
real saving in pushing the near plane out anyway?
2002-03-05 13:35:48 +00:00
curt
be99e1549a Fixed a bug with view-offset specification from the command line. There
was some confusion between degrees and radians which would lead to a huge
goal_view_offset value.  The display would sit and spin for a *long* time
trying to wind it's way up to this large value.
2002-03-04 20:12:30 +00:00
curt
7d8af6fee2 Fix a compiler warning. 2002-03-04 19:59:50 +00:00
curt
519ac21fa8 Fix a visibility condition bug in 3d panel. 2002-03-04 19:59:22 +00:00
curt
d8b6786d20 This patch creates a sample manager next to the sound manager. The
difference between the two is this: A sample is file related and sound
is a authonomus entity. This means you can have several sounds pointing
to a single sample. In that case, just one sample is loaded into memory.
The advantage is you can play the same sample with different pitch or
volume, but with just one  sample loaded into memory.

To fully support this there is a new fucntion call:

    FGSimpleSound *sample = new FGSimpleSound("filename");
    mgr->add(sample, "name");

should be replaced by:

    FGSimpleSound *sample = mgr->add("name", "filename");

But the old behaviour is still supported with one minor change, sounds
with the same name aren't supported anymore.

Erik
2002-03-04 16:03:11 +00:00
curt
1f5096105b Fixed a couple compiler warnings. 2002-03-04 15:46:44 +00:00
david
f477a4603b Patch from Andy Ross:
Actually, I think I'm off the hook here; the problem is pre-existing.
What's happening is that the x/y offsets enter the modelview matrix at
line 346 in the current panel.cxx.  But note that the same
transformation also occurs before each instrument rendered at line
403.  What's happening is that the instruments are double-translated
relative to the background.

Unless I'm not understanding something, the one inside the instrument
render loop looks unnecessary.  Removing it fixes the issue and
doesn't cause any bugs that I can find.  It also fixes a bug where you
could scroll the instruments on top of the 3D panel, where the offsets
are supposed to be ignored. :)

Attached is a new panel.cxx which fixes that bug, and substantially
simplifies the virtual panel code (the matrix inversion that I thought
was needed wasn't, but there were some offsetting scale bugs that hid
the problem).
2002-03-04 13:27:53 +00:00
andy
b9d1cad6f2 Export the gear compression to the property tree. 2002-03-04 07:57:43 +00:00
curt
536e95b63d Further modifications and restructuring of the scenery loading process. 2002-03-04 02:36:06 +00:00
david
f75e1b4d7b Add fake control-surface positions for 3D model animation. 2002-03-04 01:28:17 +00:00
david
b4eb6324aa Patch from Jim Wilson:
Property sort now leaves "." and ".." at top of subdirectory list in their
expected sequence.
2002-03-04 01:05:59 +00:00
david
e71873f4ad Patch from Jim Wilson:
These changes add to the "Add Waypoint" dialog so that you can see the entire
list in the pui dialog that you are adding to.  Also made some minor changes
so that the autopilot is now activated (toward first waypoint target heading)
when a waypoint is added.
2002-03-04 00:03:25 +00:00
curt
73b92a697d Further restructuring of the scenery loading code. 2002-03-03 23:20:55 +00:00
david
b9e866cfdd Added write-all parameter to save command. If set to true, the
command will save *all* properties, rather than just those marked as
archivable.  This feature was requested by Tony Peden to make it
easier to write documentation on the properties, but it should also be
useful for debugging.  There is currently no default binding for the
command with the write-all parameter set to true.
2002-03-03 22:48:40 +00:00
david
76b06f4707 Added final newline to prevent compiler warnings. 2002-03-03 22:47:06 +00:00
curt
938d006188 Updates to the scenery loading infrastructure to make it more flexible,
clean up some messiness, and lay more groundwork for runway lighting.
2002-03-03 20:29:31 +00:00
curt
9c42c9288a Added magnetos and starter to structure 2002-03-03 20:27:56 +00:00
david
b1ddb2a800 Erik Hofman's documentation for sound configuration, updated and moved
from the base package.
2002-03-03 02:07:21 +00:00
david
d83fc1e9c8 Logging cleanups from Martin Dressler. 2002-03-03 00:38:56 +00:00
david
7e93fca8ee Virtual cockpit patches from Andy Ross:
What the attached patch does is map your panel definition onto a (non
z-buffered) quad in front of your face.  You can twist the view around
and see it move in the appropriate ways.

Apply the patch (let me know if folks need help with that step), and
then set the /sim/virtual-cockpit property to true.  You can do this
on the command line with --prop:/sim/virtual-cockpit=1, or via the
property picker.  Bind it to a key for fast toggling if you like.

The default bindings don't allow for "panning" the view, so you'll
have to modify yours.  These are the mappings to my joystick's hat
switch, for those who need hints:

   <axis n="6">
    <desc>View Direction</desc>
    <low>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-offset-deg</property>
      <step type="double">1.0</step>
     </binding>
    </low>
    <high>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-offset-deg</property>
      <step type="double">-1.0</step>
     </binding>
    </high>
   </axis>

   <axis n="7">
    <desc>View Elevation</desc>
    <low>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-tilt-deg</property>
      <step type="double">1.0</step>
     </binding>
    </low>
    <high>
     <repeatable>true</repeatable>
     <binding>
      <command>property-adjust</command>
      <property>/sim/view/goal-tilt-deg</property>
      <step type="double">-1.0</step>
     </binding>
    </high>
   </axis>

While the current implementation is happy with just plastering the
panel's notion of "screen" into the 3D world, this is actually more
general.  Each panel can, in principle, have it's own coordinate
system, and you could build a cockpit out of a bunch of them.  The
mapping is specified by providing a 3D coordinate for three corners of
the quad the panel should be mapped to; this should be pretty simple
to work with.

All that's needed for a perfectly general solution is a convention on
where to store the information (a cockpit xml file, or put it in the
aircraft -set file, or...), and some work on the panel's coordinate
system conventions (some of which don't coexist very nicely with a
generalized 3D environment).  Combine that with a plib model for the
non-panel interior of the cockpit, and we're golden.

I'm actually really pleased with this.  It worked better and more
quickly than I could have imagined, and impact on the surrounding code
is quite light -- a few property tests only.  But some stuff is still
missing:

+ No equivalent work was done to the HUD, so it still displays
   incorrect headings when the view changes.  The use of pixel
   coordinates deep in the HUD code is going to give me fits doing the
   port, I sure.  It's not nearly so well put together as the panel
   (where I just changed the setup code -- none of the rendering code
   changed at all).

+ I forgot that the panel was clickable. :)  Input events still have
   the screen coordinates, which essentially kills the interactivity
   when in virtual cockpit mode.  This won't be hard to fix; it's only
   broken because I forgot the feature existed.

And one note about the implementation choice: to get away from the
inevitable near clip plane issue, the virtual cockpit renderer simply
disables the z buffer.  This means that cockpits built using these
panels need to be z-sorted, which isn't too hard since they are static
geometry.  It also means that no two "virtual panels" can ever be
allowed to interpenetrate.  No biggie.
2002-03-03 00:06:24 +00:00
david
0296c04e32 For property-scale, apply the squared option before factor, etc. 2002-03-02 19:40:26 +00:00
david
00738f22f7 Added min/max parameters to clamp range of movement. These are
actually very powerful when combined with factor and offset -- for
example, on the C310 model the nose wheel can now retract completely
before the doors start closing.
2002-03-02 16:07:42 +00:00
tony
173251885b Fixed gear position property. 2002-03-01 20:56:15 +00:00
curt
7631c37f73 Setting up some more ground work for lighting. 2002-03-01 18:08:30 +00:00
curt
348ac42c90 Attached is a reasonably large patch to add a proper ATC
subsystem to Flightgear.  No more functionality is implemented
than at present (apart from an ATIS bug-fix - station wouldn't
change if the radio was switched directly from one station to
another) but it is much neater than the current hack and should be
easily extendable.

Some cruft is still probably left over in radiostack.[ch]xx such as
the bindings to the comm frequencies but I'll leave removing those
until I'm sure they're not needed there.
2002-03-01 17:39:52 +00:00
curt
a6cb16ce36 This is the change where autopilot bindings are moved from fg_props.cxx to
newauto.cxx.  Basically everything is the same functionally except for a
changed in the initial altitude setting to 3000ft instead of meters (the panel
is in feet).
2002-03-01 16:54:50 +00:00
tony
34072bbc42 Changed -pct properties to -norm 2002-03-01 12:38:37 +00:00
andy
ab381e5c01 Added a property output feature to ControlMap that allows arbitrary binding
and scaling of control values to properties.  Also added a time interpolation
feature that replaces the hacked-in "retract-time" feature for the gear in
a more general way (applicable to flaps, too!).  Incompatibly breaks
the XML syntax; get new files!
2002-03-01 06:47:28 +00:00
curt
9bae80d94a Latest version of hitlist.cxx from Norman Vine:
- Addresses some ot the recent profiling results.
- Added a 'lazy evaluation' in IntersectBranch and inlined a couple
  of HEAVILY called functions.
2002-02-28 23:59:28 +00:00
tony
03b9ecf039 Copy normalized control surface positions to property tree 2002-02-28 13:32:40 +00:00
tony
1ab43c8048 Add support for normalized control surface positions and right and left ailerons 2002-02-28 13:31:56 +00:00
tony
a073e35c7c Add support for normalized control surface positions 2002-02-28 13:30:25 +00:00
curt
3966e02de0 A few of Norman's changes I managed to get in.
Added support for arrays of points (in addition to various forms of triangles)
2002-02-28 00:10:35 +00:00
david
a370cbbb6a A single transformation can now be applied to more than one object by
including multiple <object-name> entries.
2002-02-27 20:32:24 +00:00
curt
249fbedcae Make sure when setting autopilot heading via the menu that the current
heading value is presented between 0 and 360.
2002-02-27 18:05:17 +00:00
david
d514e8c255 Major sound-effect architectural reworking from Eric Hofman, allowing
individual aircraft to have different sounds (and cleaning up my code
a fair bit).  The most important user-visible change is the renaming
of the /sim/sound property to /sim/sound/audible.
2002-02-27 15:13:58 +00:00
david
ad8558a54f Ignore gmon.out, in case people are doing profiling runs. 2002-02-27 14:59:04 +00:00
david
123f8b083d Patch from Andy Ross to sort properties in browser. 2002-02-27 14:58:18 +00:00
david
b51fb81a1e - added an 'offset' parameter for animations (it's applied before
'factor')

- incorporated changes from Norman Vine to avoid expensive matrix
  operations
2002-02-27 12:46:38 +00:00
andy
5faea1c494 Wrong sense in the pilot acceleration coordinates (or maybe it's a panel
bug?  I'm not sure what points where anymore).
2002-02-27 08:24:37 +00:00
andy
df9069a224 Added a post-solver "initEngines()" call to return the engines to a sane
initial state.  No more starting up at cruise RPM.
2002-02-27 00:41:57 +00:00
andy
d3cca375dc Basically complete support for piston engine startup, including power loss
due to single-magneto operation.  Seems to work.
2002-02-27 00:18:57 +00:00
tony
51587dbe75 Trimming in turn now works 2002-02-26 22:28:41 +00:00
tony
998c2a9325 Output control positions to properties 2002-02-26 22:27:42 +00:00
david
8f1d2f7bc9 Added rotation animations, and a factor parameter for scaling. 2002-02-26 14:30:04 +00:00
david
fe7fbdf532 Started support for animations. Currently, the only supported type
(other than "none") is "spin", which must be tied to a property giving
a value in RPM.  This gets the DC-3 propellers turning.  The next type
will be "rotation", which will allow the flaps, elevators, ailerons,
and rudders to move (and even gear, eventually).  Later, I'll add
"shift" for sliding things around, and will figure something out for
blinking lights.
2002-02-26 00:10:06 +00:00
david
3d4bec275b If the model path specified ends with .xml, then read properties from
the XML file, including the path to the 3D file.

This change obsoletes the existing /sim/model/*-offset-deg and
/sim/model/*-offset-m properties in the main property tree, and
replaces them with /offsets/*-deg and /offsets/*-m in the model
property file.  The /path property in the model XML file is relative
to the XML file's location rather than FG_ROOT.
2002-02-25 20:07:34 +00:00
curt
1cc851d2b7 Moved JSBSim.hxx to src/FDM/JSBSim/ 2002-02-25 03:22:03 +00:00
curt
15fcd26c2f Removed JSBSim/tests 2002-02-25 00:07:05 +00:00
tony
eb5a3ceee5 Workaround for terrain altitude problem. Helps but doesn't work 100% 2002-02-24 21:56:38 +00:00