1
0
Fork 0
Commit graph

187 commits

Author SHA1 Message Date
curt
bc99033c96 Integrated FGOptions with the property manager (by David Megginson) 2001-01-12 15:37:40 +00:00
curt
469703dd0c Internal interface changes by David Megginson. 2001-01-11 22:44:18 +00:00
curt
66650e4148 1. Added src/Main/fgfs.hxx as a standard, top-level include file for
FlightGear subsystems -- it isolates some of the config and #ifdef
stuff in a single place.

2. Added a new FGSubsystem interface, defined in fgfs.hxx; so far,
only FGControls implements it, but if that works, we can start letting
it propagate through the system and simplify the code in main.cxx and
fg_init.cxx (which is terrifyingly complex for anyone new to the
project).

3. Added new src/Main/fgfs_props.[hc]xx files with convenience
functions for tying properties under FlightGear.

4. Experimentally modified src/Controls/controls.cxx to tie properties
directly (rather than tying to BFI functions).  I'd appreciate it if
you could get this into CVS as soon as possible, so we can see if the
template stuff causes trouble for any other platforms before I add
properties to the other subsystems.

5. Miscellaneous superficial modifications to other files.


In addition, I've made a couple of further changes:


6. Modified BFI to add support for setting the view axes (i.e. with a
joystick hat).

7. Cleaned up bfi.cxx and removed all cout statements.
2001-01-05 17:38:58 +00:00
curt
3b88c71122 Applied changes relative to David Megginson's property manager rewrite. 2000-12-19 23:29:16 +00:00
curt
31b9c763df Added a --visibility= option. 2000-12-06 04:13:16 +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
11a68e55d4 Updates by Tony working on the FDM interface bus. 2000-10-28 16:30:30 +00:00
curt
b83ad15313 Added CHT (cylinder head temp) to BFI and property manager. 2000-10-27 22:00:43 +00:00
curt
cf6022e439 Added a viewmgr system and made corresponding changes to support it. 2000-10-26 21:51:09 +00:00
curt
0175b4cd25 Continued FGViewer cleanups. FGViewer is now a base class so that we can
derive specific viewer classes from it.  Here's what I currently have in mind:

FGViewer
  |
  |-> FGViewerPRH     (current system with orientation specified in
  |                    LaRCsim Euler angle convention)
  |
  |-> FGViewerLookAt  Feed in a position, view direction, and up vector
  |
  |-> FGViewerHPR     (similar to PRH, but using ssg hpr euler angle
  |                    convention)
  |-> others?
2000-10-25 22:59:02 +00:00
curt
470ee55fb7 Continuing work on cleanups.
Removed some commented out chunks of code that no longer make sense to keep
around.
Working on replacing instances of Point3D with sg{d,}Vec3.
2000-10-25 19:27:13 +00:00
curt
6515f9072c Checkpoint commit for cleaning up the FGViewer class. External views are
not working right, but this will hopefully be fixed soon.
2000-10-25 15:27:55 +00:00
curt
7cc98ad15f I tested:
LaRCsim c172 on-ground and in-air starts, reset: all work
UIUC Cessna172 on-ground and in-air starts work as expected, reset
results in an aircraft that is upside down but does not crash FG.   I
don't know what it was like before, so it may well be no change.
JSBSim c172 and X15 in-air starts work fine, resets now work (and are
trimmed), on-ground starts do not -- the c172 ends up on its back.  I
suspect this is no worse than before.

I did not test:
Balloon (the weather code returns nan's for the atmosphere data --this
is in the weather module and apparently is a linux only bug)
ADA (don't know how)
MagicCarpet  (needs work yet)
External (don't know how)

known to be broken:
LaRCsim c172 on-ground starts with a negative terrain altitude (this
happens at KPAO when the scenery is not present).   The FDM inits to
about 50 feet AGL and the model falls to the ground.  It does stay
upright, however, and seems to be fine once it settles out, FWIW.

To do:
--implement set_Model on the bus
--bring Christian's weather data into JSBSim
-- add default method to bus for updating things like the sin and cos of
latitude (for Balloon, MagicCarpet)
-- lots of cleanup

The files:
src/FDM/flight.cxx
src/FDM/flight.hxx
-- all data members now declared protected instead of private.
-- eliminated all but a small set of 'setters', no change to getters.
-- that small set is declared virtual, the default implementation
provided preserves the old behavior
-- all of the vector data members are now initialized.
-- added busdump() method -- FG_LOG's  all the bus data when called,
useful for diagnostics.

src/FDM/ADA.cxx
-- bus data members now directly assigned to

src/FDM/Balloon.cxx
-- bus data members now directly assigned to
-- changed V_equiv_kts to V_calibrated_kts

src/FDM/JSBSim.cxx
src/FDM/JSBSim.hxx
-- bus data members now directly assigned to
-- implemented the FGInterface virtual setters with JSBSim specific
logic
-- changed the static FDMExec to a dynamic fdmex (needed so that the
JSBSim object can be deleted when a model change is called for)
-- implemented constructor and destructor, moved some of the logic
formerly in init() to constructor
-- added logic to bring up FGEngInterface objects and set the RPM and
throttle values.

src/FDM/LaRCsim.cxx
src/FDM/LaRCsim.hxx
-- bus data members now directly assigned to
-- implemented the FGInterface virtual setters with LaRCsim specific
logic, uses LaRCsimIC
-- implemented constructor and destructor, moved some of the logic
formerly in init() to constructor
-- moved default inertias to here from fg_init.cxx
-- eliminated the climb rate calculation.  The equivalent, climb_rate =
-1*vdown, is now in copy_from_LaRCsim().

src/FDM/LaRCsimIC.cxx
src/FDM/LaRCsimIC.hxx
-- similar to FGInitialCondition, this class has all the logic needed to
turn data like Vc and Mach into the more fundamental quantities LaRCsim
needs to initialize.
-- put it in src/FDM since it is a class

src/FDM/MagicCarpet.cxx
 -- bus data members now directly assigned to

src/FDM/Makefile.am
-- adds LaRCsimIC.hxx and cxx

src/FDM/JSBSim/FGAtmosphere.h
src/FDM/JSBSim/FGDefs.h
src/FDM/JSBSim/FGInitialCondition.cpp
src/FDM/JSBSim/FGInitialCondition.h
src/FDM/JSBSim/JSBSim.cpp
-- changes to accomodate the new bus

src/FDM/LaRCsim/atmos_62.h
src/FDM/LaRCsim/ls_geodesy.h
-- surrounded prototypes with #ifdef __cplusplus ... #endif , functions
here are needed in LaRCsimIC

src/FDM/LaRCsim/c172_main.c
src/FDM/LaRCsim/cherokee_aero.c
src/FDM/LaRCsim/ls_aux.c
src/FDM/LaRCsim/ls_constants.h
src/FDM/LaRCsim/ls_geodesy.c
src/FDM/LaRCsim/ls_geodesy.h
src/FDM/LaRCsim/ls_step.c
src/FDM/UIUCModel/uiuc_betaprobe.cpp
-- changed PI to LS_PI, eliminates preprocessor naming conflict with
weather module

src/FDM/LaRCsim/ls_interface.c
src/FDM/LaRCsim/ls_interface.h
-- added function ls_set_model_dt()

src/Main/bfi.cxx
-- eliminated calls that set the NED speeds to body components.  They
are no longer needed and confuse the new bus.

src/Main/fg_init.cxx
-- eliminated calls that just brought the bus data up-to-date (e.g.
set_sin_cos_latitude). or set default values.   The bus now handles the
defaults and updates itself when the setters are called (for LaRCsim and
JSBSim).  A default method for doing this needs to be added to the bus.
-- added fgVelocityInit() to set the speed the user asked for.  Both
JSBSim and LaRCsim can now be initialized using any of:
vc,mach, NED components, UVW components.

src/Main/main.cxx
--eliminated call to fgFDMSetGroundElevation, this data is now 'pulled'
onto the bus every update()

src/Main/options.cxx
src/Main/options.hxx
-- added enum to keep track of the speed requested by the user
-- eliminated calls to set NED velocity properties to body speeds, they
are no longer needed.
-- added options for the NED components.

src/Network/garmin.cxx
src/Network/nmea.cxx
--eliminated calls that just brought the bus data up-to-date (e.g.
set_sin_cos_latitude).  The bus now updates itself when the setters are
called (for LaRCsim and JSBSim).  A default method for doing this needs
to be added to the bus.
-- changed set_V_equiv_kts to set_V_calibrated_kts.  set_V_equiv_kts no
longer exists ( get_V_equiv_kts still does, though)

src/WeatherCM/FGLocalWeatherDatabase.cpp
-- commented out the code to put the weather data on the bus, a
different scheme for this is needed.
2000-10-24 00:34:50 +00:00
curt
c67e0467b4 Tweaks. 2000-10-23 20:27:41 +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
2eda8480e9 Some changes contributed by David Megginson to allow for more interesting
external views.
2000-10-18 21:19:30 +00:00
curt
e178af50f0 Check result of cur_fdm_state->init() and die if it fails. 2000-10-16 14:55:34 +00:00
curt
df0228e019 Tweaks and massaging relative to the new waypoint route management system.
You can now specify waypoint on the command line with --wp=ID[,alt]
2000-10-12 01:08:09 +00:00
curt
981d4dbd7d Properties:
- /engines/engine0/rpm changed to read-only
- /engines/engine0/egt added (read-only)
- /controls/mixture added
- /controls/propellor-pitch added (not used for C172)

BFI:

- getEGT() added
- getMixture() and setMixture() added
- getPropAdvance() and setPropAdvance() added (= pitch)
- cleaned up reinit function a bit
- force reinit only when values are actually changed; for example,
  setting the flight model to the current flight model will not cause
  a reinit

LaRCSim:

- hook up mixture and pitch to FGControls (they were hard-coded
  before)
2000-10-04 22:52:34 +00:00
curt
32528d0cd6 A bit of fg->sg namespace changing. 2000-09-27 20:16:22 +00:00
curt
a9ab25ddd1 Changes from David Megginson in support of an xml based configuration file. 2000-09-25 21:41:50 +00:00
curt
e7df2d5dc8 Sep. 22, 2000 panel updates from David Megginson to make the new config file
panel be the default (sp_panel.* RIP).
2000-09-22 17:20:56 +00:00
curt
655ce0e20d MACOS -> macintosh 2000-09-10 00:04:50 +00:00
curt
1ad9f1b59e Fixed a small bug in runway closeness logic. 2000-08-17 14:58:13 +00:00
curt
535ed92264 Added code to put aircraft at the end of the runway closest to the desired
heading.  Only changed for initial position right now.
2000-08-16 00:09:03 +00:00
curt
6a98486375 JSBSim updates.
Updates to put more internal JSBSim values on the "bus".
2000-07-25 21:41:59 +00:00
curt
273efc8729 Renamed JSBsim to JSBSim ... 2000-07-24 17:27:12 +00:00
curt
941f27c9a0 Updates to move scenery initialization earlier in the initialization
sequence so that the FDM can know the current ground altitude when it is
initialized.
2000-07-23 21:32:59 +00:00
curt
81b266aa4a Try to set initial position in a bit more intelligent way (and earlier in
the process so time initialization can have a chance to work.)
2000-07-21 22:54:14 +00:00
curt
71747eb892 Added support for $FG_SCENERY and --fg-scenery=path 2000-07-14 16:57:55 +00:00
curt
342554fadb Fix up simulator freeze functionality. 2000-07-08 06:29:19 +00:00
curt
f9b28c103d Updates to go along with SGTime tweaks in SimGear. 2000-07-07 17:27:37 +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
efe5654b8b Moved sky code over to simgear.
Added David Megginsons property manager.
2000-07-03 20:09:56 +00:00
curt
db6da3a896 Various odds and ends tweaks. 2000-06-30 21:46:41 +00:00
curt
39ae3864de Cleaned up all the old fragment and material_mgr stuff which originated
from the pre-ssg / render everything ourselves days.  Replaced with a
material library manager that is much better suited for working in the
context of ssg.  This simplified and cleaned up a ton of old junk.
2000-06-23 00:30:04 +00:00
curt
a586378692 Stubbed in some radio settings for Alex. 2000-06-15 22:30:48 +00:00
curt
d4d10fad6b Replaced gdbm with metakit. Involves a new simgear version and a new database
format for the airports in the base package.
2000-05-27 05:54:02 +00:00
curt
9835072241 From Tony Peden:
This set of changes cleans up my previous ones quite a bit:
[tony@valkyrie FlightGear]$ tar -ztf tp_changes.tgz
src/Controls/controls.cxx
src/Controls/controls.hxx
src/FDM/JSBsim.cxx
src/Main/fg_init.cxx
src/Main/options.cxx
src/Main/options.hxx
src/Joystick/joystick.cxx

controls.[ch]xx:  removed the trimmed_throttle stuff.  This undoes the
                  changes I submitted last time.

JSBsim.cxx:       updates for the removal of the trimmed_throttle stuff

fg_init.cxx:      removed the autothrottle logic.  The autothrottle is now
off
                  by default.

options.[ch]xx:   Sets trim_mode to false by default.  It is enabled only
                  when --notrim is not used and JSBsim is the FDM.

joystick.cxx:     Added logic for syncing the throttle lever.  This is
                  only enabled when trim_mode is enabled.   The way I
                  did it is, I hope, a good way of going about it.

I tested:
fgfs --fdm=larcsim
fgfs --fdm=jsb --aircraft=c172 --vc=100 --altitude=500
fgfs --notrim --fdm=jsb --aircraft=c172 --vc=100 --altitude=500

All work as intended, at least for me.

Make sure your joystick is calibrated and give:
fgfs --fdm=jsb --aircraft=c172 --vc=100 --altitude=500
a try, I think you just might be impressed.

I am. ;-)
2000-05-19 16:29:23 +00:00
curt
466c7ec5dc Fix so that we don't attempt a phantom trim on the larcsim flight model at
startup.
2000-05-17 03:53:36 +00:00
curt
c4a1cc047e Updates from the Jon and Tony show.
Tony submitted:

JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow

c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now

FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine.  Note that the X-15 will not trim.
  This is not a model or trimming routine deficiency, just the
  nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default.  --notrim will turn it off.
Added --vc, --mach, and --notrim switches
      (vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
curt
2fac753991 minor tweaks. 2000-05-04 05:21:50 +00:00
curt
6bc7ed9ba2 Overhaul of the navaid system to increase efficiency, reduce redundancy, and
also properly model the DME.
2000-05-04 01:18:45 +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
921beb96d7 First stab at NAV1 and GS hold modes for the autopilot. 2000-04-30 22:21:47 +00:00
curt
3ecf1b8dce Autopilot "class-ification".
Separated out gui parts of autopilot control from the actual autopilot code.
2000-04-30 06:51:49 +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
ff8e6b9e28 Tweaks to navaid database loading. 2000-04-25 17:33:13 +00:00
curt
b5420977d7 Updates to nav radio stack model ... starting to get to first usable pass. 2000-04-25 04:58:25 +00:00
curt
b23f930aa6 Beginning work on integrating radiostack model into fgfs. 2000-04-25 03:09:26 +00:00
curt
8f21c91edf Moved main.o to beginning of link line.
Initialize navaid databases.
2000-04-24 23:51:26 +00:00
curt
3b34980556 Updates to simple.[ch]xx to use gdbm to look up airport values. 2000-03-29 20:21:31 +00:00
curt
314a1dd9dd Moved src/Astro to src/Ephemeris 2000-03-16 23:19:39 +00:00
curt
84c64c8cc3 Removed dependencies on Astro/solarsystem.*
Pass star and planet data to Sky module.
2000-03-16 23:01:57 +00:00
curt
dc01e3f8d2 tweaks. 2000-03-16 04:23:24 +00:00
curt
7ada12ed09 Updates for ssg solarsystem/sky model. Includes changes to Time, Light, and
initialization sequences.
2000-03-16 04:15:22 +00:00
curt
f874d4a94f Working on separating out ephemeris code from the actual rendering code
which I am trying to ssg-ify at the same time.
2000-03-02 13:51:31 +00:00
curt
e6d5923ad0 Separating out the Sky rendering as a separate unit and ssg-ifying it. 2000-03-02 03:03:16 +00:00
curt
138863b3e2 Working on skydome ... some actual progress has been made. :-) Still
something goofy with sunrise, sunset effects.
2000-03-01 00:31:35 +00:00
curt
cb071f4e56 Continuing work on ssg-ifying the sky dome. 2000-02-29 17:13:02 +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
curt
1fd9270267 Revamping I/O system. 1999-11-19 02:10:24 +00:00
curt
846ac621a2 Tweaks to my ssg LOS routines and their usage. 1999-11-04 00:41:23 +00:00
curt
37220833ed Added Durk's first stab at clouds.
Added Simulator/Clouds/
Durk fixed a problem in gui.cxx with cursor type.
Durk updated his time zone / time-offset command line parameters
Curt added a cheezy fade in/out as we transition through the cloud layer.
  We really need to fog the sky dome, sun, moon, stars as well.
Curt added --enable/disable-clouds and --clouds-asl= to control clouds.
1999-10-22 00:27:49 +00:00
curt
adf5011f80 Fixes to Christian's latest weather submission. 1999-10-21 22:53:12 +00:00
curt
aacffa37d6 Updates to BalloonSim init by Christian Mayer.
Removed old plib include line from the days when plib was rolled in with
  flight gear.
Texture handling tweaks contributed by David Megginson.
1999-10-20 22:18:54 +00:00
curt
0b55a915b4 Wire in the balloon sim. 1999-10-15 22:21:09 +00:00
curt
eddea671a2 Upgraded to latest weather data base code from Christian Mayer's and make
it the default.
1999-10-14 20:30:54 +00:00
curt
7a5fbf1ba3 Fixed up external view mode so it works once again. 1999-10-14 17:32:34 +00:00
curt
cecd5685ca Adding magic carpet FDM mode. 1999-10-14 01:53:43 +00:00
curt
c4963be66c First pass at incorporating Christian's BalloonSim. 1999-10-12 03:30:00 +00:00
curt
b86e6ddc11 Updating FGFS <=> FDM interface. 1999-10-11 23:09:07 +00:00
curt
b274e7ce4a Some view tweaks. 1999-09-28 22:43:52 +00:00
curt
1b45c9ee54 Fiddling around with views, fdm data passing and management to try to be
more sensible so we can do a more reasonable external view.
1999-09-09 00:16:28 +00:00
curt
92f7e1123c Added Durks timezone handling changes. 1999-09-07 23:09:43 +00:00
curt
32bab8aa10 Setup a user definable model hertz. 1999-09-01 20:24:54 +00:00
curt
82da518255 minor tweaks 1999-08-14 22:07:15 +00:00
curt
e945d2b761 Christian's new weather subsystem is causing problems with some compilers
so I am allowing it to be #ifdef'd out until the compile problems can be
resolved.
1999-08-12 17:13:44 +00:00
curt
9e3edfb47b Added support for Christian Mayers new weather subsystem.
Added support for david@megginson.com's mouse yoke patch.
Added a flight model acceleration options (controlled by a/A keys.)
1999-08-10 03:44:47 +00:00
curt
b512e40e79 Cleaning cruft that can be removed now that ssg is taking over. 1999-08-07 23:07:59 +00:00
curt
439779ee36 Tweaks so that Jon's FDM stuff get's initialized better. 1999-07-31 04:58:26 +00:00
curt
c8501f9b29 Now use plib in native install mode.
Preparations for unstable development version 0.7.0
Some reorganizational changes.
Beginning to test the use of ssg (part of plib)
1999-06-18 03:42:54 +00:00
Tim Moore
c90db01dc8 source tree reorganization prior to flightgear 0.7
SimGear and TerraGear appear to have been split off at this time.
2009-09-14 14:26:20 +02:00
Renamed from Simulator/Main/fg_init.cxx (Browse further)