ehofman [Wed, 22 Mar 2006 13:32:32 +0000 (13:32 +0000)]
Jon Berndt:
I had inadvertently terminated a data line when reaching a tab character after
initial data was supplied. I tested the lightning file and it now appears to
read in correctly.
mfranz [Wed, 22 Mar 2006 10:56:49 +0000 (10:56 +0000)]
puList.cxx: _list_box->getIntegerValue() returns -1 as long as no list
entry was selected. Return 0 in this case, not an invalid string address
(causing segfaults).
dialogs.cxx: don't set property if no list entry was chosen.
daveluff [Tue, 21 Mar 2006 23:33:54 +0000 (23:33 +0000)]
This innocuous looking typo was crashing the sim whenever an AI plane was asked to follow the user whilst the user was flying a circuit (non straight-in) approach
mfranz [Mon, 20 Mar 2006 12:10:20 +0000 (12:10 +0000)]
extract loop body into separate function to later allow model addition
at runtime; remove Nasal support for now (the model loader is currently
initialized before the Nasal subsystem is available)
durk [Sun, 19 Mar 2006 07:41:48 +0000 (07:41 +0000)]
Bugfixes and feature improvements related to AI auto flightplan generation.
When AIFlightPlanCreateTaxi() function is called with the firstFlight
argument set to true, this is supposed to handle situations where the
the aircraft's timetable indicates it should have left between about 5 to
20 minutes earlier. In the previous version, all these aircraft started
taxiing from the first parking location available in the network, due
to the fact that the variable gateId was not assigned a value. In this
patch, route tracing starts from an assigned gate and the network node
following code is fast forwarded to a random location along the taxiways
to give a more realistic and natural distribution of taxiing aircraft
after startup.
This patch further addresses some weird ballet-dancing behavior that
aircraft were showing just prior to/right after parking and which was
related to a number of more or less duplicate waypoints in the transition
from createTaxi() to createParking() to createPushBack() to createTaxi().
Finally, a blatant typing error in the getParking() function was fixed.
durk [Sat, 11 Mar 2006 18:14:48 +0000 (18:14 +0000)]
Bugfix: Non-existent AIModels could trigger a request to load scenery tiles
at (lon, lat) coordinates -1000,0. This patch fixes the AIModels/Traffic
Manager side of things. The AIModels subsystems allowed the creation of
AIAircraft with non-existent 3D models. If such a model didn't exist, the
aip class didn't get initialized, resulting in the above-mentioned bogus
position information. Here I circumvent this problem by a) only interacting
with the tile loader if the model is visible (and hence has succesfully been
initialized) and b) by disallowing the traffic manager to create AIAircraft
objects if the path to the 3D model doesn't exist.
andy [Fri, 10 Mar 2006 22:21:42 +0000 (22:21 +0000)]
While I had the valgrind rig set up, I took the opportunity to plug a
bunch of memory leaks that had accumulated over the years. FlightGear
doesn't currently bother to destroy and recreate a YASim context, but
at least it can do so now without worry.
andy [Fri, 10 Mar 2006 19:47:23 +0000 (19:47 +0000)]
Fix an uninitialized data condition that crept in during the recent
groundcache addition -- the ground callback doesn't do anything at
solution time, so the ground plane was unset. Valgrind was whining
about this; it's not clear that it was actually causing a problem.
andy [Fri, 10 Mar 2006 19:46:16 +0000 (19:46 +0000)]
When we are asked to produce no force on a Surface (e.g. a weight that
is "off"), make sure the force is actually zero. Kind of a hack -- a
better idea would be flag to set at a higher level.
frohlich [Fri, 10 Mar 2006 07:13:59 +0000 (07:13 +0000)]
We need to flush all pending mouse move events past a mouse warp to avoid
a race condition ending in warping twice and having huge increments for the
second warp.
I am not aware of such a flush function in glut. So we emulate that by
ignoring mouse move events between a warp mouse and the next frame.
That should make glut behavour aequivalent to sdl behavour.
mfranz [Thu, 9 Mar 2006 13:30:28 +0000 (13:30 +0000)]
check if the "nasal" subsystem is still there, and only call <unload> then.
This isn't the case if the model is destroyed on fgfs exit. To make <unload>
work under these circumstances, one would have to reorder subsystem removal,
but this doesn't seem overly useful, so we'll do it when we really need it.
mfranz [Thu, 9 Mar 2006 11:14:16 +0000 (11:14 +0000)]
add <load>/<unload> support to AI models, including aircraft models. For
aircraft models this is only called if they are loaded as AI, not if they
are the model flown by the human pilot. This has technical reasons (too
soon for Nasal/fg), but is useful to distinguish AI and non-AI use, for
example to set a different livery for AI models, or to set different
animation properties.
mfranz [Thu, 9 Mar 2006 09:04:03 +0000 (09:04 +0000)]
NasalSys.[ch]xx:
implement FGNasalModelData class for execution of XML <load> and <unload>
scripts. modelLoaded() is called by the model loader, and the destructor
on branch removal.
modelmgr.cxx:
tilemgr.cxx:
tileentry.[ch]xx:
make scenery and custom objects run their Nasal scripts on loading
and unloading. Let OBJECT_STATIC object not be cached.
mfranz [Wed, 8 Mar 2006 16:06:32 +0000 (16:06 +0000)]
crashfix: handleCommand() is called from other modules (input callbacks,
fgcommands from C++ or GUI), so we need a separate context here. (See
also solution in FGNasalListener::valueChanged)
mfranz [Wed, 8 Mar 2006 10:44:46 +0000 (10:44 +0000)]
add support for <nasal> blocks <open> and <close> in XML dialogs:
<nasal>
<open>print("I'm called on dialog open")</open>
<close>print("I'm called on dialog close")</close>
</nasal>
All Nasal runs in a dialog namespace, so that variables and functions
defined in the <open> block can be used in <binding>s, etc. This is
especially useful for <radio> button handling. See "location-in-air.xml".
mfranz [Tue, 7 Mar 2006 10:26:25 +0000 (10:26 +0000)]
Jean-Yves Lefort: fix "crash" on exit
mf:
pthread_cancel doesn't seem to work correctly on all supported platforms.
It apparently causes SGBlockingQueue::pop() to correctly leave the thread on
the cancellation point pthread_wait(), but the SGGuard() destructor isn't
called, so the queue mutex remains locked. This triggered an assert() on
pthread_join(). This patch uses an empty ICAO request as signal for the
thread to terminate itself.
daveluff [Sun, 5 Mar 2006 16:49:20 +0000 (16:49 +0000)]
Add the MAXNI IAF to the C83 approach, and add a few guards against not finding the fixes in the data. I realise that tweaking a hard-coded approach seems daft when loading approach data from file is high on the TODO, but I'm using C83 as an example for a readme so it may as well match the published chart properly...
fredb [Sat, 4 Mar 2006 20:21:32 +0000 (20:21 +0000)]
Jean-Yves Lefort :
I have implemented a Honeywell MK VIII EGPWS emulation for FlightGear.
The MK VIII is an Enhanced Ground Proximity Warning System aimed at
regional turboprop and small turbofan aircrafts such as the Citation,
Citation Bravo, B1900D, Beechcraft 99 and L410.
Frederic Bouvier:
make the MSVC compilation possible. Rearrange base package directories.
durk [Sat, 4 Mar 2006 08:49:36 +0000 (08:49 +0000)]
Improved selection of active runway (currently AI traffic only).
The original code selected the most preferable runway combination,
regardless of which combination was currently active. This patch
builds in some additional resistance against change, by keeping
track of which runways are already in use, and forces a change
in active runways only when new (wheather/time of day) conditions
force it to do so, resulting in much more consistent runway assignment.
behavior.
mfranz [Fri, 3 Mar 2006 19:43:41 +0000 (19:43 +0000)]
improve error message: if festival doesn't seem to be listening, then it's
probably blocked by not being able to open a sound device (because fgfs is
using the only available device already).
mfranz [Thu, 2 Mar 2006 10:41:48 +0000 (10:41 +0000)]
let removelistener() return the number of remaining Nasal listeners. (We
need to return nil for errors and something else for success, so we can
as well return something (remotely) useful.)
andy [Wed, 1 Mar 2006 22:59:58 +0000 (22:59 +0000)]
Fixes a bugs in the handling of the holdback mount point (by Mathias),
and in the calculation of the launchbar angle (by Vivian).
It also calculates the holdback angle, and sets a Boolean value which
can be used to initiate the release of the catapult strop submodel at
the appropriate moment (new code by Vivian).
andy [Mon, 27 Feb 2006 23:35:02 +0000 (23:35 +0000)]
Inspired by a patch from Vivian, this adds a settable "WASTEGATE"
control to piston engines that allows external scripts to control the
turbo/supercharger boost programatically by setting this axis to
values in the range [0:1]. It also adds a "turbo-lag" attribute (a
time in seconds) to engines implementing turbocharger spooling delays.
This isn't terribly well tested, but doesn't seem to have broken
anything.
david [Mon, 27 Feb 2006 02:24:14 +0000 (02:24 +0000)]
Change from Dave Perry:
I am attaching a trivial patch that changes the normalization from 24 to
12 in turn_indicator.cxx. With this change, the pa24 tc has a turn
indicator spin value in the property tree of 0.9996 and the same value
for the pa28-161 is 1.0, so there is no harm to a 24 volt electrical
system in this change. Should the battery or alternator put out a lower
voltage than 12 volts, the spin value goes down and the tc shows a
negative turn that increases as the voltage gets less. This file shows
you as the author. If you are comfortable with this change, commit it
to cvs and the tc will be correct even for 12 volt systems.
david [Sun, 26 Feb 2006 16:46:51 +0000 (16:46 +0000)]
Allow YASim flight models to override the hard-coded fine and coarse
propeller pitch stops for constant speed propellers. The default
values are the same as the previous hard-coded values. The new
attributes, "fine-stop" and "coarse-stop", are documented in the base
package, Docs/README.yasim.
durk [Thu, 23 Feb 2006 21:42:11 +0000 (21:42 +0000)]
Bugfix: variable fp was deleted in both AIBase::~AIBase() and AIAircraft::AIAircraft(), resulting in a segmentation fault.
Here the delete fp; statement is removed from the AIAircraft() destructor.
daveluff [Wed, 22 Feb 2006 19:21:29 +0000 (19:21 +0000)]
A couple of hacks to fix cygwin compilation. These may not be the correct fix, but they prevent new cygwin users getting an almost instant compile error following make