James Turner [Wed, 19 Sep 2012 17:40:34 +0000 (18:40 +0100)]
Expose the route-path of leg to Nasal.
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());
}
James Turner [Wed, 19 Sep 2012 17:17:44 +0000 (18:17 +0100)]
Kill off some globals.
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.
James Turner [Wed, 19 Sep 2012 13:28:25 +0000 (14:28 +0100)]
Allow use of the system's SQLite3 library.
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.
James Turner [Mon, 27 Aug 2012 23:26:36 +0000 (00:26 +0100)]
Implement a persistent cache for navigation data.
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).
James Turner [Wed, 19 Sep 2012 10:37:19 +0000 (11:37 +0100)]
Fix classes derived from SubsystemGroup.
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.
Thomas Geymayer [Tue, 18 Sep 2012 21:21:50 +0000 (23:21 +0200)]
Canvas: Don't crash on removing child hierarchie from map
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.
James Turner [Tue, 18 Sep 2012 19:50:28 +0000 (20:50 +0100)]
Sink position-init code into its own file.
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 :)
James Turner [Tue, 18 Sep 2012 19:29:36 +0000 (20:29 +0100)]
Make subsystem init incremental.
(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.
James Turner [Mon, 17 Sep 2012 23:58:27 +0000 (00:58 +0100)]
Make magavr a regular subsystem.
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.
Correct ATIS pressure phraseology
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.)
Thomas Geymayer [Thu, 6 Sep 2012 12:05:57 +0000 (14:05 +0200)]
property-interpolate: support using rate instead of time.
- 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.
#858: Fix loading issue with aircraft models in "--fg-aircraft" directories
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...).
Fix libsvn detection for some Linux distros
Distros like Debian/Ubuntu use architecture-specific directory structures
(like /usr/lib/x86_64-linux-gnu) which we cannot hardcode/guess, so we
really need to search the default paths.
Stuart Buchanan [Sat, 25 Aug 2012 21:23:55 +0000 (22:23 +0100)]
Stop the property tree from keeping a shadow of the deleted input properties, as it can mean that the array of bindings ends up with some incorrect name tags if the set of joystick config files changes and a given js-named entry shifts in the array. This can then result in incorrect bindings being selected.
Stuart Buchanan [Thu, 23 Aug 2012 20:52:30 +0000 (21:52 +0100)]
Add properties for raw axis and button values, for use
in joystick configuration function. Also rationalize references to
/sim/fg-home into a global property.
Thomas Geymayer [Thu, 23 Aug 2012 17:52:36 +0000 (19:52 +0200)]
Canvas: CSS like property value inheritance.
- 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)
James Turner [Tue, 21 Aug 2012 17:12:25 +0000 (18:12 +0100)]
Fix a crash encountered with ATC.
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.
ThorstenB [Sat, 18 Aug 2012 12:11:31 +0000 (14:11 +0200)]
Make web browser app configurable through CMake (for Linux)
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).
ThorstenB [Fri, 17 Aug 2012 21:58:30 +0000 (23:58 +0200)]
Christoph Korn/PlayDeb.net: man page fixes with "-" vs hyphen
This manual page seems to contain a hyphen where a minus sign was
intended. By default, "-" chars are interpreted as hyphens (U+2010) by
groff, not as minus signs (U+002D). Since options to programs use minus
signs (U+002D), this means for example in UTF-8 locales that you cannot
cut and paste options, nor search for them easily. The Debian groff
package currently forces "-" to be interpreted as a minus sign due to
the number of manual pages with this problem, but this is a
Debian-specific modification and hopefully eventually can be removed.
"-" must be escaped ("\-") to be interpreted as minus. If you really
intend a hyphen (normally you don't), write it as "\(hy" to emphasise
that fact. See groff(7) and especially groff_char(7) for details.
Thomas Geymayer [Fri, 10 Aug 2012 11:11:06 +0000 (13:11 +0200)]
Canvas: Forward mouse events to elements.
- 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)
Thomas Geymayer [Thu, 9 Aug 2012 12:50:20 +0000 (14:50 +0200)]
Canvas: Image/Window unifying and allow using canvas inside canvas.
- 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
James Turner [Tue, 7 Aug 2012 13:03:29 +0000 (14:03 +0100)]
Mac nightly packaging updates
Add FGCom, use Mac-launcher build exports, and ground-work for copying Subversion client libraries. Also runs code sign, though without a valid signing identity.
Thomas Geymayer [Fri, 3 Aug 2012 22:24:26 +0000 (00:24 +0200)]
Basic clipboard access from Nasal.
- 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
James Turner [Thu, 2 Aug 2012 11:18:38 +0000 (12:18 +0100)]
Skeleton Nasal-Canvas integration.
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!