Instead of deleting all table contents, actually remove the entire file on disk and re-create. This is fractionally more work, but removes any possibility of stale indices or missing deletes causing clutter after rebuilds. My suspicion is, this is cause the erratic performance some people have seen with the airports search dialog, so will back-port to 2.10.
Comments in the code imply osgViewer always sends 'num-lock'-off codes, but that is not the observed behaviour with Cocoa. So adding mappings for the num-locked codes on Mac, which is what people actually want at the moment.
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)
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
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.
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.
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.
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)
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.
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.
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!
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.
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.
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)
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).
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)
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!)
- 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.
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.
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.
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.
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)
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.
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).
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
"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.
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.
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).