1
0
Fork 0
Commit graph

8125 commits

Author SHA1 Message Date
James Turner
e248ea8183 Fix altitudes on default SIDs and approaches.
Thanks to Hyde for noticing I had set the elevations incorrectly.
2012-12-24 20:22:58 +00:00
James Turner
a6dc2beb4d 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)
2012-12-24 17:42:23 +00:00
James Turner
41481967f1 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).
2012-12-23 23:32:53 +00:00
James Turner
3c6fbffdf2 Fix a typo. 2012-12-19 10:06:52 +00:00
James Turner
1e8cdd5829 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)
2012-12-18 10:23:44 +00:00
Thomas Geymayer
e844383988 Expose canvas Text::getNearestCursor to Nasal as replacement for old property based method 2012-12-17 00:32:24 +01:00
Thomas Geymayer
cef12d406c CanvasEvent: expose event target to Nasal 2012-12-17 00:32:24 +01:00
Thomas Geymayer
41d285a821 Canvas: remove old event handling code 2012-12-16 19:04:38 +01:00
James Turner
2905c96f47 METAR selection of runway works for reset.
Explicitly reinit the realwx subsystem on sim-reset, so METAR is updated within the 10-second finalizePosition window.
2012-12-16 15:05:21 +00:00
James Turner
487638be7f 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!)
2012-12-15 15:25:45 +00:00
Thomas Geymayer
c9976155d6 Update to latest SimGear and fix eating up every 2nd scroll event 2012-12-13 23:39:41 +01:00
Thomas Geymayer
4bf4754f7b 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.
2012-12-13 14:12:29 +01:00
James Turner
1c8d9ef132 Search the current aircraft-dir implicitly.
If a file is specified without an 'Aircraft/subdir' prefix, check for it relative to the the current aircraft dir.
2012-12-13 09:10:39 +00:00
James Turner
18506d3e65 FlightHistory: spatial limit on captures.
If you're not paused, but are stationary, don't record captures.
2012-12-11 09:17:25 +00:00
James Turner
e88e821567 Flight-history men usage cap.
Beyond a certain cap (currently 4MB), recycle buckets. With the default sample rate of 1Hz, this gives over 24 hours of history before recycling.
2012-12-11 00:10:57 +00:00
James Turner
433af2b51a 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.
2012-12-10 18:11:44 +00:00
Thomas Geymayer
e62649e075 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.
2012-12-09 23:15:49 +01:00
James Turner
dc132ab475 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.
2012-12-09 19:41:31 +00:00
Thomas Geymayer
13cec7bd99 Canvas MouseEvent now provides client and screen position 2012-12-08 15:02:15 +01:00
Thomas Geymayer
91bc5e522a Canvas add event time and expose current click count 2012-12-06 23:27:25 +01:00
Stuart Buchanan
b7f739ced4 Generate RNG at start of day, and pass down the stack for cloud generation. 2012-12-05 22:12:00 +00:00
Thomas Geymayer
ed211b043a Expose canvas::Element::getTransformedBounds to Nasal 2012-12-04 23:59:21 +01:00
Thomas Geymayer
fee2844ec3 Fix #953. 2012-12-03 09:28:48 +01:00
James Turner
88847ab02e Whoops, work-around for #926 correctly.
Hyde confirmed this fixes the issue, leaving the code present but disabled for the moment.
2012-12-02 23:55:35 +00:00
Thomas Geymayer
ab1c0e946f Fix calculating CanvasWidget mouse coordinates 2012-12-02 23:59:44 +01:00
Thomas Geymayer
8d8e9c3913 Fix for old PUI versions 2012-12-02 15:47:21 +01:00
Thomas Geymayer
28f2779c4b Forward mouse events from (PUI) CanvasWidget to Canvas for new DOM like callbacks 2012-12-02 13:33:16 +01:00
Thomas Geymayer
5e85bcacc8 Canvas: Expose more methods to Nasal.
- Expose canvas::Group::getElementById to Nasal
 - Expose canvas::Group::getChild to Nasal
2012-11-30 17:32:13 +01:00
Thomas Geymayer
f7544744bb Update for latest SimGear changes and remove some old code 2012-11-29 17:57:01 +01:00
Thomas Geymayer
af0bbfd657 Expose simgear::canvas::Group::createChild to Nasal 2012-11-29 01:25:01 +01:00
James Turner
ebded9d981 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)
2012-11-28 13:41:58 +00:00
Frederic Bouvier
ef84524eba MSVC 11 compile fix 2012-11-28 09:08:57 +01:00
ThorstenB
59448f11cc #952 terrasync not scheduling tiles before sim reset 2012-11-28 00:26:47 +01:00
James Turner
6434163e65 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.
2012-11-27 22:42:46 +00:00
Stuart Buchanan
fe1d04df8a Add properties to allow control of precipitation level externally. 2012-11-27 22:17:30 +00:00
ThorstenB
a28fe51ccf 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).
2012-11-27 21:02:32 +01:00
ThorstenB
4b8e0740c4 Fix compile error "ISO C++ forbids initialization of member" 2012-11-27 21:01:03 +01:00
James Turner
6365ad5dae 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.
2012-11-27 18:17:59 +00:00
James Turner
c8996d86b8 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.
2012-11-27 17:34:52 +00:00
Thomas Geymayer
e5286f1217 More work on Canvas event handling/adapt for simgear changes 2012-11-27 13:56:53 +01:00
ThorstenB
b8a3d6902e Stop AI aircraft's sound when removing
Sound manager keeps a reference to _fx, so reducing its ref-count isn't
enough - it must be removed explicitly.
2012-11-27 00:02:28 +01:00
ThorstenB
57410852b9 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.
2012-11-27 00:02:28 +01:00
ThorstenB
7ed8b625c9 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).
2012-11-26 00:23:10 +01:00
James Turner
63c95642c8 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.
2012-11-25 21:37:15 +00:00
James Turner
979ca55197 Fix a couple of 64-bit warnings identified by Clang. 2012-11-25 21:35:17 +00:00
ThorstenB
a74c99ec51 Add debug check to NavCache
reporting suspicious filesystem timestamp changes.
2012-11-25 16:41:10 +01:00
ThorstenB
1c6643d7ac traffic: more pass by reference + member init 2012-11-25 16:41:10 +01:00
ThorstenB
b682ae91d6 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.
2012-11-25 16:41:10 +01:00
James Turner
7d88714e2d Fix duplicate runway wpt in default approach. 2012-11-24 13:50:37 +00:00
ThorstenB
f0778a110b MSVC compile issues. 2012-11-24 13:33:36 +01:00
ThorstenB
ff49cd7acf AIFlihtPlan: Proper member initialization
(i.e. "isValid" needs to be initialized unconditionally)
2012-11-24 13:30:00 +01:00
James Turner
ec2975bac3 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.
2012-11-24 12:14:56 +00:00
ThorstenB
830526a793 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.
2012-11-24 12:42:31 +01:00
ThorstenB
439ad4a7c8 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.
2012-11-24 12:06:20 +01:00
ThorstenB
bb494e52e5 Performance improvement: pass (const) strings by reference
to avoid copying actual string data around.
2012-11-24 11:59:13 +01:00
Mathias Froehlich
44ffdcd7d0 hla: add io chanel configuration shortcut hla-local. 2012-11-24 09:58:53 +01:00
ThorstenB
35196ce18c Add more debug output to NavDataCache
showing exactly which file triggers a cache rebuild.
2012-11-23 22:35:06 +01:00
ThorstenB
458edb9339 Use more specific logging classes for SG_LOG.
The log filters aren't really useful when everything uses SG_GENERAL.
2012-11-23 21:16:08 +01:00
ThorstenB
1827825fcb Clean up namespace issues
avoiding "uses..." in header files.
2012-11-23 21:16:08 +01:00
ThorstenB
4a53002784 Fix compiler warning with sprintf format
since PositionedID is "long int", not "long long int".
2012-11-23 21:16:07 +01:00
Thomas Geymayer
846a838c70 Expose NasalSys::gcSave/gcRelease to Canvas 2012-11-22 01:06:22 +01:00
James Turner
bca6e9e890 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.
2012-11-21 14:49:34 +00:00
James Turner
77ca03da4d AIManager cleanups, no functionality change. 2012-11-21 14:03:17 +00:00
Thomas Geymayer
258d387d15 Allow setting emission for each canvas placement 2012-11-21 13:07:57 +01:00
James Turner
563ea69d34 Missing std:: namespace in a header. 2012-11-20 17:09:09 +00:00
James Turner
51a1c86f00 Quiet some log output. 2012-11-20 17:08:56 +00:00
James Turner
9632bfcfd6 View-manager: update globals automatically.
Make the global view-manager pointer be controlled by the instance.
2012-11-20 13:33:20 +00:00
James Turner
04598859e3 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.
2012-11-20 13:32:10 +00:00
James Turner
d886f2a5f8 Make EnvironmentMgr shutdown its subsystems.
With this change, Environment subsystem can be removed and re-added at runtime using the factory commands.
2012-11-20 12:31:07 +00:00
James Turner
cabb2a419f Allow a default name when adding subsystems. 2012-11-19 23:22:45 +00:00
James Turner
93237f1b37 Avoid a dependency on the environment-manager.
Change the ASI Mach computation (written by me) to use properties, instead of depending directly on the environment-manager.
2012-11-19 23:17:03 +00:00
James Turner
868b7b40dc Many more subsystems via the factory.
Not all of these are tested to actually be safe to add / remove at runtime, but an increasing number are.
2012-11-19 23:03:08 +00:00
James Turner
f1a7950202 XMLHttpRequest: only set failure signal on failure
Use failure as a real signal property - only set it / fire listeners on a real failure condition.
2012-11-19 23:02:35 +00:00
James Turner
18da917ddd Bracket threshold.xml loading in a DB transaction.
Should mitigate (but not completely fix, yet) bad map performance when initially zooming out, or panning when zoomed out.
2012-11-19 22:24:10 +00:00
Thomas Geymayer
82884ab3c6 Improve finding gperftools and disable profiling by default (even with gperftools installed) 2012-11-19 13:11:03 +01:00
James Turner
379e7a2fd5 Make HTTPClient a proper subsystem.
Avoid some statics, and incidentally make the proxy host/port settings dynamic (re-init the subsystem to update proxy settings, woo).
2012-11-19 11:30:12 +00:00
ThorstenB
be3f94f63a Remove static subsystem dependencies
preventing us from recreating subsystems on reset/reinit.
2012-11-18 17:29:29 +01:00
Thomas Geymayer
d51499382d Clean up CanvasWidget and more work on Canvas/Nasal bindings 2012-11-18 16:46:03 +01:00
ThorstenB
58380b286e Fixed some uninitialized member vars and a mem leak. 2012-11-18 16:39:22 +01:00
ThorstenB
a784443a24 Remove static property dependencies
preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
2012-11-18 16:35:54 +01:00
ThorstenB
1f1dd1fa16 viewmgr: fix mixed up white-spaces/indentation
(content otherwise unchanged)
2012-11-18 13:23:10 +01:00
ThorstenB
d761da248f viewmgr: stash properties for better performance 2012-11-18 13:17:07 +01:00
ThorstenB
01617861ce toggle fullscreen: also adapt GUI plane when resizing 2012-11-18 00:00:15 +01:00
ThorstenB
b577ec70fc Add command to toggle fullscreen mode. 2012-11-17 23:07:00 +01:00
ThorstenB
4e6f0e18fd YASim airborne start-up
Gear should be up when starting in-air.
2012-11-17 20:05:16 +01:00
ThorstenB
adc95a4b55 #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.
2012-11-17 20:01:19 +01:00
James Turner
8a954f8338 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.
2012-11-17 18:10:15 +00:00
ThorstenB
bf0dbb22d0 #931: some VOR+ILS stations not working on 32bit machines
When casting to int, always remember the ugly effects of floating-point
(im)precisions ;-).
2012-11-16 22:46:41 +01:00
James Turner
91c6e3433d 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).
2012-11-16 16:43:54 +00:00
Thomas Geymayer
48c1b51875 Add new property indicating whether profiler is available 2012-11-16 12:59:44 +01:00
Thomas Geymayer
1a0fcd5f56 NasalCanvas: Clean up and expose Element node ghost 2012-11-16 12:34:38 +01:00
ThorstenB
9d067bc890 #918: fix jsbsim in-air repositioning issue 2012-11-15 20:20:40 +01:00
ThorstenB
791389cb98 #895: AI traffic not working when system is offline but real-wx is enabled
Add a timeout when waiting for valid METAR.
2012-11-15 20:20:40 +01:00
ThorstenB
7fa2aecc22 fgprotocol: delete io channel on shutdown 2012-11-15 20:20:40 +01:00
ThorstenB
e8fc85ef7e jpg-httpd: Add error messages when unable to open port etc.
Also move private code to cxx file.
2012-11-15 20:20:40 +01:00
ThorstenB
58158bf51f jpg-httpd: consistent indentation and white-spaces
(no content change)
2012-11-15 20:20:40 +01:00
Thomas Geymayer
779a9ae415 Really make profiling commands optional 2012-11-15 13:56:31 +01:00
Thomas Geymayer
0761af344d Visual Studio bug workaround 2012-11-15 12:43:35 +01:00
Thomas Geymayer
859e92a8ed Experiment with exposing more canvas methods 2012-11-15 12:43:34 +01:00
Thomas Geymayer
892806cb3f More cleanup an move of helper classes to simgear 2012-11-15 12:43:34 +01:00
Thomas Geymayer
724d54b3a3 Clean up and some more testing 2012-11-15 12:43:34 +01:00
Thomas Geymayer
863cd6a290 Canvas/Nasal and Nasal/C++ binding experiments 2012-11-15 12:43:34 +01:00
Thomas Geymayer
fe1222a90d Optional profiling commands using gperftools 2012-11-15 11:55:37 +01:00
Frederic Bouvier
b88e941ca2 MSVC compile fix 2012-11-15 08:42:10 +01:00
James Turner
78d97fa468 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.
2012-11-12 22:30:28 +01:00
ThorstenB
25138930e3 replay system: protect from recording multiple records for identical time
And avoid div by zero when dt==0 for recorded data.
2012-11-11 17:36:10 +01:00
ThorstenB
1d99401c04 Remove osg dependency for isNaN only. 2012-11-11 17:22:42 +01:00
Mathias Froehlich
354a1b3a0b hla: Use hla derived classes part 2 2012-11-11 16:30:55 +01:00
Mathias Froehlich
518cd00094 hla: Use HLADataElementIndices instead IndexPathPairs. 2012-11-11 16:30:49 +01:00
Mathias Froehlich
f4d344d44a hla: Replace the object class callback by it's object class. 2012-11-11 16:30:43 +01:00
Mathias Froehlich
c90d3429aa hla: Use hla derived classes part 1. 2012-11-11 16:30:36 +01:00
ThorstenB
fdb64a02a8 Extended replay and flight recording system
Save/restore replay sessions.
Replay system message support, so recorded flights can be turned into
flight tutorials.
2012-11-10 21:26:08 +01:00
James Turner
08d82294bd 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.
2012-11-10 14:48:00 +00:00
Stuart Buchanan
b7e79c1231 For clouds use a RNG seed that stays the same for 10 minutes.
This allows multi-process systems to stay in sync and display the same
clouds.
2012-11-09 20:29:28 +00:00
James Turner
18e3fc0c82 Bug 921
Fix GPS search functionality, I mixed up the SQlite wild-card operator.
2012-11-08 18:31:16 +00:00
James Turner
afcdbd3158 Overhaul the ground-net / parking code.
Use the nav-data-cache to cache groundnet information, including
parking positions and the taxi-node graph.
2012-11-08 09:07:05 +00:00
James Turner
72131a4a49 Alexis Bory:
The purpose of this little cosmetic patch is to ease the use of proptest's output in a ploter.
2012-11-08 09:06:24 +00:00
Thomas Geymayer
7e7d921515 Adapt for latest SimGear changes and insert missing bracket 2012-11-06 18:50:14 +01:00
Thomas Geymayer
c79510ef34 Fix include and compiler warning 2012-11-04 23:03:06 +01:00
Thomas Geymayer
28779e7a51 Update for new simgear Canvas system.
A refactored version of the Canvas system can now be found in
SimGear.
2012-11-04 14:18:31 +01:00
ThorstenB
4a535f67c0 Add error messages when unable to open HTTP port.
Also move private code to cxx file.
2012-11-01 19:34:27 +01:00
ThorstenB
46fdb2079d Remember MP online status throughout a sim reset. 2012-11-01 15:49:45 +01:00
ThorstenB
d15d2ad270 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.
2012-11-01 15:31:05 +01:00
ThorstenB
82bfb96d23 Add different error message when an FDM is disabled.
Better shows the difference between "unknown" and "disabled" FDMs.
2012-11-01 15:03:01 +01:00
ThorstenB
51f16337c2 #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...
2012-11-01 14:42:26 +01:00
ThorstenB
5049ecce71 fg_io: Fixed mem leaks. 2012-11-01 14:42:26 +01:00
ThorstenB
a704a62081 Fix indentation and mixed-up white-space/tabs
(content otherwise unchanged)
2012-11-01 14:42:26 +01:00
Thomas Geymayer
71eeb62c1b Simplify canvas OpenVG initialization and fix sometimes rendering too lazy 2012-10-31 01:44:25 +01:00
James Turner
c79e2465df Traffic improvements.
Make landings and takeoffs look more correct; tweak climb-out and touchdown phases in particular, so the turn to destination heading occurs earlier on climb out, and touchdown occurs close the GS transmitter / some distance down the runway from the beginning.
2012-10-30 15:43:54 +00:00
Thomas Geymayer
4e75587332 Refactor PropertyBasedElement and Manager 2012-10-29 16:19:13 +01:00
James Turner
7c8ad455a3 PerformanceDB improvements.
Support cascading (inheriting) performance data, so common values don't need to be repeated.
2012-10-29 10:01:52 +00:00
Thomas Geymayer
79f7907a82 Let Nasal props.Node.removeChildren behaviour consistent (Don't keep deleted nodes) 2012-10-22 17:59:19 +02:00
Thomas Geymayer
2ad82a1b60 Move FGODGauge implementation to SimGear 2012-10-19 11:59:36 +02:00
Thomas Geymayer
b22ede2fd5 Expose SGPropertyNode::addChildren to Nasal 2012-10-14 17:39:53 +02:00
ThorstenB
076bbb8487 Fix some compiler warnings.
Unused vars, loss of precision, bool type conversions.
2012-10-13 17:59:47 +02:00
ThorstenB
32b9c61528 ATIS upgrade
Add missing ATIS elements (transition level, expected approach,
precipitation, runway surface warnings).
Minor phraseology fixes for US/Europe.
Adds "/sim/atis/concise-report" option to use abbreviations (CAVOK etc),
and omit "obvious" units (depends on airport).
Trigger ATIS updates for significant pressure changes.
2012-10-13 16:48:56 +02:00
ThorstenB
60eaa22fda Drop sorting of Nasal scripts.
simgear::Dir now always provides results in a deterministic order.
2012-10-13 15:45:15 +02:00
ThorstenB
395c317627 ATCVoice: support multiple voice files
so we can split ATIS voice files into separate files, i.e. for airport
names and phraseology, so we don't need to regenerate airport names when
extending/changing phraseology. Also allows to add custom airport names.
Enable switching voice files at run-time (different airports could have
different voices...).
2012-10-13 15:45:15 +02:00
ThorstenB
9bb9a78249 Stash properties 2012-10-13 15:45:15 +02:00
Thomas Geymayer
78b5dfb58b Expose SGPropertyNode::addChild to Nasal 2012-10-13 15:13:56 +02:00
Anders Gidenstam
a44acfa875 merge-requests/1566: Adjust indentation. 2012-10-12 23:48:09 +02:00
Vivian Meazza
bbea07e8b1 Bugfix: correct calculation of range and realtive bearing when parent is not the main model.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2012-10-12 23:45:56 +02:00
ThorstenB
b838691f50 #897: float vs double precision issues (frequency dialog not always working)
puObject only provides float, not double, which causes precision/rounding
issues with some numerical values (try "114.2").
Work around: obtain string value, and manually convert with proper double
precision.
2012-10-10 20:28:17 +02:00
James Turner
607e7d7bf3 Use an SGGeod inside FGAIFlightPlan::Waypoint.
This allows incremental refactoring to move away from discrete lat/lon use in favour of SGGeod.
2012-10-08 15:52:06 +01:00
Mathias Froehlich
fd23f5dee5 hla: Fix velocity units. 2012-10-07 22:23:04 +02:00
ThorstenB
ccb890447a Improve gyro heading indicator failure simulation
Error/offset induced by precession and yaw also depend on spin (no spin =>
no additional error/offset).
Error/offset induced by changing a/c orientation while gyro spin is
low (<<1) should apply to the "offset" (instead of "error") property.
2012-10-07 20:47:50 +02:00
James Turner
4994973ef4 Separate instruments from cockpit displays. 2012-10-05 18:13:50 +01:00
James Turner
7d547d1287 Make traffic take-off roll look a little better.
Expand the performance DB logic to support aliases, and select based on aircraft type as well as class. This allows to introduce some variation into AI traffic performance. Change the initial climb-out waypoints to use pitch-hold until passing 3000', which looks much more convincing
2012-10-05 18:12:46 +01:00
James Turner
1e5bd162e7 Use a helper thread to init the traffic-manager.
Make traffic manager startup asynchronous, but also avoid frame-stutter due to file parsing on the main thread. Note only XML parsing happens on a thread - once that's complete, everything happens as normal on the main thread, as before.
2012-10-05 09:33:04 +01:00
ThorstenB
2bdcde5a4b Split ATIS generator into smaller, more readable methods. 2012-10-05 00:22:02 +02:00
ThorstenB
575f576aa9 Revive master sound enable switch. 2012-10-05 00:17:28 +02:00
ThorstenB
109d04b605 Fix ATIS output.
Need to call inherited update to control volume and enable/disable
depending on sound ATC switch.
2012-10-05 00:07:40 +02:00
ThorstenB
06a8a9c536 Fix Linux build: "malloc" needs stdlib.h 2012-10-04 21:14:48 +02:00
Mathias Froehlich
74f07982bd Provide reader writer options to the effects. 2012-10-03 22:03:25 +02:00
James Turner
5eb2f74e99 Run the filters for comm/navaids as required.
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.
2012-10-01 13:06:28 +01:00
James Turner
bcea720db3 Make the sound-manager optional in a few places. 2012-10-01 10:10:34 +01:00
James Turner
21d50b11f5 Make FGVoicePlayer.hxx not require sample_openal.hxx 2012-09-30 20:23:13 +01:00
James Turner
7b8804bd40 Tolerate refactored SGSound headers.
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.
2012-09-30 19:40:08 +01:00
James Turner
8608a48073 Initial work on dynamic subsystem creation.
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}));
2012-09-30 16:34:51 +01:00
James Turner
3b6c2c426d Support a --no-default-config option.
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.
2012-09-29 19:02:03 +01:00
Thomas Geymayer
f462dfdfac Canvas: default fill-rule to evenodd and make it configurable 2012-09-29 19:54:31 +02:00
James Turner
cd7a02ca69 Make FGControls behave like normal subsystem.
FGControls create/init/bind order was incorrect, causing initial property tree state to get over-written. Restructure the code so bind() sees correct values.
2012-09-28 15:32:31 +01:00
Thomas Geymayer
65f2881770 Fix finding ATIS CommStation 2012-09-27 17:03:14 +02:00
James Turner
8c80824dbd Tweak init order of controls/input. 2012-09-27 15:33:12 +01:00
James Turner
fe3a1424eb Restore the fdm-init check to splash-screen logic.
Guessing this is the cause of the splash-screen coming down early in some cases. Adding this back to confirm or deny that guess.
2012-09-27 15:15:02 +01:00
Thomas Geymayer
37d0c19f7c Canvas: Make path destroying more robust 2012-09-27 14:41:00 +02:00
Thomas Geymayer
5ac3de21e3 Fix some CommStation bugs
- 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)
2012-09-27 12:21:22 +02:00
James Turner
682d78301e #793 - invalid data on final FP leg.
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.
2012-09-27 09:27:48 +01:00
Thomas Geymayer
f00bcad479 Fix ATIS /environment/attention handling
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.
2012-09-27 00:42:06 +02:00
James Turner
8e3314a7ec Make the radio interpolation tables static.
No need to read these again for each navradio - and the marker beacon doesn't use them at all.
2012-09-26 23:10:37 +01:00
Thomas Geymayer
b8b4fb00f8 Canvas: On z-index change move element always to last position of elements with same z-index 2012-09-26 23:52:43 +02:00
James Turner
0f927d5766 Part of bug 885
Allow the route-manager to be explicitly de-activated.
2012-09-26 22:43:19 +01:00
Frederic Bouvier
ba8190d97f Close Sqlite3 database *before* trying to delete the file. Will avoid a segfault when the schema is out of date 2012-09-26 22:34:48 +02:00
Thomas Geymayer
3b10fc5f3e Canvas: Support z-index inside Groups/Maps 2012-09-26 18:09:06 +02:00
James Turner
872e84d827 Make HUD items private to the subsystem.
Make the HUD independent of the instrument manager, and push most of the declarations from the header into a private header.
2012-09-26 17:02:11 +01:00
James Turner
1be2aa558f Quieten down autopilot creation log. 2012-09-26 16:25:43 +01:00
James Turner
a67d8e1983 All FPU control happens in bootstrap.cxx
Remove some platform includes which don't belong in main.cxx
2012-09-26 16:25:18 +01:00
James Turner
ebf3a0793d Tolerate the lack of a GUI in some places. 2012-09-26 13:39:38 +01:00
James Turner
b5820a4e90 Fix string-id for message translation. 2012-09-26 13:38:26 +01:00
James Turner
3d4806adbe Remove dead file. 2012-09-26 13:37:31 +01:00
Thomas Geymayer
703bb9bbf3 Retrieve property node once instead of using fgGetXXX 2012-09-26 12:18:47 +02:00
Thomas Geymayer
2f630e502d Let fgGetLong actually return long instead of int 2012-09-25 23:24:29 +02:00
Thomas Geymayer
6dd4782254 Canvas: Proper fix for OpenVG init handling.
- 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.
2012-09-25 23:24:29 +02:00
ThorstenB
dac8706e2e Move GUI init code to gui module. 2012-09-25 22:39:13 +02:00
ThorstenB
e5b81a8bb6 Minor pointer safety and compiler warning issues. 2012-09-25 22:10:06 +02:00
Thomas Geymayer
16d73f4012 Canvas: Redraw if OpenVG has been initialized.
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.
2012-09-25 21:34:58 +02:00
James Turner
a10638c6b4 Use a helper thread to rebuild the navcache.
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.
2012-09-25 17:24:12 +01:00
James Turner
ae6218ff10 Restore named JS/input configs (overrides)
Thanks to jano for pointing out I'd broken this feature!
2012-09-25 14:20:18 +01:00
James Turner
8050f39089 Fix linux build, needs explicit <cstring> 2012-09-25 10:29:32 +01:00
James Turner
9426928cdf Fix a typo. 2012-09-25 10:07:11 +01:00
James Turner
649d579124 Helpers to access view position.
Avoid direct use of FGViewer in various places, by providing property-based accessors to the current view position.
2012-09-25 10:06:56 +01:00
James Turner
4456f42e67 Make the view-manager and sound-manager independent.
Use properties to pass current-view information to the sound-manager, so there is no hard-coded dependency between the subsystems.
2012-09-25 09:17:00 +01:00
James Turner
4ea5a0c31d Whoops, parking refactoring changed the positioned types.
Force a nav-cache rebuild to accommodate the renumbered types.
2012-09-25 09:15:36 +01:00
James Turner
2f6172687e Make FGControls behave like a standard subsystem. 2012-09-25 00:48:48 +01:00
James Turner
b1ff365a8f Make FGTaxiNode and FGParking inherit FGPositioned.
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.
2012-09-25 00:31:17 +01:00
ThorstenB
a2cfef95fb Minor tile manager clean-up.
The tilemgr schedules scenery, so it should also trigger the
"sceneryloaded" signals once it's done.
2012-09-24 23:42:25 +02:00
James Turner
fd99e9fdfb std namespace fixes in headers. 2012-09-24 08:39:30 +01:00
James Turner
59f6f330c2 Defer SGEphemeris creation until ::init()
Trying to make subsystem *creation* cheap - major work such as IO should be deferred until init() where possible.
2012-09-24 00:37:46 +01:00
James Turner
fb266722ba Parking: another segfault edge-case.
Again, when there's no parking/ground-net, tolerate this.
2012-09-24 00:36:47 +01:00
James Turner
6c6452c62b Adapt to revised SGTime API
Convert SGTime users to pass SGGeod/SGPath instead of raw values.
2012-09-24 00:03:23 +01:00