jmt [Tue, 6 Jan 2009 16:56:26 +0000 (16:56 +0000)]
Prevent exceptions in getRunwayByIdent when a malformed rwyuse.xml means
there is no valid active runway. This is not ideal, since it masks underlying
problems - the real fix is to make the runway-use code more robust and
validate input XML.
timoore [Thu, 1 Jan 2009 09:35:15 +0000 (09:35 +0000)]
Set far camera reference frame to ABSOLUTE_RF
This was lost when I stopped cloning the near camera to make the far
camera. The result was a lot of breakage, including explicit camera
configurations not working and various ordering issues too.
timoore [Tue, 30 Dec 2008 21:09:46 +0000 (21:09 +0000)]
Change the order of the main cameras from NESTED_RENDER to POST_RENDER
This seems to be accepted OSG usage for slave cameras. It's possible
that this order is important for rendering instruments that use RTT
textures on systems without frame buffer object support. I'm thinking
that the resulting bugs may be implicated in the "black rectangle" problem.
timoore [Sat, 27 Dec 2008 14:35:33 +0000 (14:35 +0000)]
Expose the CameraGroup near, far, and near/far boundry as properties
The near/far boundary, called "near-field", can be set to 0 which
disables the far camera and renders the whole scene using only one
camera. I'm hoping that this may be useful in resolving some
system-specific rendering bugs.
Various fixes were made to correctly render the scene using only the
near camera.
mfranz [Sun, 21 Dec 2008 15:52:29 +0000 (15:52 +0000)]
Stuart BUCHANAN: fix METAR cloud interpolation
"I've managed to fix this by differentiating rebuilding the 3D layers
(e.g. due to METAR updates) from rebuilding the entire environment (due to a
change in scenario)."
mfranz [Sat, 20 Dec 2008 23:24:50 +0000 (23:24 +0000)]
revert to using a cached list of aircraft -- scanning the Aircraft/
dirs is only fast enough with hot file-cache, but a bit too painful
otherwise. Updating the aircraft.list is now easier, though: Just
type $ fgfs --aircraft=?<TAB>
fredb [Fri, 19 Dec 2008 23:11:58 +0000 (23:11 +0000)]
Stuart : The attached patch
reverts one of my changes which ensured that the 3D clouds were updated with
METAR. Unfortunately this had the side-effect of over-writing the environment
properties, and therefore nuking the interpolation work.
fredb [Fri, 19 Dec 2008 07:42:13 +0000 (07:42 +0000)]
Stuart Buchanan :
Attached is yet another 3D clouds patch, to fix the following:
1) The 3D clouds were not modified by the cloud coverage, due to some problems with osg::Switch
2) METAR changes to cloud coverage were not obeyed.
3) Making changes via the Cloud dialog had no effect unless 3D clouds were toggled.
4) Cloud cover was too sparse.
5) 3D Stratus clouds caused performance issues on some hardware (fixed by removing 3D stratus from cloudlayers.xml - it will now be a 2D layer).
mfranz [Thu, 18 Dec 2008 20:18:50 +0000 (20:18 +0000)]
Csaba/"Jester" and /me: since a few weeks the property browser had
displayed garbage in the title line if one left a directory. Jester
spent a lot of time finding the cause: a bug that must have been
there since ... forever: fgfs reported to PUI the string addresses
as returned by SGPropertyNode::getStringValue() without considering
that this address isn't valid after the next write access to that
node! It's almost a miracle that it worked so well for so long,
despite that issue. (I also used to opportunity for some more
cleanup -- so I'm to blame for any newly introduced bugs, and
also for reverting some of Jester's cleanups. :-)
mfranz [Thu, 18 Dec 2008 13:08:44 +0000 (13:08 +0000)]
now that /environment/weather-scenario is respected at startup, we
actually have to set it to get live weather.
--enable-real-weather-fetch shall imply weather-sceneario=METAR.
fredb [Thu, 18 Dec 2008 06:52:51 +0000 (06:52 +0000)]
James Turner : in the 'tower' view, where the tower position is explicitly given in apt.dat (most of the larger airports), I was incorrectly treating the tower elevation as ASL, when it's AGL.
fredb [Fri, 12 Dec 2008 07:35:39 +0000 (07:35 +0000)]
Really catch sound exceptions, and avoid exiting on this kind of error :
OpenAL error (AL_INVALID_VALUE): constructor (alBufferData)
Failed to buffer data.
fredb [Thu, 11 Dec 2008 08:24:58 +0000 (08:24 +0000)]
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.
fredb [Tue, 9 Dec 2008 08:10:33 +0000 (08:10 +0000)]
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.
fredb [Tue, 9 Dec 2008 07:58:46 +0000 (07:58 +0000)]
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
fredb [Sat, 6 Dec 2008 23:03:12 +0000 (23:03 +0000)]
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.
fredb [Thu, 4 Dec 2008 20:56:40 +0000 (20:56 +0000)]
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.
mfranz [Thu, 4 Dec 2008 18:47:49 +0000 (18:47 +0000)]
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)
fredb [Thu, 4 Dec 2008 08:29:36 +0000 (08:29 +0000)]
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
fredb [Wed, 3 Dec 2008 20:03:46 +0000 (20:03 +0000)]
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.
curt [Mon, 1 Dec 2008 16:13:12 +0000 (16:13 +0000)]
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.
mfranz [Wed, 26 Nov 2008 11:34:35 +0000 (11:34 +0000)]
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.
mfranz [Tue, 25 Nov 2008 14:32:39 +0000 (14:32 +0000)]
- 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
timoore [Thu, 20 Nov 2008 11:01:05 +0000 (11:01 +0000)]
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!
mfranz [Wed, 19 Nov 2008 15:59:54 +0000 (15:59 +0000)]
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:
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.
mfranz [Wed, 19 Nov 2008 07:46:10 +0000 (07:46 +0000)]
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.
timoore [Tue, 18 Nov 2008 22:45:57 +0000 (22:45 +0000)]
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.
durk [Sun, 16 Nov 2008 13:41:24 +0000 (13:41 +0000)]
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)