1
0
Fork 0
Commit graph

54 commits

Author SHA1 Message Date
curt
4214cd6c10 Migrate FlightGear code to use "#include SG_GL*" defined in
"#include <simgear/compiler.h>".
2004-11-18 19:53:00 +00:00
ehofman
8b53b86aa0 A first stab at an ACMS (Aircraft Condition Monitoring System) Special Purpose support FDM. Move the ADA FDM into the Special Purpose directory and make the SP FDM's a configure option. 2004-10-19 11:10:20 +00:00
curt
0fa47dbbdc Change the fps toggle property name a bit and add a toggle switch in the
gui/dialog/rendering box.
2004-06-14 16:38:44 +00:00
curt
1fa0f4157c Make the onscreen fps display toggleable via a boolean property. 2004-06-14 16:25:32 +00:00
andy
941f99308d Oops. A change to an upstream header seems to have remove glu.h, which
these files require.  Dunno why my build didn't pick up the transitive
dependency.
2004-04-06 03:51:11 +00:00
ehofman
8c129e8470 Make it possible to show the DME in the HUD 2004-01-26 20:24:29 +00:00
curt
0179cab894 Norman Vine:
Attached patch gets rid of all mention of GLUT from the cockpit directory.
2003-08-12 15:57:17 +00:00
curt
bcb10efa50 Remove several unneeded glut dependencies. Note, this doesn't signal an
immediate end to glut, only that I'm going through and cleaning up (and
taking inventory of the actual glut dependencies in case I want to investigate
SDL.)
2003-08-11 21:50:22 +00:00
curt
2119db35c3 This is step "1" of probably "many" in the process of separating out the
scene management code and organizing it within simgear.  My strategy is
to identify the code I want to move, and break it's direct flightgear
dependencies.  Then it will be free to move over into the simgear package.

- Moved some property specific code into simgear/props/
- Split out the condition code from fgfs/src/Main/fg_props and put it
  in it's own source file in simgear/props/
- Created a scene subdirectory for scenery, model, and material property
  related code.
- Moved location.[ch]xx into simgear/scene/model/
- The location and condition code had dependencies on flightgear's global
  state (all the globals-> stuff, the flightgear property tree, etc.)  SimGear
  code can't depend on it so that data has to be passed as parameters to the
  functions/methods/constructors.
- This need to pass data as function parameters had a dramatic cascading
  effect throughout the FlightGear code.
2003-05-06 23:46:24 +00:00
ehofman
4c55a5aeb4 Andy wrote:
This is just a port of an old 3D HUD patch to the new view code.
This pans the HUD with the view, by pasting it onto a quad fixed in front of the viewer.  It also fixes the awful, arbitrary scaling problems the HUD code has.  The old HUD only looks right when viewed at 1024x768 and 55 degree FOV.  This works the scale out magically so that it looks right in all views.  It also redefines the "<compression-factor>" tag in the ladder to (1) mean compression instead of expansion and (2) have non-psychopathic units (now "1" means 1 degree per degree).  Fix this in your existing HUD ladder files before reporting bugs.  It's definitely a cosmetic win -- the velocity vector points at the right thing and the horizon lines up properly.

Norman wrote:

I have created a modified version of Andy's patch that implements the 3D HUD as the 'normal' and the 2D HUD as the 'minimal' HUD.   < i > and < shift I > keys
2003-03-21 15:02:23 +00:00
curt
43e48070fe - Some refactoring of the configure.ac script.
- Better Mac OS X support (they put glut.h in GLUT/glut.h) :-(
2002-12-10 20:50:48 +00:00
curt
47825dcbae Moved "scenery" from being declaried in scenery.cxx to being declared
in globals.hxx.
2002-05-14 05:22:52 +00:00
curt
0a035c7f36 Oops, in the latest property manager rewrite, a typo crept in on
somewhat of a global scale.  This commit should fix all these up.
2002-03-26 02:38:11 +00:00
david
d0d3b2bd7a Use !strcmp for all property string-value comparisons. 2002-03-20 22:15:22 +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
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
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
curt
2b056c8452 This set of changes touches a *lot* of files. The main goal here is to
fix startup sequence problems where we initialize the FDM before we know
the desired starting altitude.

These changes delay fdm initialization until the local tile has been loaded
and we can do a real intersection and find the true ground elevation.

In order to do this, I depend more on the property manager as glue, rather
than the FGInterface.

There are some glitches still when switching to a new airport or reseting
the sim.  I will work on addressing these, but I need to commit the changes
so far to keep in sync with other developers.
2001-10-28 16:16:30 +00:00
curt
2154915465 a) HUD - Here is the updated hud code with moving pointers, dials, turn/slip gauge, choice of circular ticks, two sizes for fonts, box for text labels etc. based partly on MIL-STD-1787b and our pilots requirements. Our pilots are not very enthusiastic about all symbols discussed in MIL-STD-1787b (I suppose it is very subjective) and so I did not have motivation to try all of them. Even now I plan to do simple symbols as seen on Russian aircraft since our Air Force pilots are familiar with them. That should be part of my next update. I have included a html document which is basically the old text file plus some snapshots with all possible hud symbols linked to corresponding xml templates. You have to just cut & paste the template, change names and positions to create additional symbols (if you have the real estate on the hud). 2001-09-19 22:23:25 +00:00
curt
96b88e539f Move FGControls declaration to globals.hxx 2001-07-22 19:51:16 +00:00
curt
9fc9c8d55a Fix what looks like it could potentially cause a problem with accessing
previously free'd memory.
2001-06-30 00:27:13 +00:00
curt
d0126ec533 Fixed some warnings, updated whitespace. 2001-06-12 23:37:29 +00:00
curt
083ba99657 Optimized key property node accesses. 2001-06-06 17:21:34 +00:00
curt
a0d50000ba Modifications to coordinate with recent changes in simgear. 2001-05-15 22:30:39 +00:00
curt
182fd42b40 SG-ified logstream. 2001-03-24 06:03:11 +00:00
curt
5ea9c04c64 SG_ namespace. 2001-03-24 04:56:46 +00:00
curt
17c96ae69e SG_ namespace 2001-03-24 04:48:44 +00:00
curt
17f3d48e03 FG_ to SG_ namespace changes. 2001-03-24 02:36:45 +00:00
curt
1bf3001749 FG_ to SG_ namespace changes. 2001-03-24 00:18:01 +00:00
curt
576432ec75 David Megginson writes:
FGOptions is history, and the modules are (starting) to use the property
manager directly.  Let me know if I left any files out.

Inevitably, there will be some problems with broken options, etc.,
that I haven't found in my tests, but I'll try to fix them quickly.
We also need to stress that the property names currently in use are
not stable -- we need to reorganize them a bit for clarity.
2001-01-13 22:06:39 +00:00
curt
469703dd0c Internal interface changes by David Megginson. 2001-01-11 22:44:18 +00:00
curt
af80c2080b Neetha Girish <neethagirish@usa.net>
====================================

Cockpit.cxx
-----------
Commented #ifdef FIGHTER_HUD.

Hud.cxx
-------
Included code to read the xml file and draw the corresponding instrument.

Hud.hxx, Hud_ladr.cxx, Hud_card.cxx and Hud_labl.cxx
---------------------------------------------------
Integrated code to draw any kind of hud.

Preference.xml
---------------
Included XML file path in the sim/hud property.

ReadMe.xmlhud
-------------
The Readme.xmlhud describes the reconfigurable HUD implemented thru XML
files.
2001-01-05 16:44:48 +00:00
curt
2f9850024a Renamed fg_random -> sg_random. 2000-12-04 05:28:01 +00:00
curt
08fd9cc36d Moved fov and win_ration from FGOptions to FGViewer so we can control these
on a per view basis.
Fixed some compile warnings in Main/*.cxx
2000-11-01 23:27:32 +00:00
curt
152a5902c8 Moved winWidth and winHeight out of FGViewer since these are set on a
per-application level.  We can have multiple viewers ...
Cleaned up fov mistake on startup with panel activated.
2000-10-19 23:09:33 +00:00
curt
01c44cbb99 Code clean ups relating to FGOptions ... and moved it into globals-> space. 2000-10-19 21:24:43 +00:00
curt
ce574d59f5 The following changes were made to flightgear-0.7.5 code to implement the follow
ing features:

a) ADA Flight model - ADA.cxx, ADA.hxx, flight.hxx
b) Fighter a/c HUD       - flight.hxx, hud.hxx, hud.cxx, cockpit.cxx, hud_ladr.c
xx, hud_card.cxx
c) 3-window display      - options.hxx, options.cxx, viewer.cxx
d) Moving objects (ship) - main.cxx
e) Patches               - main.cxx

ADA.cxx, ADA.hxx
--------------------------
Interface to the external ADA flight dynamics package.

flight.hxx
----------
Included prototypes for accepting additional data fron the External flight
model for fighter aircraft HUD

Hud.hxx
-------
Included prototypes for accepting additional data for fighter HUD from Exernal F
light model.
Defined FIGHTER_HUD pre-processor directive to enable compilation of fighter hud
 code.

hud.cxx, cockpit.cxx, hud_ladr.cxx, hud_card.cxx
---------------------------------------
Included code to initialise additional reticles/text for fighter HUD which is co
nditionally
compiled if FIGHTER_HUD is defined.

options.hxx
-----------
Added window_offset, and function to retrieve its value for 3 windows

options.cxx
-----------
Changed few options to suit ADA/CEF projection system/screens and checks for win
dow offset.

views.cxx
---------
Added code to retrieve view offset for window.

Main.cxx
--------
Added code to load and move an aircraft carrier.
Patch to enable clouds from command line until Curtis fixes it. By default cloud
s are disabled.
2000-10-19 19:46:13 +00:00
curt
8d1295119f Updates from David Megginson relating to the property manager. 2000-09-30 03:35:38 +00:00
curt
342842537d Fixes to jsbsim. 2000-08-04 16:08:55 +00:00
curt
436db30053 More SGTime tidying. 2000-07-07 20:28:51 +00:00
curt
0ffa19cd32 Updates to JSBsim from Jon's CVS.
Massaging some names inside of SimGear.
2000-07-06 22:13:24 +00:00
curt
d1e4a4bc6f A lot of code reorganization relating to moving some core code from
FlightGear into SimGear so it can be used by other projects.
2000-07-05 02:39:30 +00:00
curt
016cd935ef Updates from David Megginson:
I've done some substantial reengineering of the 2D panel: except for the
radios, the whole panel is built from a large table now.  I'd be
grateful if you could add these changes to the main distribution.

Since I always like to provide some eye-candy with my updates, I've
fixed the ADF gauge to be more usable by slimming the needle and adding
markings every 45 deg (you'll need to use the attached textures).
2000-06-14 20:59:51 +00:00
curt
9dc5c9ca22 Instrument panel updates from David Megginson.
- the panel uses much, much less texture memory, and draws much
  faster, at least on my hardware

- there is a wet (magnetic) compass at the top of the panel

- the gyro compass shows true heading again, but don't get used to it:
  we're going to set it up to drift soon

- there are TO/FROM flags on NAV1 and NAV2 (but no GS flag yet)

- the ADF looks a little more realistic (if you can forgive the ugly
  needle)

- when the HUD is not open, the framerate is moved to the right side
  of the screen so that it won't be obscured by the mag compass
2000-05-15 16:33:42 +00:00
curt
365b26d093 HUD updates/cleanups from Norman Vine. 2000-05-13 00:02:43 +00:00
curt
a975fd77c5 User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
  the heading (to the bug on the gyro), can lock to NAV1, and can lock
  the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
  and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
  NAV1

Code

- I've created a new module, sp_panel.[ch]xx, that constructs the
  default single-prop panel; this works entirely outside of FGPanel,
  so it is possible to construct similar modules for other sorts of
  panels; all code specific to the default panel has been removed from
  panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
  selected radial (they will differ with ILS); the NAV gauges should
  not spin around automatically to show the actual radial (we need to
  do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
  memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
curt
418279fdd4 Panel updates from David Megginson. Radials can now be adjusted on the fly
by clicking on the knob on the instrument panel.
2000-04-27 22:45:48 +00:00
curt
cc26bb7fe7 Removed all dependencies on <simgear/math/mat3.h> and friends. These are
old routines from SRGP.  Steve's plib/sg.h does a nice job of completely
replacing this (and since plib is already around) and is a nice clean design
so it just makes sense.
2000-02-19 14:29:27 +00:00
curt
1294aed465 One more pass at a reorg. 2000-02-16 23:01:03 +00:00
curt
485230b443 Code reorganization. 2000-02-15 03:30:01 +00:00