1
0
Fork 0
Commit graph

1566 commits

Author SHA1 Message Date
david
b3d5d24d81 Patch from Melchior Franz:
It seems that the airport database was changed some day and the End?Flags
changed from floats to strings. The database definition, though, was not
adapted and still created number entries. Reading out these flags led to
access to memory, that was never initialized. While it didn't cause crashes
during normal use, it actually caused one when I ran fgfs in ddd. Seems,
that the concerned memory region wasn't zeroed out then and hence uncovered
the bug.

Of course, the runways.mk4 database has to be re-created with the new
definitions.
2002-03-25 20:05:34 +00:00
david
de9682e32a Patch from Erik Hofman:
This patch gets F8 working again.
2002-03-25 19:37:49 +00:00
david
780b4a813e Minor patch from David Megginson:
Fix FGViewer::update so that pitch offset and goal pitch offset work
together nicely (the offset was snapping to 90/-90 when only one of
the two was changed).


Viewer improvements from Jim Wilson:

These files get the 3d cockpit working and fix a few issues in the viewer
code.
XYZ offsets are now defined as follows: X -left/right+ (along wing axis), Y
-up/down+ perpendicular to the aircraft, Z is -in/out+ the aircraft's body axis.
I've also done some cleaning up of unused and mostly unusable interfaces,
added commentary to the *.hxx, combined together some duplicate code and
eliminated a couple unecessary operations.  I also moved what was left of the
"protected" zone to "private" since we aren't subclassing this anymore.
2002-03-25 14:32:13 +00:00
david
cf7f245b32 Fixed a small typo. 2002-03-25 14:30:29 +00:00
david
67e61c89ce Support for assigning custom mouse cursors to mouse modes. 2002-03-25 12:58:26 +00:00
david
9709dcb307 First steps towards configurable mouse input. Soon, this new code
(mainly in src/Input/input.cxx) will make src/GUI/mouse.cxx obsolete
and bring the mouse into the same input system as the joystick and
keyboard.  This is just preliminary work allowing, covering mouse
clicks (no motion yet), and it actually crashes on a middle or right
click.

The new mouse support is disabled by default until it become stable;
to try it out, you need to configure --with-new-mouse.
2002-03-23 23:16:13 +00:00
tony
d2156b5649 Updates. Includes property tree additions and fixes. Also Jon's first cut at
multi-fdm capability.  Thanks also to Erik for pointing out a couple of typos.
2002-03-23 00:29:21 +00:00
tony
464c060171 Fix for flaps problem. 2002-03-23 00:27:16 +00:00
david
da621105a0 Removed unused function fgFindNode (the version used now is in model.cxx). 2002-03-22 13:24:29 +00:00
david
343cea2812 Removed unused files. 2002-03-22 13:23:39 +00:00
david
fafc000d61 Initial revision of README describing the contents of the src/Main
directory.
2002-03-21 22:37:12 +00:00
david
825320e8bf Viewer update from Jim Wilson:
This patch renames the "goal" orientation offsets inputs/outputs to
conform with the naming of the new interface.
2002-03-21 20:59:43 +00:00
david
b52123b88b Removed obsolete files. 2002-03-21 13:12:37 +00:00
curt
c032f841e2 more ( string == "" ) to ( string.empty() ) conversions. 2002-03-21 05:31:55 +00:00
andy
e45cb5d0aa Found by inspection a bug in the generation of orientation matrices
for fuselage Surface objects.  If the fuselage wasn't aligned perpendicular
to the Y axis, the matrix wouldn't be orthonormal.  Since all of, perhaps,
three aircraft have ever been built this way, it's doubtful I would have
found this as a bug report. :)
2002-03-21 03:35:52 +00:00
tony
8b621f2b1e Fix for the flaps problem. 2002-03-21 02:26:22 +00:00
tony
86e5f091bc Irix fix. 2002-03-21 01:45:49 +00:00
david
18a3df31b3 Model-loading patch from Dave Luff. 2002-03-20 22:40:11 +00:00
david
f65f1800c7 Use !strcmp for all property name comparisons. 2002-03-20 22:23:10 +00:00
david
d0d3b2bd7a Use !strcmp for all property string-value comparisons. 2002-03-20 22:15:22 +00:00
curt
e95429572c Converted if ( string == "" ) constructs to if ( string.empty() )
Fixed a warning in soundmgr.cxx.
2002-03-20 19:16:13 +00:00
david
4d4cd16012 Major viewer-code overhaul from Jim Wilson:
Description:

This update includes the new viewer interface as proposed by David M. and
a first pass at cleaning up the viewer/view manager code by Jim W.

Note that I have dropped Main/viewer_lookat.?xx and Main/viewer_rph.?xx and
modified the Makefile.am accordingly.


Detail of work:

Overall:
The code reads a little easier.  There are still some unnecessary bits in
there and I'd like to supplement the comments in the viewer.hxx with a tiny
bit on each interface group and what the groupings mean (similar but briefer
than what you emailed me the other day).  I tried not to mess up the style,
but there is an occasional inconsistency.  In general I wouldn't call it done
(especially since there's no tower yet! :)), but I'd like to get this out
there so others can comment, and test.

In Viewer:
The interface as you suggested has been implemented.  Basically everything
seems to work as it did visually.  There is no difference that I can see in
performance, although some things might be a tiny bit faster.

I've merged the lookat and rph (pilot view) code into the recalc for the
viewer.  There is still some redundancy between the two, but a lot has been
removed.  In some cases I've taken some code that we'd likely want to inline
anyway and left it in there in duplicate.  You'll see that the code for both
looks a little cleaner.  I need to take a closer look at the rotations in
particular.  I've cleaned up a little there, but I suspect more can be done
to streamline this.

The external declaration to the Quat_mat in mouse.cxx has been removed.  IMHO
the quat doesn't serve any intrinsic purpose in mouse.cxx, but I'm not about
to rip it out.  It would seem that there more conventional ways to get
spherical data that are just as fast.  In any case all the viewer was pulling
from the quat matrix was the pitch value so I modified mouse.cxx to output to
our pitchOffset input and that works fine.

I've changed the native values to degrees from radians where appropriate.
This required a conversion from degrees to radians in a couple modules that
access the interface.  Perhaps we should add interface calls that do the
conversion,  e.g. a getHeadingOffset_rad() to go along with the
getHeadingOffset_deg().

On the view_offset (now headingOffset) thing there are two entry points
because of the ability to instantly switch views or to scroll to a new view
angle (by hitting the numeric keys for example).   This leaves an anomaly in
the interface which should be resolved by adding "goal" settings to the
interface, e.g. a setGoalHeadingOffset_deg(), setGoalPitchOffset_deg(), etc.

Other than these two issues, the next step here will be to look at some
further optimizations, and to write support code for a tower view.  That
should be fairly simple at this point.  I was considering creating a
"simulated tower view" or "pedestrian view" that defaulted to a position off
to the right of whereever the plane is at the moment you switch to the tower
view.  This could be a fall back when we don't have an actual tower location
at hand (as would be the case with rural airports).

ViewManager:
Basically all I did here was neaten things up by ripping out excess crap and
made it compatible as is with the new interface.

The result is that viewmanager is now ready to be developed.  The two
preexisting views are still hardcoded into the view manager.  The next step
would be to design configuration xml (eg /sim/view[x]/config/blahblah) that
could be used to set up as many views as we want.  If we want to take the easy
way out, we might want to insist that view[0] be a pilot-view and have
viewmanager check for that.
2002-03-20 17:43:28 +00:00
curt
99fa3a6e79 Various Irix cleanups.
Float/Double clean ups for fg_sound.cxx
2002-03-20 15:57:31 +00:00
david
9dbb215b1d Added missing file from JSBSim CVS, with 'using namespace std;'
statement added for ANSI-conformant compilers.
2002-03-20 14:06:14 +00:00
david
25f68c0292 Irix fixes. 2002-03-20 13:59:34 +00:00
tony
775094f9af Updates. 2002-03-20 12:45:39 +00:00
tony
317d794f5c First commit of properties code. JSBSim now has a basic property tree all
under /fdm/jsbsim
2002-03-20 12:45:02 +00:00
david
0cc3bed841 Major property-manager rewrite, using const char * throughout
interface instead of string.  This will result in a lot more
efficiency later, once I add in a simple hash table for caching
lookups, since it will avoid creating a lot of temporary string
objects.  The major considerations for users will be that they cannot
use

  node->getName() == "foo";

any more, and will have to use c_str() when setting a string value
from a C++ string.
2002-03-19 17:12:13 +00:00
andy
47b2307356 Oops, "one third from the edge" means "one SIXTH from the center". 2002-03-19 00:02:18 +00:00
curt
a2acc953ae Somewhere along the line in the recent changes some std::cout were
inclueded in some of the files. Irix doesn't have cout in the std class,
so I changed it to "cout" and included SG_USING_NAMESPACE(std) at the
beginning of the files.
And some minor warning cleanups.
2002-03-18 19:46:24 +00:00
curt
586d7f127a White space tweaks. 2002-03-18 19:02:59 +00:00
curt
464f036f35 Here is a cleaned up hitlist that should solve the PLib conflict
and fixes a 'potential bug' if the FGFS View code were to change

I also consolidated the specialized IntersectLeaf()
as they really didn't gain us much outside of their having
'more direct access into the SSG controlled data'

I would like to see the fgCurrentElevation functions moved
out of hitlist.cxx.

The one obstacle is their being dependent on my PLib
auxillary functions

ssgGetEntityTransform()
ssgGetCurrentBSphere()

code has been run through astyle with the default options
2002-03-18 16:25:16 +00:00
curt
8138c82b58 Incorporated Norman's optimized line/geometry intersection code. 2002-03-17 00:38:24 +00:00
curt
3bf7269174 Initial revision. Things are just beginning to be stubbed in now. 2002-03-17 00:37:22 +00:00
curt
56d6ecbf83 Oops, fixing the ghosts of bugs past. :-) Good thing I remembered how I
fixed this when I made the mistake the first time.
The view code wasn't properly handling the transition across tile
boundaries so we'd get a 'flash' of the scene wrongly transformed for
one frame at every tile boundary crossing.  This is what
scenery.get_next_center() is for.
2002-03-17 00:36:39 +00:00
david
2c4eb0c56b Removed at CM's request. 2002-03-16 22:36:33 +00:00
david
d4c49d65ac Major weather update from Christian Mayer, tying the weather code into
the property system, among other things.  A separate integration into
the FDMs will follow shortly.

This code will be used only if the --with-new-environment option is
*not* passed to configure.
2002-03-16 20:31:27 +00:00
curt
ac99a82b98 Replaced some debugging structure David inadvertantly removed. 2002-03-16 05:12:26 +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
96a4e9abc3 Renamed /cockpit property to /sim/view/internal. 2002-03-15 21:50:14 +00:00
andy
b933406818 Print an error message before terminating on parse errors. 2002-03-15 19:02:07 +00:00
david
753242577f More work on saving and restoring flights. Restoring a flight is not
working in a running FlightGear session because of JSBSim trim-routine
problems, but it does work from the command-line now, i.e.

  fgfs fgfs.sav
2002-03-14 14:25:30 +00:00
curt
56fef38054 Change fog punch through value a bit. Either way it's a WAG for now, but
at least it's less obviously wrong.
2002-03-14 00:52:38 +00:00
david
cabbc08c07 Removed some cout statements left in accidentally. 2002-03-14 00:30:21 +00:00
david
45d64bef95 Centralized most view-management code in FGViewMgr. It's still a
mess, but the mess is all in one place now.
2002-03-14 00:29:20 +00:00
curt
9a27019df1 Combined and updated some code to calculate fog parameters. 2002-03-13 17:06:41 +00:00
curt
87d6a0700d Fix several signed vs. unsigned warning messages. 2002-03-13 17:06:17 +00:00
david
36876decf3 Autopilot cleanup:
- implement the standard FGSubsystem interface, for consistency
- eliminate current_autopilot and add get/set_autopilot to FGGlobals,
  for consistency
- use private methods rather than static functions for tying
  properties

There should be no change in functionality.
2002-03-13 16:31:21 +00:00
curt
fd21788c45 Add "(" and ")" to ensure the expression is evaluated correctly. 2002-03-13 15:55:32 +00:00
david
6cca1d6a75 Eliminate dependencie on tying variable pointers (in preparation for
property-code simplification).
2002-03-13 15:16:24 +00:00
david
a0f50cd90d Added a final newline to avoid a compiler warning. 2002-03-13 14:17:59 +00:00
curt
06bf5db80a Working on the start of a 'standard' <grin> remote FDM interface. This
is a work in progress and needs severe enhancement before it will be
useful.  It provides a UDP data channel that goes both ways between
flightgear and the fdm.  It also provides a TCP 'command' channel so
flightgear can 'reliably' send commands to the remote fdm (such as set
starting position, reset on ground, etc.)
2002-03-13 06:07:07 +00:00
curt
0a01e563f4 Better support of the newer more flexible object file format. This
includes the ability to specify per vertex normals rather than depending
the normals list being the same as the vertices list.  (Support for
previous binary file format scenery is maintained.)
2002-03-13 06:03:37 +00:00
david
d31fcd21ef Patch from Jim Wilson to fix internal cockpit view rotations:
This seems to pretty much correct the problem.  Part of the problem is that
rotations are occuring at the firewall (model origin) which seems a little
un-natural inside the cockpit.  The rest of the problem is I am just learning
how this stuff works (I know I've been saying this for a couple months
now...but hey I'm slow :-)).
2002-03-13 04:58:08 +00:00
curt
d5af9e2a10 *** empty log message *** 2002-03-12 20:38:26 +00:00
curt
62ed7592e3 Fixes for Irix compatibility.
Fix several long standing irix compiler warnings.
2002-03-12 20:01:54 +00:00
david
d8a50ad49e Added a new 'delimiter' property to allow an alternative delimiter to
the comma, and fixed a constant that was causing CygWin compilation
problems.
2002-03-12 19:55:49 +00:00
david
0d3b0f27ba Add support for elapsed time and logging. 2002-03-12 16:30:27 +00:00
david
d23c674846 Bind a new property, /sim/time/elapsed-ms, giving the number of
milliseconds elapsed since the simulation began.
2002-03-12 16:29:32 +00:00
david
c22018db05 Added new logging module. 2002-03-12 16:29:00 +00:00
curt
9ff8951be6 *** empty log message *** 2002-03-12 05:37:55 +00:00
curt
c5f43ca688 Patches from Erik. 2002-03-11 22:55:52 +00:00
curt
914b5636e4 Removed some extra debugging output that wasn't supposed to be committed. 2002-03-11 22:55:01 +00:00
curt
3df76f9401 Oops, make sure we are generating an ocean tile if we can't load a terrain
tile.
Fixed a warning in the sound manager.
2002-03-11 22:50:23 +00:00
curt
9436f68f56 Cleaned up a couple compiler warnings. 2002-03-11 15:41:39 +00:00
david
60e0204fe8 Sound patch from Erik Hofman:
* Add new trigger types: raise, fall
* Add new trigger offset parameter
* Add new volume/pitch types: inv, abs, sqrt
* Add initial support for multiple events to intervere in a single sound
   (by using the same name, see the crank section of 172-sound.xml)
* Cached the volume/pitch type fucntions
   (No more if's inside the loops in update())
2002-03-10 19:31:30 +00:00
curt
6b40600e7b Sgi doesn't define the != operator for string != char[] so we need to cast
the char array into a (string) type before doing the comparison.
2002-03-08 23:24:59 +00:00
david
efe559ead4 First baby steps towards restructuring the view architecture. I've
created a new class, FGViewPoint (declared in viewer.hxx) that holds a
single position in FlightGear coordinates, and have used it to factor
a lot of the common code out of viewer_lookat.cxx and viewer_rph.cxx.

I don't know whether this new class will stay or not; it might just be
a temporary step, or it might end up taking over much of the current
viewer functionality.  It would be a bad idea to code against it right
now.
2002-03-06 16:03:33 +00:00
david
bdbd69effd If the (temporary) property /cockpit is true, set the near clipping
plane to 0.2; otherwise, use the old defaults.

This is a temporary step that will allow me to work on a 3D cockpit
without breaking current behaviour; the final approach will be to put
the 3D model in its own scene graph, with different clipping plane.
2002-03-06 16:01:19 +00:00
david
51b2aeb872 Temporarily rolled out last change, pending a restructuring of the
view infrastructure: vertical mouse panning wasn't working.
2002-03-06 15:54:25 +00:00
david
9ae5ad236e Patch from Andy Ross to allow virtual panel to tilt with mouse view:
OK, attached is a replacement for mouse.cxx that works the view using
the view-offset/tilt interface, rather than the (kinda odd) GuiQuat
stuff.  It's kind of a hack job, as I left the hooks to GuiQuat in in
other places for fear of breaking something.  Still, it removed more
code from mouse.cxx than it added, which has to count for some
elegance points.
2002-03-06 13:53:18 +00:00
david
0bdc1b1699 Patch from Andy Ross to hide virtual panel when required:
Oh yeah, I forgot to send that one along.  This one is my bug, I
goofed the precedence in the fgPanelVisible() function in panel.cxx
such that the panel was *always* visible if virtual cockpit was
enabled.  Here's a replacement.  I've modified the style from a single
boolean expression to an if-list, since that's more readable to my
eyes for expressions this big:
2002-03-06 13:51:05 +00:00
david
07ba9777ed Temporarily reverted change to near/far clip plane. 2002-03-05 22:25:11 +00:00
david
bd3900a3ff Start of an internal 3-D view. If the property "/cockpit" (temporary
and soon to be renamed) is true, FlightGear will draw the 3-D model
even in internal view.  This makes sense right now only with the C310
model, since the others don't have any kind of interiors modeled and
all surfaces in all models are one-sided.

This isn't quite working yet -- the view code is very hard to
disentangle, and currently, if the view is not forward, roll and pitch
are applied incorrectly.  It looks interesting (modulo a messy model)
on the ground, in level flight, or looking straight ahead under any
other flight conditions.
2002-03-05 13:39:45 +00:00
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
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
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
curt
3ca8643632 Removed orphaned 10520d engine modeling code. Thanks goes to Phil
Schubert for getting the ball rolling with engine modeling in
flightgear.  The existing engine modeling code is derived from
his initial efforts.
2002-02-24 21:41:02 +00:00
david
c923f27f16 Fixed crash when using 3D model other than the C172. 2002-02-24 21:14:38 +00:00
curt
f06a3e8289 Moved to tests subdirectory. 2002-02-24 21:01:11 +00:00
curt
1b6cde22dc Moved to JSBSim subdirectory. 2002-02-24 20:54:23 +00:00
curt
4cbfe4b724 Moved JSBSim.cxx and JSBSim.hxx into src/FDM/JSBSim subdirectory
(similar to how YASim is setup.)
2002-02-24 20:53:46 +00:00
david
d61ce30c12 Separated 3D model-handling code from main.cxx out into its own
subsystem, FGAircraftModel.
2002-02-23 21:20:00 +00:00
david
a9a30bfd80 Added an #ifdef for compiling without --with-new-environment. Thanks
to Tony Peden for the catch.
2002-02-23 04:50:47 +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
david
eaf9fa7621 Added FGEnvironmentMgr to provide information on the environment in
different locations, and hitched it into FGGlobals.  FGEnvironmentMgr
has taken over as the subsystem, while FGEnvironment is simple the
information that it returns.  I've removed current_environment
completely -- everything now uses properties or goes through
FGGlobals.  FGGlobals itself has a couple of useful methods:

  const FGEnvironment * get_environment ();
  const FGEnvironment * get_environment (double lat, double lon, double alt);

The first one returns the environment data for the plane's current
position, while the second returns the environment data for any
arbitrary location.  Currently, they both return the same information,
but that will change soon.
2002-02-22 22:51:34 +00:00
curt
0a61c0da99 Fix a big where the initial ground elevation reported could be bogus
(initialization order problem.)
2002-02-22 20:20:23 +00:00
tony
6c90295655 Adds flap cmd and pos to output 2002-02-22 13:27:19 +00:00
tony
ee9a81fd56 Added parameter for abs value of elevator, rudder, and aileron positions 2002-02-22 13:26:31 +00:00
david
5607753935 Corrected typo that was hiding winds from FDM's unless configured with
--with-new-environment.
2002-02-20 22:58:42 +00:00
curt
1ea557f249 Added Tony's function to set position on a glide slope. 2002-02-20 16:56:44 +00:00
andy
2f00a7970c Minor mixup. Engines that are off have a manifold pressure equal to
ambient, not to _rho0, which is the air density of the "calibration
environment" (typically sea level).
2002-02-20 07:15:12 +00:00
andy
764eb2a2e7 Automatically generate "contact" points for collision detection. Implemented
as extra (and invisible) gear objects.
2002-02-20 07:12:27 +00:00
andy
6b10d8b128 Scaling "idle" MP to 6 inches or so is all well and good, but not if
the engine continues to develop 20% power.  Rescale the output power
accordingly, so idling aircraft stay put.
2002-02-20 07:10:58 +00:00
andy
3f35de9507 Forgot to include the wind when computing airspeed. Big oops. 2002-02-20 07:09:21 +00:00
andy
4edfa14137 Support a "skid" property for non-rolling gear objects like tail skids. 2002-02-20 07:08:33 +00:00
david
ad79ee4897 Added minimal support for magnetos, so that engines can be shut off.
The starter isn't working yet, so the engine just springs to life.
2002-02-20 04:27:22 +00:00
david
b4a9d76215 Fixed runway-altitude problem that prevented starts at airports higher
than sea-level.
2002-02-20 00:20:13 +00:00
david
a285ff5ea4 Added a new 'squared' subproperty for axis bindings. 2002-02-19 23:54:47 +00:00
david
608668bd5f Attempt to merge LED font patches back in (they were wiped out by
Jim's tiled-background patches).
2002-02-19 23:54:17 +00:00
david
d13b46b8f1 Tiled panel background support from Jim Wilson. 2002-02-19 21:57:09 +00:00
david
254de7695d Further tweaks for the new environment subsystem. 2002-02-19 16:25:38 +00:00
david
ee3500a0a4 Remove obsolete FGWeather subsystem. 2002-02-19 15:19:21 +00:00
david
71f120e3be Initial take of new environment subsystem. Configure with
--use-new-environment to active it.
2002-02-19 15:16:08 +00:00
david
ac20cb7768 Initial take of new environment subsystem. Configure with
--use-new-environment to active it.
2002-02-19 14:21:19 +00:00
curt
aa65d0c3db Minor, miscellaneous stuff ... 2002-02-19 04:34:18 +00:00
curt
b8fc42d824 Add support for multiple panel fonts (specifically an LED font.) 2002-02-19 03:42:16 +00:00
david
3b870192f4 First steps in a weather reorganization. Note especially that
properties have been renamed from wind-(north|east|down)-fps to
wind-from-(north|east|down)-fps, and the FDMs modified appropriately.
No other changes should be visible unless FG_OLD_WEATHER is defined.
2002-02-19 01:26:44 +00:00
david
e90cbeacc3 Corrected wind, so that properties give the FROM direction for all
FDMs, and the --wind option takes the direction *from* which the wind
is blowing.
2002-02-18 19:33:18 +00:00
david
6c978b02f8 Patches from Tony Peden:
Attached are patches for adding the command line options to set initial
glideslope and climb rate. This was really easy to do as all the pieces
were in place.  It works well with JSBSim because the trimming routine
finds the right throttle and elevator settings. It should work with
LaRCsim as well, but it has no trimming routine so there will be some
dynamics at startup.  I don't know what YASim will do.
2002-02-18 19:18:51 +00:00
david
93c69c4bc3 Changes from Tony Peden to fix reinit crashes (and eliminate the force
altitude function).
2002-02-17 21:05:27 +00:00
david
d1208f15b8 Latest JSBSim changes. 2002-02-17 21:04:44 +00:00
curt
dc85f0c634 Be more robust when FlightGear changes it's mind about the local ground
elevation.
2002-02-16 17:38:29 +00:00
curt
4f67824f09 - Removed redundant FG*:: qualifications from class members
- Fixed comparisons between signed and unsigned ints
2002-02-15 22:00:49 +00:00
curt
4e334bcc5c Fixed description of the --time-offset option. 2002-02-14 03:57:22 +00:00
david
7a3e749284 JSBSim fix for FreeBSD. 2002-02-13 23:57:49 +00:00
david
ecccc91064 Corrected typo ("Celsius" rather than "Celcius") and added to cast to
avoid a compiler warning.
2002-02-13 23:57:31 +00:00
david
a0ec3ccc43 Ensure that initial engine settings are copied over. 2002-02-13 20:51:57 +00:00
curt
55387fd7ea This is a three line fix for some inconsistancies between the gui dialogs and
the panel controls for the autopilot.  The heading dialog would only show the
last setting you did through it, even if it was later tweaked with the bug on
the hsi.  The altitude dialog did a similar thing.  Now the values default to
the same that show on the panel displays.
2002-02-13 20:12:31 +00:00
curt
6191fae106 Reset "/sim/startup/time-offset-type" when specifying "--time-offset" in
case some other conflicting option has set this to something else.
2002-02-13 19:41:05 +00:00
curt
56db201e52 Cleaned up a few stray cout's 2002-02-13 18:17:04 +00:00
curt
9e6ee4b703 Fixed an if statement typo. 2002-02-13 17:43:01 +00:00
david
304ff21697 Latest JSBSim fixes, including Dave Luff's mixture improvements for
the JSBSim piston-engine model.
2002-02-13 14:35:10 +00:00
curt
465678ad07 Oops fixed one small mistake from the last fix. 2002-02-13 02:46:01 +00:00
curt
4cd24b3a67 Added a clock freeze option (/sim/freeze/clock). This can be specified
via the command line (--enable-clock-freeze / --disable-clock-freeze)
and can be toggled during a run.  However this property is not currently
bound to any menu or keystroke so you have to do it via the gui property
interface or externally via the web property browser or a script.
2002-02-13 02:37:44 +00:00
curt
ca3d6fac8f Added .hpp files to Makefile.am so they will be automatically included
in the tarball distributions.
2002-02-12 23:44:15 +00:00
curt
7237072f3a Make code a bit more explicit. 2002-02-12 22:27:57 +00:00
curt
9c370c2a9a Converted a cout to SG_LOG() 2002-02-12 16:36:25 +00:00
curt
82346dec63 Enable audio support for MSVC builds. 2002-02-12 16:12:52 +00:00
curt
dd8852dabe Better support for an alternate calendar time (i.e. if time/position/etc.
are being driven from an external data source.)

Akso found and fixed a bug in the simgear that caused the time to go goofy
temporarily while scenery was being loaded.
2002-02-11 23:33:20 +00:00
curt
527ada0e1d Add support for cygwin 2002-02-11 15:25:19 +00:00
curt
3a5ed2b997 Fixed a typo. 2002-02-11 15:24:08 +00:00
curt
2c862a330e Set default value for cur time override to 0 (no override) 2002-02-10 04:27:56 +00:00
curt
aad1de2ee5 Changes to match simgear changes which allow overriding the current
clock time.
2002-02-10 04:18:10 +00:00
curt
61d31ab822 Tweaks to 'native fdm' output. Time offset should now be properly supported
as well as visibility.
This means that if you are using this protocal to exchange data with a
visual channel, you should be able to change time and visibility on the master
and all the slaved visual channels will match it.
2002-02-08 23:03:54 +00:00
curt
de2b5f50e9 Fixes for the bug where LaRCsim gets no fuel and won't start,
and also a bug with the EGT being displayed at running values
when cranking without starting.
2002-02-08 17:27:38 +00:00
curt
fe5d1643cf Fix several off by one errors in hud_card.cxx 2002-02-08 17:19:21 +00:00
curt
c06aad31b3 Fix a potential mouse freeze. 2002-02-08 17:18:50 +00:00
david
827e11ff81 JSBSim change from Dave Luff:
Attached is a fix to add a short period of cranking time required
before the engine fires.  I've also added a little hack to limit the
torque applied by the starter motor when the rpm is less than 10 in
order to avoid the rpm overshooting idle in the first time step when
the prop is producing very little resistance due to the low rpm.
2002-02-08 13:36:46 +00:00
david
e1843e15d4 Patch from Melchior Franz:
- add indices to ambiguous property names
2002-02-08 13:31:22 +00:00
david
057885ed62 Modified to use a relative path for aircraft_dir rather than an
absolute one.  The path should be relative to $FG_ROOT.
2002-02-08 13:21:28 +00:00
curt
856534f0ca Fixed a typo ... 2002-02-08 01:08:24 +00:00
curt
ef82114c32 MSVC++ fixes 2002-02-08 00:07:53 +00:00
curt
3238528b35 FreeBSD fix. 2002-02-07 15:38:32 +00:00
curt
644668a932 Removed an unneeded #include 2002-02-06 23:56:17 +00:00
curt
7cd113fa2f Some follow up patches from Norman Vine. 2002-02-06 23:31:33 +00:00
david
fb5d5960a9 Patch from Melchior Franz:
- don't show redundant indices
2002-02-06 16:53:01 +00:00
david
7b01a143a1 Latest JSBSim changes from Tony Peden (should help slip/skid ball). 2002-02-06 16:52:34 +00:00
curt
d01cb2769a Cygwin fix. 2002-02-06 16:09:44 +00:00
david
628e4cc029 Patches from Melchior Franz:
- remove buffer with class scope
  - remove variable 'length' (isn't used anywhere)
  - make process_command private (it isn't used anywhere outside, and it
    shouldn't be)
2002-02-06 14:22:23 +00:00
david
c1c6a00856 Patches from Melchior Franz:
- define buffers where they are needed (two places)
  - comment out stale debug message (it doesn't buy anything, because the
    contents are output two lines below, anyway)
  - let every error message begin with "ERR ". This makes error messages
    less beautiful, but easier to recognize for scripts. Every internet
    protocol that outputs text, has such a tag for distinguishing regular
    output from error messages. (pop3 uses "-ERR ", smtp uses error codes,
    etc.)
2002-02-06 14:22:04 +00:00
david
670873198d Patches from Melchior Franz:
- fix html bug (<form> was closed by another <form>, instead of </form>)
  - remove useless <br>
  - fix a bug, that would have truncated an argument containing a '&'
  - extend the comment for urlEncode: cite the concerned RFC
2002-02-06 14:21:24 +00:00
curt
a29013fcda WIN32 fix. 2002-02-06 04:31:12 +00:00
david
c5d537394d Latest JSBSim changes, including a kludge from Tony to keep the
slip/skid ball still when the plane is stationary.
2002-02-06 04:07:12 +00:00
curt
7666c88e23 Latest version submitted by John W. 2002-02-06 01:03:54 +00:00