James Turner [Wed, 28 Nov 2012 13:41:58 +0000 (13:41 +0000)]
Bug 926
Disable elevation mixup for naiads, since it is introducing inconsistencies between the navdata and the scenery. (Actually it's exposing inconsistencies between the airport and navaid data, but that can't be fixed right now)
James Turner [Tue, 27 Nov 2012 22:42:46 +0000 (22:42 +0000)]
Bug #927 - flightplan XML loading.
This bug was caused by the code not tolerating missing navaids / waypoints. Update logic so missing navaids degenerate to basic waypoints without problem. Also tolerate present, but empty, runway properties - don't throw an exception by looking up empty identifiers.
ThorstenB [Tue, 27 Nov 2012 20:02:32 +0000 (21:02 +0100)]
Fix FGAIFlightPlan waypoint issues
Iterator must be reset after clearing waypoint list.
Deleting "*waypoint.end()" doesn't delete the last waypoint (end()-1
does - it is never actually used though).
James Turner [Tue, 27 Nov 2012 18:17:59 +0000 (18:17 +0000)]
Add the scenery paths to the DB, and check them.
When the scenery paths change, we need to rebuild the nab-cache, since Airports/ data may have changed - e.g. someone installing custom scenery with updated ILS / thresholds.
James Turner [Tue, 27 Nov 2012 17:34:52 +0000 (17:34 +0000)]
Handle DB-locked errors.
When multiple processes (right now, multiple copies of fgfs, but potentially other users in the future) access the navcache, it can cause SQLite to return a 'locked' error, so the request should be re-tried. Add code to do this.
ThorstenB [Mon, 26 Nov 2012 23:02:28 +0000 (00:02 +0100)]
Base fullscreen detection on window decoration
rather than window size, since the size of full screen windows can change:
e.g. Xinerama mode automatically resizes fullscreen windows to cover the
area belonging to a single display only - so the
"(Xinerama) screen area == window size" check always failed - even in
fullscreen mode.
ThorstenB [Sun, 25 Nov 2012 23:23:10 +0000 (00:23 +0100)]
Fix a couple of 64-bit warnings identified by GCC.
PositionedID is of "int64_t", which depends on platform: apparently it is
"long long int" for Mac (requiring %lld format), but it is "long int" for
64bit Linux (requiring %ld). To avoid a "compiler warning fix commit
war" ;-) use a type cast to the longest common type (long long int).
James Turner [Sun, 25 Nov 2012 21:37:15 +0000 (21:37 +0000)]
Work on AIAircraft gear animation.
Inspired by Harald's patch, attempt to get AI models show realistic gear animations. Unfortunately AI models seem to be ignoring the gear properties, so keeping the code disabled until I can trace down why.
ThorstenB [Sun, 25 Nov 2012 15:41:10 +0000 (16:41 +0100)]
Traffic: preemptable flight scheduling
FGAISchedule::update can be time consuming. Preempt when necessary to
avoid simulation lags, and call it every sim iteration, until the flight
plan is complete.
James Turner [Sat, 24 Nov 2012 12:14:56 +0000 (12:14 +0000)]
Fix some groundnet cache issues.
ThorstenB identified some cases where mod-times changing could lead to corrupted ground-cache data in the DB - handle both of these. What's still unclear is why the mod-times changes; hopefully the additional debug info will reveal this.
ThorstenB [Sat, 24 Nov 2012 11:42:31 +0000 (12:42 +0100)]
Traffic performance: add airport memory cache
to avoid repeating identical NavCache/SQL queries. Also ensures we're
not using multiple FGAirport instances for an airport - each triggering
identical queries to pull in airport data.
Airports by ICAO ID are requested very frequently at run-time, so caching
significantly boosts performance.
ThorstenB [Sat, 24 Nov 2012 11:06:20 +0000 (12:06 +0100)]
Traffic performance: cache track length
Track length is calculate every iteration/for every aircraft. Since some
tracks have hundreds of waypoints, calculation is slow. Cache the
track length between the waypoints ahead, so it rarely needs to be
recalculated.
James Turner [Wed, 21 Nov 2012 14:49:34 +0000 (14:49 +0000)]
Break upwards dependency on Traffic in the AI code
AIManager had unfortunate code to pass some state to the traffic-manager; this is no longer required since traffic schedules hold onto their AI-Aircraft directly as needed.
James Turner [Tue, 20 Nov 2012 13:32:10 +0000 (13:32 +0000)]
Make PUI menu-bar reinit safe.
Was only cleaning up the PUI menubar, not old bindings / names. This led to duplicate bindings, each time the GUI was reset, which can happen for various reasons.
ThorstenB [Sun, 18 Nov 2012 15:35:54 +0000 (16:35 +0100)]
Remove static property dependencies
preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
ThorstenB [Sat, 17 Nov 2012 19:01:19 +0000 (20:01 +0100)]
#600, for Curt... ;-) allow speed-up value to use fractions
"speed-up" can now also be used for slow-motion (i.e. 0.5 / 0.25 / ...)
or fractional speeds (3.141...). This was already working for instruments
(for replay) before, now it's also considered by FDM simulation.
James Turner [Sat, 17 Nov 2012 18:10:15 +0000 (18:10 +0000)]
Support request body on xmlhttprequest.
Allow XML property data to be submitted with a request; changes the request method from GET to POST. Supply nodes via the 'body' argument to the command.
James Turner [Fri, 16 Nov 2012 16:43:54 +0000 (16:43 +0000)]
Further work on bug 905.
Tolerate Octree leaf children which have been moved outside their leaf's BBox. This is necessary since lazy-loading of ILS and threshold files can cause re-locations even during child traversal, where updating the hierarchy is very complex. Instead, simply tolerate this case, and rely on the real position data (which is correct).
James Turner [Mon, 12 Nov 2012 21:30:28 +0000 (22:30 +0100)]
Support for creating default SID/approach.
Durk reminded me of this - when we're missing procedures data (the common case), synthesise a plausible (but possibly dangerously unrealistic) departure and approach. Will work fine for airports in gentle terrain, and likely kill you at challenging airports. You have been warned.
ThorstenB [Sat, 10 Nov 2012 20:25:31 +0000 (21:25 +0100)]
Extended replay and flight recording system
Save/restore replay sessions.
Replay system message support, so recorded flights can be turned into
flight tutorials.
James Turner [Sat, 10 Nov 2012 14:48:00 +0000 (14:48 +0000)]
Fix bug 905.
When a position is modified for an in-cache FGPositioned, we need to update the runtime information too, or the Octree code may (rightly) complain that it's seeing inconsistent data. Also make the Octree check an exception throw, and verbose, so this is easier to detect in the future.
ThorstenB [Thu, 1 Nov 2012 14:31:05 +0000 (15:31 +0100)]
Jean Pellotier: don't show markers for invalid targets in HUD
Don't show invalid AI/MP models in the HUD (after they were removed from
the scene).
Also, when a radar is installed, consider radar/in-range for HUD display.
ThorstenB [Thu, 1 Nov 2012 13:35:17 +0000 (14:35 +0100)]
#903: generic protocol: fix a rare corner case
ASCII protocols consisting of a single chunk only (one variable per line)
would not work when no "separator" was defined.
Also add error message for protocols with more than one var per line which
are missing a separator...