ehofman [Sun, 29 Mar 2009 11:41:45 +0000 (11:41 +0000)]
Adding ambient support for ac3d aircraft models reveiled a mistake in the scne ambient calculation. Decreasing visibility now increases ambient color giving a nice dark color on bright days and a much more visible color on normal days.
ehofman [Fri, 27 Mar 2009 11:44:33 +0000 (11:44 +0000)]
Fixes:
* line 343: comparison between signed and unsigned integer expressions
* line 441: 'lon', 'lat', 'slr' and 'alt' might be used uninitialized
* line 565: enumeration value 'etUnknown' not handled in switch
durk [Sun, 22 Mar 2009 13:49:51 +0000 (13:49 +0000)]
Allow the AI Traffic controller to set a transponder code. This code is
used in ATC chatter, and writted to the property, so it can -in principle-
be picked up by the radar.
mfranz [Tue, 17 Mar 2009 22:01:34 +0000 (22:01 +0000)]
wxradar: read aircraft data from the property tree, rather than AIBase
This allows to display objects that are in /ai/models/, but not managed
by the AI manager, and it follows fgfs' design principle that subsystems
should communicate over the property tree (if possible). This is a tad
slower, but the radar is only updated once every second.
frohlich [Tue, 17 Mar 2009 06:51:48 +0000 (06:51 +0000)]
Fix a problem with two concurent 'round to multiple of basic simulation
time' code paths. The problem may lead to skipped fdm updates at very high
frame rates. The most visible effect of that was that the aircraft
slips backwards wrt the forward moving carrier.
Remove unused stuff.
frohlich [Mon, 16 Mar 2009 09:47:59 +0000 (09:47 +0000)]
Make use of the fast bv intersection tests even for the croaser altitude
queries. This also fixes some issues with the carrier and the croaser
altitude values that is used when no hit is found.
Include some ifdefed out debugging code, that might be interresting.
torsten [Mon, 9 Mar 2009 22:25:51 +0000 (22:25 +0000)]
Make hardcoded error values configurable.
This patch introduces the optional elements
<config>
<spin-thresh>0.8</spin-thresh>
<max-roll-error-deg>40</max-roll-error-deg>
<max-pitch-error-deg>12</max-pitch-error-deg>
</config>
under the corresponding /instrumentation/attitude-indicator element.
The values are initialized to the shown default values if omitted.
These are the values of the former hardcoded constants.
durk [Sun, 8 Mar 2009 17:14:05 +0000 (17:14 +0000)]
A set of additions related to allow the use of SID and STAR procedures.
The current code still has some rough edges, in particular memory still
needs to be deallocated where possible, and the actual use of the code
needs more testing. This code has been running without noticable problems,
so I think it's ready for some wider exposure. Detailed changes include:
- Finetuning of the SID/STAR data concept.
- Preloading of all SIDs, from one xml file.
- ATC determines which SID should be used and echoes this over the com1 or
com2 radio.
frohlich [Fri, 6 Mar 2009 16:37:12 +0000 (16:37 +0000)]
Update groundcache api:
Make leaner interfaces to the groundcache.
Remove legacy interfaces.
Update users of them.
Add new query routines for 'nearest point' and 'body with given id'.
durk [Sun, 1 Mar 2009 09:58:12 +0000 (09:58 +0000)]
Some initial code for AI Aircraft making use of SIDs. Current code is a bit
experimental: Only one SID per runway is supported, and the waypoints are
read from file at every request, which is not very efficient. The current
code is only executed when FlightGear is configured to use airport dynamics
data from the scenery repository, instead of the base package. Since the
latter is still the default, I believe that this will provide enough safe-
guarding to commit SID/STAR support in small, incremental steps.
Next step will be buffering and support for multiple departure routes per
runway.
torsten [Sat, 28 Feb 2009 20:19:39 +0000 (20:19 +0000)]
Added support for <condition> elements under <enable> elements.
The old <prop> and <value> elements are still supported but ignored, if a <condition> element exists.
Also for the DigitalFilter
torsten [Sat, 28 Feb 2009 16:16:13 +0000 (16:16 +0000)]
Added support for <condition> elements under <enable> elements.
The old <prop> and <value> elements are still supported but ignored, if a <condition> element exists.
andy [Tue, 24 Feb 2009 00:16:03 +0000 (00:16 +0000)]
"min throttle" tunable from Maik:
Background are problems modeling the rotax 912 engine. The idle speed
of the real engine is about half of the speed I could achieve with the
default minimum manifold pressure. While on ground I can switch off
the engine by pulling the throttle. The audible difference between the
different minimum idle speed (real vs. simulated) is extreme. With the
patch I get quite realistic sound. For the rotax engine I use
min-throttle="0.05" which is half of the former default value.
mfranz [Sun, 15 Feb 2009 22:49:51 +0000 (22:49 +0000)]
add /sim/time/real/ (local machine time) analog to /sim/time/utc/
localtime() is once commented out in simgear/io/sg_binobj.cxx and
a warning says the it can screw up sim time. This is only because
localtime() isn't thread-safe (and its thread-safe cousin localtime_r()
isn't portable). As long as all timing is done in the main thread
(which is the case) there should be no problem. Otherwise we'd have
to implement a simple mutex locked wrapper.
durk [Sun, 15 Feb 2009 15:29:56 +0000 (15:29 +0000)]
One step further toward better integration of AI and ATC systems.
* Changed the runway XX. ATC message to actually report the real
designated departure runway
* In case of multiple active runways, select the one with a heading that is
closest to the direction of the ultimate departure destination / lines up
with the arrival path.
Tim Moore [Thu, 12 Feb 2009 14:43:05 +0000 (15:43 +0100)]
Use OSG polytope intersector to fill ground cache
This gets rid of a lot of messy code. Although the performance is about
the same as the old code, there is the possibility of a big performance
boost if/when the polytope intersector is taught about KD trees.
mfranz [Sat, 7 Feb 2009 23:52:12 +0000 (23:52 +0000)]
- pass return values in set{,Bool,Int,Double}Value() and setprop()
- make some char* "const" to silence warnings
This removes the warning that (rarely) occurred if one wrote to a
write protected property with setprop(). While this was a useful
hint, it needlessly floods the terminal if one protected a property
intentionally. (Consider to add an SG_DEBUG warning instead.) It's
now the caller's job to check for the result if it actually cares.