James Turner [Mon, 28 Jan 2013 23:35:44 +0000 (23:35 +0000)]
Bug #385 - enable the Ati viewport hack on next.
Enabling this hack by default, to assess the impact for everyone. Should fix the issue for Ati Catalyst 11.5 users, and hopefully no impact for everyone else. All feedback appreciated. Set /sim/ati-viewport-hack to false if you think this option might be causing issues for you (and then tell James, ASAP)
calculate /systems/pitot/total-pressure on the bases of /velocities/mach
added measured-total-pressure property to account for a normal
shockwave in front of pitot tube at supersonic speeds. momentarily not
used
small unit conversion correction of inHg to hPa in altimeter
Base airspeed calculations on impact pressure in instrumentation
/airspeed_indicator
James Turner [Sun, 6 Jan 2013 20:34:34 +0000 (20:34 +0000)]
NavCache: fix an issue reloading ground-nets.
AndersG noticed an issue when a ground-net file is edited. The DROP commands prior to the reload were wrong, fixed now to delete all ground-net entries before the file is read.
James Turner [Tue, 1 Jan 2013 13:49:12 +0000 (13:49 +0000)]
Tweak normalisation of route-path segments.
KATL -> KLAX looks correct now. Great-circles that span the 180-meridian are still rendered wrong, but that's a map projection issues, which I will fix in the next few days.
James Turner [Mon, 31 Dec 2012 17:39:52 +0000 (17:39 +0000)]
Flightplan delegate hook for clearing the FP.
This allows delegates to take action when the flightlan is cleared, and especially, for the default delegate in the route-manager to deactivate itself, and hence the GPS LEG mode - which fixes bug 940 I hope.
James Turner [Mon, 31 Dec 2012 17:21:05 +0000 (17:21 +0000)]
Fix route-path display of long legs.
When leg spans more than a threshold (currently 0.5 degrees) of longitude, interpolate the actual path flown by the GPS/RM, which is a true great-circle. Previous we rendered a Rhumb line which does not agree at all. (Especially noticeable in the MapWidget and NavDisplay code, both of which use RoutePath to tesselate the route before rendering)
James Turner [Sun, 30 Dec 2012 17:01:48 +0000 (17:01 +0000)]
NavDisplay: time-bound the spatial query.
At large search ranges (320 or 640NM range on the 777), the search time can blow up, especially if distant airports are being loaded. Add a time-bounded spatial query, and use it, so performance stays tolerable.
James Turner [Sun, 30 Dec 2012 16:12:11 +0000 (16:12 +0000)]
Fix auto-routing by airways.
When the from and to points are not on the enroute structure, check the initial and final legs for large turns (more than 90-degrees) from the overall route course. If found, kill the leg, to generate more natural route and avoid very sharp turns in the terminal area.
James Turner [Sun, 30 Dec 2012 15:37:25 +0000 (15:37 +0000)]
Nicer default SID and approach procedures.
Note these are still generic and do NOT take local terrain into account. Don't come crying to me if you fly into nearby terrain because you weren't using a real procedure!
James Turner [Sat, 29 Dec 2012 13:45:27 +0000 (13:45 +0000)]
Bug 974, GPS exceptions at end-of-route.
One of the two route termination conditions was improperly handled, leading to bad leg/wpt indices and exceptions from the GPS code. Detect passing the final waypoint in a more robust way now.
Also fix the GPS code to avoid turn computation on the final leg.
James Turner [Sat, 29 Dec 2012 12:16:51 +0000 (12:16 +0000)]
Bug #923 : repeatable flag set on input reload.
Clean-up how axes and button bindings are destroyed are re-built on reinit of the FGJoystickInput subsystem, so we get new, cleanly initialised items each time.
James Turner [Mon, 24 Dec 2012 17:42:23 +0000 (17:42 +0000)]
Make PLAN mode in Boeing NDs possible.
Allow the location of the ND centre to be set from properties instead of always using the acct position.
(I thought I'd supported this option long ago, evidently not)
James Turner [Sun, 23 Dec 2012 23:32:53 +0000 (23:32 +0000)]
Revised cache transaction handling.
Use a RAII object to manage cache transactions, and reset queries immediately after they are done, to avoid auto-commit transactions lasting long periods of time. Re-write the commit and step logic to handle SQLITE_BUSY, with progressively increasing waits when there is DB contention (multiple processes accessing the DB).
James Turner [Tue, 18 Dec 2012 10:23:44 +0000 (10:23 +0000)]
Support partial all-within-range spatial queries.
As an opt-in API, allow clients to request partial results, with a time-bounded cutoff. Use this to keep the MapWidget responsive even when many airports are being added to the cache (e.g., zooming out or panning rapidly when zoomed out)
James Turner [Sat, 15 Dec 2012 15:25:45 +0000 (15:25 +0000)]
Restructure positional finalisation for sim-reset.
Make position finalisation happen in the same phase as scenery load, i.e as a task during the main loop, instead of during the init loop. This is compatible with the existing reset logic. Unfortunately more work is needed; the environment code doesn't update the local station quickly enough on reset. (Fixing that is next!)
Thomas Geymayer [Thu, 13 Dec 2012 12:52:53 +0000 (13:52 +0100)]
Allow Canvas Windows to be resized by dragging
- Setting 'resize' property to true on canvas::Window shows
resize icons and exposes requested size to the property
tree. This can be used eg. from Nasal to actually resize
the window and/or show a preview of the resized window
while resizing.
- Event handling now ignores events which have already
been handled. Before eg. clicking inside a window
also caused picking to be performed inside the
scene which is for sure not the expected behaviour.
- Also forwards scroll wheel events from canvas::Window.
James Turner [Mon, 10 Dec 2012 18:11:44 +0000 (18:11 +0000)]
Flight-path-history.
Record the historical flight-path (by default, since last takeoff). Optionally display the flight-path in the map; other visualisations (e.g., an 'in-world' view) could also be created. Nasal API to follow so Canvas-map or FMS can show the same data.
Altitude and attitude (Euler angles) are currently recorded but not used anywhere.
Thomas Geymayer [Sun, 9 Dec 2012 22:15:17 +0000 (23:15 +0100)]
CanvasWidget: Retrieve texture id every frame.
If the size of a Canvas changes also the texture id
changes. We now retrieve the texture id for the CanvasWidget
every frame to ensure it uses the latest texture instance.
James Turner [Sun, 9 Dec 2012 19:41:31 +0000 (19:41 +0000)]
Issue #809, restructure position init code.
Modify startup sequence, so position can be modified late in the startup process, right before the scenery load starts. This allows two ugly hacks to move to a permanent, less hacky location. If other position init modes required similar late evaluation in the future, this can be accommodated now.
This is a somewhat high-risk change - I've tested both carrier starts and runway-selection based on realwx METAR, but please look out for other position-init issues and test before / after this patch.
ThorstenB [Sat, 1 Dec 2012 10:01:25 +0000 (11:01 +0100)]
#946: some libraries not found on Ubuntu/Debian
Ubuntu/Debian introduced "multiarch" library directories, which is
unsupported by CMake <= 2.8.10. Add manual search paths as a workaround.
Currently it is only needed for libsvn, but it is needed for any lib
which is converted to the new directory standard.
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.