1
0
Fork 0
Commit graph

5430 commits

Author SHA1 Message Date
fredb
0dd1c66f95 Really catch sound exceptions, and avoid exiting on this kind of error :
OpenAL error (AL_INVALID_VALUE): constructor (alBufferData)
Failed to buffer data.
2008-12-12 07:35:39 +00:00
fredb
6a154a59e1 Stuart :
- Removes the cloud type re-use code - I think they aren't worth the graphical artefacts that they cause in light of Tim's improvements
- Changes the transparency of the clouds. Previously, the clouds were transparent at 0m distance, opaque at 200m, then gradually more transparent to the fog limits. This meant they were generally quite transparent. Now, they are opaque from 200m to 15km, then become transparent at 20km. A side effect of this is that the current textures could probably benefit from being made slightly transparent to improve the blending of the sprites against each other.
2008-12-11 08:24:58 +00:00
durk
1fdac74f8e Minimize impact of distant AI models on the scene graph. 2008-12-10 16:04:10 +00:00
timoore
a6909b4ada fix some backslashes in include file names 2008-12-09 14:34:30 +00:00
fredb
69b2c0b697 James Turner :
Here's a patch which refactors the 'plain' GPS code into a slightly
more manageable structure - i.e breaks the large update() method into
various sub-functions. I've tested the patch with B1900d, and things
seem to work as expected, but if anyone experiences GPS weirdness
after this is committed, of course please report it.

The motivation for this was helping me learn the code - I've planning
some changes in this area, and splitting up the logic will hopefully
make that task easier.
2008-12-09 08:10:33 +00:00
fredb
e2bf85e67e James Turner : this patch
- updates how filtering is done on the various FGPositioned query functions - both spatial and ident-based.
- updates the KLN-89b / DCLGPS code to use FGPositioned for all Navaid/Airport queries.

me:
Add few include directives in globals.cxx to avoid such MSVC warning messages :
deletion of pointer to incomplete type 'FGAirportList'; no destructor called
deletion of pointer to incomplete type 'FGNavList'; no destructor called
deletion of pointer to incomplete type 'FGTACANList'; no destructor called
deletion of pointer to incomplete type 'FGFixList'; no destructor called
2008-12-09 07:58:46 +00:00
mfranz
32d3f6308c Anders GIDENSTAM: "Do not leak uninitialized values to the rest
of the computation."  (forward port from jsbsim/cvs)
2008-12-07 19:47:48 +00:00
mfranz
5262e78ed8 slightly more efficient iterator handling 2008-12-07 08:19:54 +00:00
fredb
da940af484 Stuart Buchanan :
- Replaces simple shader attributes with vectors (this was missed out of the last patch by mistake)
- Includes Yon's Fog update code (Thanks!)
- Fixes a bug since 1.0 where --enable-real-weather-fetch stopped the other weather scenarios from working.
2008-12-06 23:03:12 +00:00
andy
7531cd4db4 Fix apparently ancient typo. 2008-12-05 17:33:57 +00:00
mfranz
fd83c9fa22 Csaba "Jester" HALASZ: segfault-- 2008-12-05 16:47:11 +00:00
fredb
9721d7811f This provides the following enhancements & bug fixes
- Fix the chequer-board bug.
- Add proper cloud coverage function - so scattered clouds are now truly scattered.
- Add real-time control for visibility range.
- Use a limited set of clouds rather than generating a completely new Geode for each cloud. This saves sorting and display time.
- Add controls to Rendering dialog to allow fine-tuning of the number of sprites, cloud visibility and the number of different types of cloud.
- Add some variance to the sort back-off to avoid all clouds being sorted at the same time.
- Pack attributes into vectors for performance
- Re-order the cloud type determination code so that if a cloud layer could either be stratus or cumulus, cumulus is used.
- Lowered the cloud level in the standard cloud configuration slightly so a cumulus layer is generated rather than stratus.

These last two mean that you should see some 3D cumuli if disabling real weather fetch.

My thanks to Yon Uriarte for his help with performance work.
2008-12-04 20:56:40 +00:00
mfranz
0cf9d58b76 Allow negative thrust. This allows a single recoil or vibration
thruster to accelerate in both directions. THROTTLE input still
clamps to 0/1 by default.  (OK'ed by Andy)
2008-12-04 18:47:49 +00:00
fredb
d4168d161e James Turner :
- a refactoring of the route manager to reduce indentation and duplication
	- created a helper method to generate the ETA strings
	- created a helper to update target_altitude and altitude_set when the active wp0 changes
	- used early returns to make update() easier to follow
	- removed spurious includes in both header and source file
2008-12-04 08:29:36 +00:00
fredb
812485d623 James Turner : a trivial patch to remove a now obsolete default ctor from FGPositioned 2008-12-04 08:15:36 +00:00
mfranz
7f2f1e39e3 show verbose mode (see $FG_ROOT/Docs/README.gui -> property-list) 2008-12-03 20:18:15 +00:00
fredb
f3b110e565 James Turner:
Attached patch updates the route-manager to use FGPositioned to search
for waypoints, instead of a manual airport / fix / navaid search. This
is good because it's now using the 'strictly closest' match, rather
than arbitrarily picking a distant fix over a nearby navaid. In my
case, the TLA VOR is significant to several EGPH procedures, but also
happens to be the ident of a fix a long, long way away.

Also updates the FGPositioned class to stop using Point3D, partly
because it's deprecated and partly because I had misunderstood the
interface and was using it wrong. For now, all FGPositioned distance
checks use SGGeodesy::inverse, which is accurate but inefficient. Once
FGPositioned queries are used for something on a hot path, I'll
probably store the cartesian position as well as the geodetic, to make
these checks fast.
2008-12-03 20:03:46 +00:00
curt
ebea9d798e Loosen the check for stationary versus moving view point. I some cases when
the view has an "offset" location, the actual location of a "stationary" view
point moves a small amount as the view direction rotates.
2008-12-01 16:13:12 +00:00
curt
9ae7191590 Brian Schack:
Right now, atlas.cxx uses the following code, in
FGAtlas::gen_message(), to retrieve the ADF frequency:

static SGPropertyNode *adf_freq =
    fgGetNode("/instrumentation/kr-87/outputs/selected-khz", true);

I think it should be changed to:

static SGPropertyNode *adf_freq =
    fgGetNode("/instrumentation/adf/frequencies/selected-khz", true);
2008-12-01 13:58:04 +00:00
ehofman
b7ebc7d78d Sync. with JSBSim CVS 2008-11-30 10:44:29 +00:00
mfranz
98b3701655 add _getAliasTarget(): this dereferences an alias, allowing to refer
to the target node's children and attributes etc., which aren't
inherited by an alias.
2008-11-26 11:34:35 +00:00
timoore
68c06775c8 Make computeIntersections work with the near and far cameras 2008-11-26 09:02:48 +00:00
timoore
5f7441f778 Restore camera properties on reInit
From Tatsuhiro Nishioka
2008-11-25 22:50:20 +00:00
timoore
19d9287d3a Expose precipitation property
from Vivian Meazza
2008-11-25 22:50:04 +00:00
timoore
77318b23a5 msg 2008-11-25 22:49:19 +00:00
mfranz
80560b6633 - Don't consider modifiers in axis bindings, as this means to
temporarily lose control over the aircraft while pressing a
  modifier for a button.
- cosmetics: remove trailing spaces and commented out debug messages
2008-11-25 14:32:39 +00:00
mfranz
9bc662e655 Enable <mod-{shift,ctrl,alt,meta,super,hyper}> support for joystick
bindings. Only <mod-up> was supported before.
2008-11-24 17:16:38 +00:00
timoore
723a1e4397 Fix some viewport problems on startup
From Csaba Halász
2008-11-21 23:11:27 +00:00
timoore
52c46e65a1 Use simgear clone function instead of OSG's.
This should remove a dependency on an unreleased version of OSG (2.7.3).
2008-11-21 14:53:37 +00:00
timoore
1955e5bd28 Don't call idle and draw functions from FGEventHandler::handle.
These functions are now called in fgOSMainLoop. The fgMainLoop
function was being called twice, which resulted in a slow-down, but
also caused the displayed frame rate to double!
2008-11-20 11:01:05 +00:00
timoore
8afab2045b Update osg::Camera's viewport when it is created.
This fixes a problem where /sim/startup/[xy]size were not set properly
because the GUI camera's viewport was not correct at startup.
2008-11-19 22:55:42 +00:00
mfranz
12cf1c41ad add "add-model" command, which adds model properties to the first
free /models/model[*] slot and lets the model manager load the
model. The target address is returned under "property". Simple
use in Nasal:

  fgcommand("add-model", props.Node.new({
          "path": "Models/Fauna/cow.ac",
          "latitude-deg": 16.234,
          "longitude-deg": 48.321,
          "elevation-ft": 300,
  });

An "elevation-m" property can alternatively be used and overrides
the "elevation-ft" property.

Each of the properties "latitude-deg", "longitude-deg", "elevation-ft",
"heading-deg", "pitch-deg", and "roll-deg" can alternatively be used
with "-prop" suffix. Their values must then be property path strings
pointing to a node that can be changed at runtime to move the model.
2008-11-19 15:59:54 +00:00
mfranz
54744f58e0 Update the model manager after the event manager, so that model
coordinates that were set relative to the aircraft's position
are picked up before the view update rather than the next cycle.
This avoids ugly fluttering of "passengers" at higher speed.
2008-11-19 07:46:10 +00:00
mfranz
292d1d52cf compile 2008-11-19 01:09:29 +00:00
timoore
4e047d456f Update the camera properties after a resize event. 2008-11-18 22:46:19 +00:00
timoore
4f4434787f Cleanup of camera code in preperation for shadows
Partition depth in CameraGroup:
Remove the ViewPartionNode scenegraph node. The split rendering of the
scene, done to avoid Z buffer precision problems, is now done by two
slave cameras of the viewer.

Rename FGManipulator to FGEventHandler.

Remove virtual member functions that aren't required for event handlers.

Begin using camera group properties to update cameras at runtime;
Initially only the viewport properties are used.

When no camera group is found in the property tree (the default),
create the properties for one. Expose the default window by name.

Add a test for Boost headers to configure.ac. Boost is now a
dependency.

Remove GLUT and SDL versions of the OSG graphics.
2008-11-18 22:45:57 +00:00
fredb
af8903b61c Comment out an unused non compilable function 2008-11-16 14:17:52 +00:00
durk
d8a2726894 Traffic Manager II source code changes
- Decouple aircraft entities from Flights
- Dynamic runtime flight assignment for each aircraft
2008-11-16 13:45:24 +00:00
durk
66b5a7c53b Better support for multiple startup messages. 2008-11-16 13:43:44 +00:00
durk
931c661b40 Changes to the AIModel code, to prepare for the new traffic manager code:
- Leg loading can fail when no additional flights are available
- Better support for waypoint interception during pushback (speed ~ 0)
2008-11-16 13:41:24 +00:00
mfranz
845196800b f_alias: catch SGPropertyNode exceptions and generate runtime error 2008-11-13 23:47:45 +00:00
mfranz
5a3f00bcac add some more generic multiplay properties (now 20 of each type; was 10) 2008-11-12 14:53:03 +00:00
mfranz
b4d6485cfc add alias() and unalias() functions 2008-11-12 14:39:08 +00:00
timoore
aa716b350f Master reference gyro changes from Vivian Meazza. 2008-11-11 21:20:02 +00:00
mfranz
4516233b7b fix typo in warning message 2008-11-11 18:26:50 +00:00
curt
4529449b83 Incremental improvement of openal sound velocities. This should help
stabilize some of the odd artifacts we were hearing, that were especially
noticable in clean sound samples like the stall horn or the marker beacon
codes.  The change still preserves the doppler effect and maintains the
good work of a previous developer figuring out how to align the model and
listener velocity vectors correctly.
2008-11-10 15:59:14 +00:00
curt
51283147db FGRotor needs to be added to the Makefile.am so it is (a) compiled and
(b) included in the result of "make dist".
2008-11-08 01:13:51 +00:00
fredb
7b547acbf9 Stuart Buchanan :
It fixes the following issues (to a greater or lesser extent):
1) Performance. Quad trees used to improve culling, and the sprites are placed on the surface of a sphere rather than
randomly throughout the cloud, requiring fewer textures. This saves about 5-10fps on my machine.
2) Disabled 3D clouds have no performance impact. Previously they were still in the scenegraph. Now they are removed.
3) Clouds are now loaded on start-up, and don't require the scenario to be changed, they also work with METAR.
4) The cloud field is shifted as you travel. There's a small bug in that the clouds "jump" as you reach the edge of the field.
5) Iterative sorting of sprites. This doesn't appear to solve the alpha blending problem completely, but may help a bit.
2008-11-06 21:58:50 +00:00
andy
78d3763b41 Fix refcounting bug in f_removeChild(). Use a smart pointer to handle
the case where the removed child has no other referants, otherwise it
will be deleted on function exit.  Also give the ghost type a name for
cleaner debugging.
2008-11-03 23:50:33 +00:00
fredb
0fbf965b39 Patch from Nicolas Vivien : don't pour rain above cloud layers, turn rain into snow when temperature is below 0C 2008-11-02 09:45:31 +00:00
curt
692afe0bcb Fix a bug where the search() function was not being called if power was false
or the unit was not serviceable.  This search() routine needs to run every
iteration no matter what the power or serviceable state.  If power is turned
off or the unit becomes unserviceable while a beacon sound is playing, the
search() routine still needs to be called so the sound effect can be properly
disabled.
2008-10-30 20:42:21 +00:00
curt
e8ff28f9f8 Tidy up for a source code "snapshot" release. 2008-10-30 18:35:44 +00:00
curt
9b8aa717f5 Not finding a depricated config file shouldn't be a fatal error. 2008-10-30 18:33:28 +00:00
timoore
5592bb326f Don't allow negative values as argument to pow().
This was a source of a spew of "NaN" error messages at night when the
sun is at a large angle to the zenith. I don't know why this wasn't a
problem before now.
2008-10-28 12:10:27 +00:00
timoore
fe83ba7110 Disable on-screen statistics for the GUI camera 2008-10-28 12:10:01 +00:00
ehofman
6214e976a8 Fax an INCLUDES problem 2008-10-26 16:59:58 +00:00
fredb
bc240daaf3 3D clouds from Stuart Buchanan. Need a recent driver update, --enable-clouds3d option and a Weather Scenario to show up 2008-10-26 09:38:21 +00:00
ehofman
8dd517621d Revert to previous version, Makefile.am shouldn't have been updated 2008-10-23 19:54:47 +00:00
ehofman
6d95ade940 Sync.with JSBSim CVS 2008-10-23 19:04:45 +00:00
ehofman
ee8f603969 Alasdair Campbell: fix the MK_VIII problems 2008-10-23 16:43:35 +00:00
mfranz
995eaac10b screenshots: check for empty screenshots-dir 2008-10-19 16:25:05 +00:00
fredb
dc2341b643 Revert to previous revision after an error during last commit 2008-10-19 16:22:17 +00:00
fredb
2710564c7d Alex Perry :
This patch changes terrasync so it links against the subversion
library if you have it installed.  It supports people who build binary
releases for use by non-developers by removing the runtime external
dependency on having command line svn or rsync available.  Since the
patch changes autoconf to detect libsvn,  I'd appreciate it if people
who release binaries could verify that the detection scripting works
for their platform.

Developer warning:  If you do have libsvn developer libraries
installed, terrasync changes its default option from "-R" to "-S" to
remove the command line dependency.  However, Martin has not yet
uploaded world scenery into the subversion repository so it won't be
useful to fly against and you may want to specify "-R" on the command
line in the short term.  Or run both.


Me: Update MSVC 7.1 project file. Need svn-win32-1.x.y_dev.zip and svn-win32-1.x.y.zip
located at http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100
2008-10-19 16:08:29 +00:00
mfranz
1a292c9ed2 - createModule: add optional arg[] vector arguments
- make propNodeGhost() public, so that it can be used by non-friends
- SGNasalModelData: create module with arg[] containing two prop ghosts
2008-10-18 19:52:18 +00:00
mfranz
e1d72f8253 - fix regression: classes derived from SGModelData get the props root
via modelLoaded, not a possible Nasal node.
- rename SGNasalModelData::_props to ::_root to avoid confusion
2008-10-18 18:47:28 +00:00
mfranz
76b609738f set /sim/rendering/particles as global particle switch 2008-10-17 21:25:03 +00:00
mfranz
c3b1d4e806 .rgb -> .png for generic splash textures 2008-10-14 06:11:44 +00:00
mfranz
e8738eca19 listeners: do no longer set cmdarg() to avoid interference with embedded Nasal 2008-10-12 21:08:44 +00:00
mfranz
30b8cde4c0 add surface-positions/wing-pos-norm, surface-positions/wing-fold-pos-norm 2008-10-09 16:13:50 +00:00
mfranz
a29ee7c257 warn about badly set fg-root 2008-10-02 08:33:49 +00:00
mfranz
b6a354980d make isatty() available for stdout/stderr (hope it works on MS Windows) 2008-10-01 15:03:53 +00:00
timoore
62bca8368e YASim flap changes from Vivian Meazza 2008-09-29 08:00:20 +00:00
fredb
9ebb9128c8 MINGW patch by Csaba Halasz, reworked by me to avoid breaking MSVC or Cygwin build 2008-09-28 08:27:32 +00:00
mfranz
f2398fd983 - airportinfo(): remove superfluous indices of threshold/stopway
- restore consistent coding style: no 2-space spaghetti code
  indentation, remove trailing spaces, no spaces after ( and before )
2008-09-23 20:06:40 +00:00
ehofman
82fcff36da James Turner,
Regarding the Runway selection bug:
The logic here is a bit convoluted, but I also had a dumb bug in normaliseBearing - I was clamping to the wrong range (0..360 instead of -180..180). This caused the scoring code to pick weird runways. I've added some extra cases to my local tests, and here's a fix.
2008-09-14 14:31:00 +00:00
ehofman
49030e700b Add the alpha test back in so the instruments won't disappear after changing the view direction 2008-09-14 09:34:17 +00:00
ehofman
6bd7967e36 fix a typo 2008-09-13 09:20:47 +00:00
fredb
dddbbf7954 Compile again with MSVC. APIENTRY not defined after last changes 2008-09-13 08:41:22 +00:00
ehofman
98d8463d7b James Turner:
Trivial patch, but an important milestone:

Convert FGAirport to inherit FGPositioned. This concludes the first phase of the FGPositioned changes, and hopefully the most intrusive ones - adding in the base class. There's lots (and lots) of further work to do on the indexing and querying side, as well as cleaning up the accessors, but that will happen in single source files, or a group of related files at a time.

As a trivial note, this patch does fix a bug where the very last airport in apt.dat would get an invalid type. So for all you people who just love to fly to EHYB (Ypenburg, The Hague), things may work a little more sanely.

I'll intentionally let the dust settle after this patch, so any weird behaviour I may potentially have introduced shows up. Just to re-iterate, so far there should be absolutely no user-visible change in the behaviour of anything - navaids, position init, the route manager, AI flight plans, etc. If there is, please let me know and I'll fix it ASAP.
2008-09-13 08:07:22 +00:00
ehofman
fe020badf0 James Turner:
By way of example, here's a patch to make the position init code (in fg_init.cxx) cleaner, partly thanks to the FGPositioned changes. It reduces the file size by 200 lines - virtually all of which was copy-and-paste. Once the remaining class (FGAirport) is converted to inherit FGPositioned, all the future patches should be like this - touching one or a few files at most.

This factors the start-offset logic out into a helper, which also does the final property setting (which has to happen on both the /preset and 'real' values). Using the accessors in FGPositioned, and the offset helper, a couple of cases become trivial (fix and nav) and others become much simpler.
2008-09-13 08:06:15 +00:00
ehofman
bb2b03c7e3 James Turner:
Convert FGNavRecord to inherit FGPositioned. This is much more self-contained than the FGRunway change, since FGNavRecord already had good encapsulation of its state. However, it's a large diff due to moving around two nasty pieces of code - the 'align navaid with extended runway centerline' logic and the 'penalise transmitters at the opposite runway end' logic.

In general things are more readable because I've replaced the Navaid type enum, and the use of Robin's integer type codes, with   switches on the FGPositioned::Type code - no more trying to recall that '6' is an outer marker in Robin's data. The creation code path is also pushed down from navdb into navrecord itself.
2008-09-12 08:46:15 +00:00
timoore
a18a0593d4 set wind vector for particle systems 2008-09-11 10:29:18 +00:00
timoore
398c4c25d0 remove cruft 2008-09-11 10:28:28 +00:00
ehofman
aa78341698 James Turner:
Convert FGRunway to be heap-based, and inherit FGPositioned. This is a large, ugly change, since FGRunway was essentially a plain struct, with no accessors or abstraction. This change adds various helpers and accessors to FGRunway, but doesn't change many places to use them - that will be a follow up series of patches. It's still a large patch, but outside of FGAirport and FGRunway, mostly mechanical search-and-replace.

An interesting part of this change is that reciprocal runways now exist as independent objects, rather than being created on the fly by the search methods. This simplifies some pieces of code that search for and iterate runways. For users who only want one 'end' of a runway, the new 'isReciprocal' predicate allows them to ignore the 'other' end. Current the only user of this is the 'ground-radar' ATC feature. If we had data on which runways are truly 'single-ended', it would now be trivial to use this in the airport loader to *not* create the reciprocal.
2008-09-11 08:38:09 +00:00
ehofman
3b486e1aee James Turner:
Here's part 2 - converting FGFix (the simplest one) to be both heap-based and inherit FGPositioned. One minor benefit from this is replacing some dangerous code in FGFixList which used to return the address of an iterator member ('&it->second'). To keep the diff a sensible size, I'm not updating the callers to use the richer FGPositioned types - i.e replacing separate lat/lon handling with SGGeod. I will make those cleanups, but in future patches.
2008-09-10 08:54:49 +00:00
fredb
9751b25216 Add required include for lower_bound 2008-09-08 19:25:45 +00:00
ehofman
a727e69585 James Turner:
Here's the very first FGPositioned patch - adding the files, and building them, but nothing else.
2008-09-08 17:50:06 +00:00
fredb
2b0588d170 James Turner :
If someone could kindly apply the attached patch, that'll keep this from crashing, I believe. The fix is easy since FGAirport can now always provide an active runway - there's no need to guess at random, or rely on the tower having set one up.
2008-09-07 08:44:48 +00:00
ehofman
eada914350 Commit the proper patch stupid :( now with the positioning and orientation code included... 2008-09-05 19:46:21 +00:00
ehofman
88b2ae1471 Don't update twice.. 2008-09-05 11:48:08 +00:00
ehofman
2963b90195 revert the move of the sound positioning code, at least till i found out why it doesn't work this way. 2008-09-05 11:05:21 +00:00
ehofman
a6f885b1fb Move the soundmanager update code back to the main loop, just prior to updating all the SGSubsystems. Hopefuly this silves the sound problem. 2008-09-05 09:18:33 +00:00
fredb
b53badf201 Stefan C. Mller :
Small patch fixing bugs I've encountered while getting the current CVS to build in MSVC.
* std::lower_bound was used with the key-type of a map, but lower_bound expects the value-type of the collection it works on, with is std::pair. MSVC seems to be more strict about this.
* Added an missing include statement.
* Replaced an rint() call with floor() (MSVC does not offer rint).
2008-08-31 18:32:43 +00:00
curt
b423d0bc1d Torsten Dreyer:
Here is a little patch that changes the behaviour of the VOR CDI and OFF-flag
for indicators like the HSI when getting outside the range of the VOR
station.

Currently, when flying at a distance between the effective_range and twice the
effective_range of a VOR station, the in-range property is computed based on
a random value, causing the OFF Flag and the CDI bar to perform an ugly
jitter.

The attached patch introduces a new property signal-quality-norm which is
computed based on the distance to the station and the range. It is 1.0 when
the distance is less than the range and decreases by 1/x^2 for distances
greater than the range leading to a signal-quality-norm of 0.25 for distances
two times the range, 0.125 for three times the range and so on.
The in-range flag is tied to a signal-quality-norm greater than 0.2 (fixed
squelch).
The CDI and GS needle deflection is multiplied with the signal-quality-norm.

The benefit is:
- Ability to animate the OFF-Flag with a smooth transition.
- CDI and GS needle deflection shows correct values when in range
(signal-quality-norm=1.0) and show some wrong indication when the range is
exceeded
- CDI and GS needle start to move, even when the OFF flag is visible
- No more jitter for flag and needles

See the new SenecaII ki525a hsi as an example at
http://www.t3r.de/fg/navpatch.jpg
The numbers on the image are:
(1) the new property signal-quality-norm
(2) distance exceeds the effective-range by 30%
(3) NAV flag has a rotation animation bound to signal-quality-norm and is
partially visible
(4) CDI is partially deflected even with NAV flag shown

This implementation better matches reality - at least, how I observed it ;-)
2008-08-28 21:24:02 +00:00
curt
d92d39f576 Updates to match prerelease version number. 2008-08-28 21:20:49 +00:00
curt
c7f6156324 "make dist" fixes. 2008-08-28 21:20:21 +00:00
ehofman
8858ad7a00 Sync. with JSBSim cvs 2008-08-26 08:02:31 +00:00
fredb
e5a8664b8c Fix missing parameter reported by Alex Buzin 2008-08-24 18:20:50 +00:00
ehofman
bd832fe32d James Turner:
Good news: I'm working on some automatic testing of the 'core' FG pieces, especially those I'm likely to break in my Navaids / airports / runways work

Bad news: I already broke something, in my runways refactoring. (But my tests caught it!)

Attached patch fixes it - it's (of course) the stupidest thing in the world. Incidentally, standardising this kind of code into some (inlined) header is becoming more and more of a priority  for me - I've lost count of the number of times I've seen the 'clamp heading to 0..360.0' and 'reverse a heading and clamp it' idioms in the code. The KLN89 and MkVIII code have (of course) their own helpers for this.
2008-08-24 09:04:24 +00:00
ehofman
d8f5529d21 remove redundant semi-colon 2008-08-23 13:09:24 +00:00
ehofman
341216e56a Fix a compile problem for lower_bound() 2008-08-22 19:49:03 +00:00
ehofman
289f2f5f0d James Turner:
This is a little intrusive on the KLN89 code, but avoids the wasteful cloning of the airports, runways and navaids which current happens, and also combines the ugly string ordering code.
2008-08-22 11:22:22 +00:00
ehofman
8d5de1659c fix a last minute typo 2008-08-22 09:57:49 +00:00
ehofman
8bb5bf7c46 Nothing fancy, it all seemed to work properly already... 2008-08-22 09:50:22 +00:00
durk
b2df4d41a5 Czaba Halasz:
Somebody please add config.h to AirportList.cxx, because the #include
<plib/puAux.h> (in AirportList.hxx) needs the PU_USE_NONE define.

DT: Done :-)
2008-08-21 20:14:26 +00:00
durk
554dba0f3f James Turner: Here's a trivial patch, when you have a moment:
- removes various members from FGRunway which no-one was using
- any of these can be trivially re-instated if and when someone
actually wants to use them - but right now they're simply bloating up
FGRunway, which we have lots of, because it currently includes all the
taxiways in Robin's data.
- that's it.
2008-08-21 16:34:33 +00:00
ehofman
da96156c30 Move SGSoundMgr stuff oevr to FGFX 2008-08-21 14:26:27 +00:00
ehofman
a1426a812a James Turner:
Switches the MkVIII code to use the same 'closest airport' logic as everything
else, instead of its own special version.
2008-08-15 18:48:11 +00:00
durk
301054204e James Turner: Improved runway management code:
- Runways are now part of an airport, instead of a separate list
 - Runways are no longer represented as a boring struct, but as a class
   of their own.
 -Improved runway access to unify various runway access methods.
2008-08-14 18:13:39 +00:00
ehofman
90f498be4d Sync. with JSBSim CVS 2008-08-14 14:16:50 +00:00
timoore
0d0bd58268 Allow generic file protocol to terminate fg after a number of repetitions. 2008-08-07 22:24:47 +00:00
mfranz
42e14d98f4 Ron JENSEN: s/hide/!enabled/
use <enabled>false</enabled> flag for widgets that shouldn't be drawn
instead of <hide>true</hide>. This is consistent with other places
in fgfs, like menu entries, hud elements, subsystem switches, etc.
2008-08-06 15:18:41 +00:00
mfranz
aedc6f0614 use <enabled>false</enabled> flag for widgets that shouldn't be drawn
instead of <hide>true</hide>. This is consistent with other places
in fgfs, like menu entries, hud elements, subsystem switches, etc.
2008-08-05 05:27:07 +00:00
mfranz
fa2387c05b - fix function argument order (top & bottom were swapped)
- drop wrong and superfluous rounding (sprintf() rounds already)
- remove redundant default values to property getters (default is 0 already)
2008-08-05 05:22:05 +00:00
ehofman
c4a38e10ec James Turner:
Attached patch + new file make FGNavRecord have a .cxx file, and a constructor w
hich allows all the parameters to be supplied. Along the way I also cleaned up t
he navrecord.hxx header, lots more header pollution has been killed.

Some long methods are no longer inline, but were all suspiciously long to meet c
ompiler inlining criteria (I'm not clear if the 'inline' keyword is advisory or
mandatory in this situation) - I don't expect this to affect performance in any
way whatsoever.

The constructor addition is to support some hacking I'm doing improving the star
tup performance of the navDB by lazily loading the data, and caching it in a mor
e efficient format than text. I'm submitting this change (and probably some othe
r small tweaks in the future) since they are worthwhile as cleanups regardless o
f how my current experiments work out.
2008-08-03 14:34:42 +00:00
ehofman
66eef4dafc Add support for squared damping coefficients for gears. 2008-08-03 13:52:45 +00:00
timoore
b1dd2eed8c Restore sky
Don't clear BACKGROUND_BIT in the master camera's cull
mask. ViewPartitionNode does that where needed.
2008-08-02 22:32:55 +00:00
fredb
e5201fbb70 MSVC 7.1 fix 2008-08-02 10:01:08 +00:00
timoore
6f802959ce CameraGroup class for managing multiple cameras.
CameraGroup supports cameras opened in different windows or in the
same window, with flexible view and perspective specification.

Clean up mouse click handling via osgViewer. Don't let any camera
"have focus;" this forces events to be reported in window coordinates
and simplifies life. Don't use the osgViewer::View::requestWarpPointer
method; instead use our own code which only deals with window
coordinates.

Make glut and sdl versions work with CameraGroup too.
2008-08-01 15:57:29 +00:00
durk
a8c27e0cf1 Make sure 'make dist' keeps working. 2008-07-31 17:21:45 +00:00
ehofman
14885374de header cleanups 2008-07-31 12:04:32 +00:00
timoore
7f49272e5e Explicitly set traversal mask for near camera.
Don't depend on camera inheritance; set the mask in the traverse() method.
2008-07-31 09:20:35 +00:00
mfranz
61812ef4b8 better use unset() for unsetting ... 2008-07-30 15:01:59 +00:00
mfranz
a0c2e5b97f disable clip planes after use (Doesn't seem to make a difference,
and is only a temporary measure, as it was planned to OSGify the
HUD and put it in the scenegraph etc.)
2008-07-30 14:52:01 +00:00
mfranz
7a3fe04275 s/clip/clipping/ 2008-07-29 15:48:11 +00:00
mfranz
7ba3d5cb53 - extract clipping code to HUD.cxx, allowing generic clipping
and separate ladder clipping
- fix acceleration node names
- draw 90/-90 bars if there's no zenith/nadir
2008-07-29 15:41:25 +00:00
timoore
f08e16cd55 Changed ViewPartition to use two cameras instead of three.
I thought that this would fix the "black hole in the sky" problem,
which turned out to be caused by an OpenSceneGraph bug. Nevertheless
it is a simplification.
2008-07-29 11:18:21 +00:00
ehofman
429f2530de James Turner:
* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
2008-07-29 08:27:48 +00:00
mfranz
5cceb32c0a - read x/y/width/height as floats
- don't write bars past nadir/zenith (better MILSTD compliance)
- introduce tick-length/zero-bar-overlength/enable-dive-bar-angle
  configuration parameters
- simplification
2008-07-28 17:04:24 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00
fredb
967bf101ef Restore inclusion of GLU.h 2008-07-27 16:08:45 +00:00
fredb
3db0cf1659 Remove unneeded inclusions of windows.h, GL.h and GLU.H 2008-07-27 15:18:34 +00:00
durk
85ec807d97 Enable Radio #2. 2008-07-27 09:59:52 +00:00
fredb
41f7fc256c Remove unused variables 2008-07-27 09:45:33 +00:00
mfranz
b68b751fd4 get rid of mouse.cxx and pu{Show|Hide}Cursor() 2008-07-27 09:39:10 +00:00
ehofman
46ae218672 remove all the FX and XMESA cruft relating to Glide support. 2008-07-27 07:54:13 +00:00
fredb
0dfdbf8499 One occurence of Balloon.cxx is enough 2008-07-26 08:25:11 +00:00
durk
f20136d00f But I do think we need to remove *this* reference to BaloonSim. :-) 2008-07-26 07:33:15 +00:00
durk
6048f4d01e Rvert last change. The Balloon and Magic Carpet are there. They didn't
show up during my previous commit though...
2008-07-26 07:20:48 +00:00
ehofman
a40e040e24 Add the BalloonSim and MagicCarpet fdm's back in (i seriously thought this had been done, oops) 2008-07-26 07:19:13 +00:00
durk
f6301ea1d7 Balloon and Magic Carpet no longer exist. 2008-07-26 07:01:07 +00:00
fredb
25bda87015 Balloon and MagicCarpet already moved to SP_FDM 2008-07-25 21:56:49 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00
ehofman
eccddb3dfd Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM
PLETE_FUNCTIONAL from SimGear and FlightGear.

As a result, SG_HAVE_STD_INCLUDES is now *always* set, so I will get the boring
fixes for that done, but separately. I'm still auditing the other things in comp
ilers.h - there's a lot that can die now BORLAND is gone.
2008-07-25 10:39:53 +00:00
ehofman
c8a9fd2bd4 Some Mac / __APPLE___ cleanups:
- remove the OSX_BUNDLE crap *I* introduced years ago - we're always a a bun
dle on Mac now.

    - fix up the default fg-root on Mac to be FlightGear.app/Contents/Resources/
data - i.e the location used by the macflightgear.org distro, and indeed the obv
ious 'correct' location. Not sure why I didn't use that in the first place, back
 in the day.

    - remove the CPSForegroundEnable hack. For one thing, we're a bundle and don
't need it, and for another, osgViewer on Mac does the same logic using a newer,
 public API rather than a hack into the OS.

    - remove the strange logic for doing fgOSInit 'early' (in bootstrap rather t
han main) when running from the command line on Mac; again this is obsolete, and
 no one seems to know why it was ever necessary. I guess it was an interaction w
ith SDL when running without a bundle.

    - (not Mac related) remove obsolete code bracketed by ENABLE_PLIB_JOYSTICK a
nd USE_GLIDE (neither of which are ever set, even from config.h that I can see)
in main.cxx
2008-07-25 08:39:28 +00:00
ehofman
6c4061bdc5 Remove the remaining macintosh (not MacOS-X) and MWERKS workarounds. 2008-07-25 07:29:20 +00:00
ehofman
4b40e725cd remove macintosh (note: not MacOS-X) and MWERKS workarounds. 2008-07-24 19:50:58 +00:00
mfranz
a4c23008f4 let removeChild() return the detached node (like the c++ version) 2008-07-24 11:25:13 +00:00
mfranz
5033779192 - use path validation for parsexml() nasal command
- util.cxx: add comment
2008-07-22 20:26:17 +00:00
ehofman
3b3f671974 Sync. with JSBSim CVS (header cleanups). 2008-07-22 08:49:15 +00:00
timoore
79e6712d7e Add repeat capability to input from files. 2008-07-19 16:23:05 +00:00
fredb
03a180ac83 Restore code after unwanted change in last commit 2008-07-17 21:32:20 +00:00
fredb
4b50a369c8 SIGPIPE is a unix thing 2008-07-17 21:28:43 +00:00
mfranz
ba27bab1b2 make sure that the validation nodes are readable and writable 2008-07-17 08:38:13 +00:00
mfranz
f79dbc23bf ignore SIGPIPE. If we pipe our output to another application, let's say
to kst, and kst is closed, this does *not* mean that we want FlightGear
to "abort".
2008-07-15 16:55:23 +00:00
mfranz
030035a32a include cstring for memset() (necessary for gcc 4.3.*; backported
from JSBSim/cvs)
2008-07-15 13:08:03 +00:00
fredb
dce2d5d7cd MSVC doesn't have a round function 2008-07-14 09:48:09 +00:00
durk
cf2bd4003c Removal of depricated version of Airports/trafficcontrol.[ch]xx
(See src/ATC for it's new location)
2008-07-13 12:57:06 +00:00
durk
17c42deae1 Initial attempt to establish a better integration between AI and ATC code.
Various other patches that have been lingering around for a while:
 * Moved trafficcontrol.[ch]xx from the Airports directory to ATC, where
   it really belongs.
 * AI aircraft will request startup clearance, and ground control will
   approve.
 * Starting AI Aircraft will be pushed back to a predefined holding point
   on the ground network, and wait a while before taxiing out to the runway
2008-07-13 12:51:06 +00:00
mfranz
44fdf77601 "load"/"save" flight: enforce ".sav" extension 2008-07-11 20:55:43 +00:00
mfranz
76a13e689d use same path validation process for fgcommands "load", "save",
"loadxml", ans "savexml" as is used for io.open(). This is still
Nasal based for now. See $FG_ROOT/Nasal/io.nas.
2008-07-11 16:36:54 +00:00
ehofman
ce7f695ea2 add a reference for memset() 2008-07-11 14:11:54 +00:00
ehofman
f7f17a4744 Update to the latest version of JSBSim which supports Lighter Than Air craft
(like Airships) and external forces.
2008-07-10 17:23:02 +00:00
mfranz
c9dccf4841 return attribute mask as unsigned 2008-07-10 11:36:10 +00:00
mfranz
f08d1bf5b4 let n.getAttribute("last") return SGPropertyNode::LAST_USED_ATTRIBUTE
(this is the same constant value for all properties)
2008-07-10 10:58:06 +00:00
mfranz
1ace68e836 don't run the help browser from a property that a user could have
changed to something evil, but rather make sure that the browser
string can be trusted. (TODO: change system() to vfork()/execvp() ?)
2008-07-09 19:35:53 +00:00
mfranz
1b062a1cf0 let the --prop: option overwrite write-protected properties
("The user is always right, but not always bright.")
2008-07-09 15:09:23 +00:00
mfranz
0ae36e3979 remove depreciated and unused src/GUI/trackball.* 2008-07-09 12:44:32 +00:00
mfranz
b8d62d212c remove depreciated and unused src/GUI/trackball.* 2008-07-09 12:37:54 +00:00
mfranz
9f571a0f00 remove depreciated gui_local.[ch]xx:
- drop unused parts (MouseQuat/GuiQuat)
- move "old-reinit-dialog" fgcommand to fg_command.cxx under new name
  "reset" for now. (May later get merged with fgcommand "reinit".)
- move reInit() to fg_init.cxx: This was used by Shift-Esc and
  Menu->File-Reset (via fgcommand "old-reinit-dialog"). We have already
  a similar function fgReInitSubsystems() in fg_init.cxx, so these two
  functions will probably get merged later.)
2008-07-09 12:22:33 +00:00
mfranz
de527e3891 rename attributes write/read to writable/readable (The original names
where chosen to match the SGPropertyNode::WRITE/READ symbol names and
should make it more consistent, but this isn't really something that
should be exposed to the Nasal developer.)
2008-07-07 10:23:24 +00:00
mfranz
ecd5521bf8 - remove unused puObject args in gui fgcommands
- remove no longer used PU macros
2008-06-23 18:28:02 +00:00
mfranz
889f3926f2 - make sure /sim/fg-current can't get preset and write protected, so
it's reliable at Nasal init time.
- make sure the cwd buffer is terminated
2008-06-22 11:29:32 +00:00
mfranz
dec96cfa45 while abort() is really only useful for listeners (in all other cases
we know the stack trace), it's better to use a separate function for
it, as this can be used conditionally, as in:

  setlistener("/the/property", func(n) {
      if (n.getValue() < 0) # who's writing negative numbers to /the/property?!
          abort();          # let's check the backtrace ...
  });
2008-06-19 17:18:42 +00:00
mfranz
37559fee21 make fgfs abort() after a listener with runtime arg == -1 was triggered
and its function called. This is useful for debugging purposes, to get
a core dump which unveils which C++ code was writing to the property.
This isn't any more of a security problem as other Nasal code that
makes fgfs crash, such as:  var x = func call(x); x();  The difference
is that the listener doesn't use up all memory before and is much quicker.
2008-06-19 10:39:12 +00:00
mfranz
88839f0b7a set_fg_root: prevent circumvention of the Nasal security code through
pre-setting and write-protecting /sim/fg-root in *-set.xml files
2008-06-16 07:46:55 +00:00
mfranz
afc5225272 - allow users to set fg-home dir via FG_HOME environment variable, but
- don't allow to do that from any XML file. This is to prevent malign
  code from writing a new fg-home in ~/.fgfs/autosave.xml or other files
  in ~/.fgfs/.
2008-06-13 10:52:47 +00:00
timoore
a9319336ba From Benoit Laniel: replace SG threading constructs with OpenThreads 2008-06-12 08:24:39 +00:00
mfranz
0317d992b9 cosmetic changes *only*:
- fix mixed tab/space indentation (replace all tabs by 8 spaces)
- remove trailing spaces
- rename one local variable (ttt -> pwd)
2008-06-11 18:02:19 +00:00
mfranz
5cb6e43767 Anders GIDENSTAM: catch all exceptions to avoid aborting fgfs after
commands like "ls .."
2008-06-11 17:16:50 +00:00
timoore
876bd2055c Don't add guiCamera, which is now a slave, to the scene graph. 2008-06-08 20:50:30 +00:00
fredb
7c8c8ff381 FGFontCache::initializeFonts() now portable across platform through the use of plib 2008-06-07 08:10:46 +00:00
timoore
bfc1967529 Revert most iostream-related changes to JSBSim
So many files in JSBSim use cout that it is not productive to remove
iostream from header files.
2008-06-06 21:21:57 +00:00
timoore
18bece731a Fix GUI and HUD text rendering problems.
After the changes that moved the GUI and HUD to a slave camera, the
texture-based fonts wouldn't display. The main fixes here are making
sure that the TXF textures are all loaded into the font cache early,
and explicitly setting the active texture unit in the GUI / HUD
drawImplementation.
2008-06-06 19:02:17 +00:00
mfranz
b27f73f4f4 make route manager input case insensitive 2008-06-06 07:49:41 +00:00
mfranz
c9d2243960 Anders GIDENSTAM: "only override the receive port when it isn't set already" 2008-06-03 15:57:33 +00:00
mfranz
9fc99b10e2 Fred BOUVIER & Stuart BUCHANAN: make search function case-insensitive
mf: add leading space to allow search for word boundaries (" wat")
2008-06-03 10:25:58 +00:00
timoore
5d5b1f3ca4 One more try at the osg 2.5.1 pager fix 2008-06-03 07:32:03 +00:00
timoore
97d86e10f7 Fix typo in DatabasePager interface changes for OSG 2.4 2008-06-03 05:36:19 +00:00
timoore
8d1c97d94b Changes for new DatabasePager interface in OSG 2.5.1 2008-06-02 21:10:13 +00:00
timoore
32e9505eed Clean up header file use of iostream and "using" declarations
Replace include <iostream> with istream, ostream and/or iosfwd as
appropriate.

Remove using namespace std and using std::foo from header files.
2008-06-02 21:09:51 +00:00
timoore
fe1dd9474e iostream cleanup wip 2008-06-02 21:09:10 +00:00
timoore
a251fd35cb Include <iostream> and using declarations as needed.
SimGear no longer includes iostream and avoids using declarations in
header files, so various fixups are needed.
2008-06-02 21:07:35 +00:00
mfranz
eb2a167331 attach listener after setting the default values (of course :-) 2008-06-02 11:44:02 +00:00
mfranz
47b9da740b - export font properties to the property tree again
- don't keep oodles of class member variables public (eek!)
- use ::hasValue() instead of ::getType() != SGPropertyNode::NONE
- consistency fixes and cosmetics
2008-06-02 09:32:37 +00:00
mfranz
4b245467c7 change default font values 2008-06-01 18:16:35 +00:00
mfranz
e0aeda5a51 Csaba HALASZ & Syd ADAMS: make radar font configurable
mf: move font color parts to the font listener
2008-06-01 18:08:01 +00:00
fredb
68124ca36d Remove unused variables 2008-06-01 14:59:20 +00:00
fredb
af879b8310 Fix Traffic Manager XML parser 2008-06-01 11:56:32 +00:00
frohlich
61dc8df110 Implement rotation offsets for cameras. 2008-05-26 20:34:26 +00:00