Apparently most filters are only filtering on type - we weren't running the filter body for navaid or comm-station lookups, causing weird ATIS bugs. Ensure that we actually run the filter at the point we have an FGPositioned* result.
An upcoming commit will make the sound headers standalone, and no longer include various other headers / using std:: declarations. Prepare for this by making includes and usage of namespaces explicit.
Make subsystems create-able and removable from commands. Only some subsystems are supported so far, since many have non-default constructors or other complexities.
With this, change, it's possible to dynamically add and remove the traffic-manager at runtime, for example: fgcommand("add-subsystem", props.Node.new({ "subsystem": "traffic-manager", "name":"traffic-manager", "do-bind-init":1}));
For (future) easier testing of the sim, support a mode where only explicitly named config / option files are loaded, instead of the default ones. (Including, for example, preferences.xml). This currently produces a non-functional sim, but will soon be more useful :)
No behaviour should change unless you try the new option.
FGControls create/init/bind order was incorrect, causing initial property tree state to get over-written. Restructure the code so bind() sees correct values.
- kHz/mHz conversion needs factor 1000 not 100
- Correctly read name for CommStations from NavCache
- Fix parsing CommStation names from apt.dat (Name
can contain spaces)
The Flight-plan leg data computation was omitting certain data for the final waypoint, which in turn made some of the route-manager data bogus when flying the final leg. Fill in some sensible values which we can compute.
Using a tied property works only for one single usage of the
property. In reality FGATIS is normally instantiated four
times (nav/comm/1/2) where only the first instantiation
works correctly. All subsequent instantions fail to tie
and show some error messages.
Also tied properties shouldn't be used anymore.
- Redraw all canvases in the frame OpenVG is initialized.
Otherwise if multiple canvases are created in the same frame
only one of them would get correctly updated.
If OpenVG/ShivaVG is initialized nothing is drawn in the same
frame, therefore we need to draw another frame to ensure all
paths are rendered correctly.
Avoid the application becoming unresponsive during nav-cache rebuilds. We still have to wait for the rebuild, but perform it on a helper thread so the main GUI thread stays responsive and hence doesn't trigger a beach-ball / 'not responding' alert. Also ensures there's some feedback (the spinner) during the rebuild operation, so users don't think we've hung.
In preparation for caching the groundnet in the NavCache, make taxi-nodes and parkings inherit from FGPositioned. As part of this, make them heap (as opposed to value) classes, disable their copy-constructors, remove many mutating operations, and give them real constructors.
New commands request-metar and clear-metar will bind metar reports to an arbitrary property tree path. E.g:
fgcommand("request-metar", var n = props.Node.new({ "path": "/foo/mymetar", "station":"LOWI"}));
- Only render the canvas if something has actually changed
(Currently checked by looking for modified properties).
- Only write bounding box to property tree if it has been
recalculated (until now this happened every frame).
Low spin or switched off gyros result in the indicator being stuck.
When the gyros are repowered, the indication doesn't jump to the correct
indication, but keeps the current error.
so they can instantly adjust to the changed environment.
(Not fully working yet, since some environment settings, like environemnt
pressure/temperature, still changes slowly after a sim reset - instead of
immediately jumping to the new setting. Also, METAR sometimes arrives too
late...).
In advance of converting the Map and NavDisplay to use the canvas, expose the full route-path vector for each flight plan leg, as a vector on the leg. Use leg.path() to get this.
E.g.:
var fp = flightplan();
for (var i=0; i<fp.getPlanSize(); i += 1)
{
var leg = fp.getWP(i);
debug.dump(leg.path());
}
Break some subsystem dependencies, by explicitly using properties to read the primary position, orientation and velocities. (Instead of directly accessing the primary model placement). This means a couple more globals can die.
Keep distro packagers happy by having the option to use the system's sqlite library instead of our bundled version. Set SYSTEM_SQLITE=1 when running cmake to use the system one.
Cache the parsed navigation and airport data in a binary file to reduce
startup times and memory consumption (since only referenced FGPositioned
elements are held in memory).
Data will be reimported when the mod-time of any input file is changed.
If a global file is changed (nav.dat, awy.dat, apt.dat, etc), the cache
will be completely rebuilt, which takes approximately 30 seconds on
moderate hardware. (Future work may reduce this).
Various classes derive from SubsystemGroup, but extend the init behaviour. Fix those for the incremental init scheme, generally by forcing their init to be atomic. Can convert them to be truly incremental in the future if it's needed, but probably not.
Currently if a SGPropertyNode is removed from the property tree
only for this single node a childRemoved event is triggered. So
if we just check for a specific child to be removed, we will never
be notified. This commit manually triggers the event recursively
for all children but this should probably go directly into simgear.
Separate other init functions from position init, since they are unrelated, and made fg_init.cxx very complex. Next step will be brining some sanity to the position init logic :)
(Requires latest SimGear!)
Break fgInitSubsystems into several phases - subsystem creation, then binding and then init. Run init over multiple main-loop iterations so the application stays responsive to GUI/OS events during init.
There should be no behaviour changes due to this, except that during init Windows and OS-X should no longer show the beach ball / 'application not responding feedback', hopefully.
Remove various hacks and make magvar work like a normal subsystem, as part of the environment manager. Fix the remaining users of the globals->get_mag accessor, and hence kill off the global pointer.
Unit is spoken for all values <1000hPa (to avoid confusion with inHg).
Unit is not spoken for values >=1000hPa (but don't drop highest digit).
(And we should replace "millibars" with "hectopascal" - we're missing the
necessary voice sample though.)
- property-interpolate now supports specifying the
interpolation time by passing rate instead of the actual time,
similar to max-rate-of-change in the noise-spike filter.
Something after FG 2.8.0 has broken loading aircraft models from
--fg-aircraft directories. Issue is fixed by resolving the aircraft path
in FGAircraftModel (though this module itself hasn't changed and things
were working before...).
- Groups store property nodes for different styles and pass them
to child elements on creation (No dynamic updates yet)
- Use StyleSetter map instead of loads of if/else if statements
for setting element styles.
- Unify element style properties (Only use one property, instead
of multiple like it has been with colors)
- Fix: Create only one element per property node (Was two)
This might need to be back-ported to 2.8 (to make a 2.8.1), unless it's been exposed by some of my other changes. Which I think is unlikely but not impossible.
so package builders don't need local patches.
Also, instead of hardcoded firefox, use "xdg-open" or "sensible-browser"
launchers on Linux, to auto-detect user's preferred browser.
Override with cmake switch -DWEB_BROWSER=...
(Not affecting Mac/Win which are hard-coded anyway).
- Use bounding box intersections to determine which element is
hit.
- Transform mouse coordinates to local coordinates.
- Try to get osgText bounding box correct (or at least better)
- Refactor and unify common functionality of canvas::Window and
canvas::Image
- Make canvas::Image actually work
- Allow using canvases inside canvas::Image
* Use new canvas:// "protocol" to allow using canvases in
place of images
- Prepare for categorizing canvases:
* Move canvases to /canvas/by-index
* Later support linking to other nodes in subbranches of
/canvas
- Add platform independent clipboard layer for Nasal access
to clipboard (thanks to Hooray for basic code)
- Add Windows clipboard access
- Add partial X11 clipboard access (only reading from clipboard)
- Add fallback clipboard for application internal clipboard if
platform not supported
- Add some helper functions to FGNasalSys
This code is non-functional, but contains most of the stubs to show what's required to add property get/set access, convert to from ghost & C++ types, and manage ownership. Element derived classes & inheritance (e.g., methods on image/path/map elements) will follow, along with some actual functionality!
- Refactor CanvasMgr into PropertyBasedMgr to be also used
for the Canvas GUI system.
- Get rid of tied properties in the Canvas system.
- Add new placement type 'window' for placing canvases onto
windows
- Pass mouse events to Window class (only if cursor is over
window)
- Refactor canvas placement clean up
- Allow hiding objects
- Use UTF-8 encoding for text elements
- Add paramter max-width to text elements
- Support stroke-linecap for path elements
- Fix mouse coords
- Set better mipmap filter
- The new map element automatically transforms geo coordinates
(lat, lon) to the according screen coordinates.
- Currently one type of projection is supported
(Sanson-Flamsteed projection)