1
0
Fork 0
Commit graph

8226 commits

Author SHA1 Message Date
Thomas Geymayer
22a1c9b2af Finish porting airportinfo to cppbind 2013-03-04 23:14:26 +01:00
Thomas Geymayer
3579a4404a Report std::exception in main loop 2013-03-04 23:13:36 +01:00
Thomas Geymayer
4b573ebd13 Start porting NasalPositioned to cppbind.
For now it is available in the positioned Nasal
module. FGAirport is fully ported, but especially
procedures/navaids and free functions are still
missing.
2013-03-04 19:24:47 +01:00
Thomas Geymayer
45e3b7e2d1 Clean up/prepare for porting NasalPositioned to cppbind 2013-03-04 16:31:37 +01:00
Christian Schmitt
6bf47cd248 MapWidget: make use of the new POI system and display cities on the map.
This is meant as a preview.
2013-03-04 00:27:12 +01:00
Thomas Geymayer
664cb474e1 NasalCanvas: clean up 2013-03-03 20:57:08 +01:00
Thomas Geymayer
0587db3b1e Update for nasal::Ghost changes 2013-03-03 19:30:16 +01:00
Christian Schmitt
7236541833 Add points of interest (POI) database to FGPositioned. Useful for maps and GPS instruments.
Can display country, city, towns and villages names worldwide.
2013-03-03 14:47:12 +01:00
James Turner
68c71d5787 Positioned/Cache tweaks to support PoIs.
In preparation for adding POI data, extend the FGPositioned type enum, and the cache code to handle arbitrary POI types. (Adding more in the future is straightforward now)

Also support removing user waypoints, which was requested by the Garmin G196 developers.
2013-03-02 13:44:20 +00:00
Christian Schmitt
ee1c8a8d66 Expose more runway methods to Nasal 2013-03-01 12:53:25 +01:00
Christian Schmitt
4f4f099ad5 Fix missing includes 2013-02-28 20:16:26 +01:00
James Turner
88a4435cef Remove isReciprocal from FGRunway.
This was a bogus concept, either runways have a reciprocal or not (if singled-ended), really this was simply exposing an artefact of the apt.dat encoding. Change to an API which gives what is actually wanted - the ability to extract an airport's runways without any reciprocals included.
2013-02-28 18:21:29 +00:00
Christian Schmitt
715c48e2d7 Convert runway parser and all internals to metric units and 2 runway ends.
This eliminates many conversations between ft and m and gives us runway start/end
points that are needed for many calculations. Also, this prepares the internals for
the upcoming apt.dat 850+ format that uses the metric system as well as start/end points.
2013-02-28 13:38:04 +01:00
Christian Schmitt
d9026d776c update gitignore 2013-02-28 13:37:49 +01:00
Thomas Geymayer
1b49f5cc78 Canvas Window: use new CanvasImage method to handle events 2013-02-28 01:15:59 +01:00
Christian Schmitt
8588eb2e4b Expose heliports to Nasal for future use in maps 2013-02-26 18:20:10 +01:00
Thomas Geymayer
3ea69785d9 CanvasWidget: automatically set auto-viewport.
If no viewport dimensions are given the viewport
will now automatically resize, otherwise it stays
unchanged.
2013-02-25 15:39:30 +01:00
Thomas Geymayer
045fc5b4ae CanvasWidget: add auto-viewport property.
The auto-viewport property allows to disable automatic
update of the canvas viewport update upon resizing
the PUI canvas widget.
2013-02-25 15:32:07 +01:00
Christian Schmitt
3a1709b31a apt_loader.cxx: 810 helipads are now treated as such internally 2013-02-24 22:18:49 +01:00
Christian Schmitt
6ffdb1bc54 apt_loader.cxx: update version parsing to 4-digit versions,
some tweaks according to the spec.
2013-02-24 22:03:29 +01:00
James Turner
b71e703d75 Fix for bug, ILS not visible in map on first run.
When calling setILS, in-memory runways did not get updated. This showed up in the map, but also affecting a few other places. Will port this to 2.10.1 when that process starts.
2013-02-23 14:51:00 +00:00
James Turner
e6297959d9 Version the navache filename.
Be friendly to people switching between 2.10 and dev (2.11), don't force a rebuild each time.
2013-02-21 17:42:06 +00:00
James Turner
1eb8ae1fbf Give the FGAirport class a sane filename.
simple.[cxx|hxx] -> airport.[cxx|hxx]
2013-02-21 11:32:02 +00:00
Christian Schmitt
11c00afaec Add support for helipads from apt.dat 850+ 2013-02-21 00:01:36 +01:00
Christian Schmitt
2319948b95 airport traffic routes from apt.dat 1000 are unknown to FG, so ignore them for now 2013-02-20 23:49:48 +01:00
Yves Sablonier
9ac1e82c82 Adding directive for osx sdk 10.5 in ClipBoardCocoa.mm 2013-02-18 09:18:48 +00:00
hooray
7fa1b9062e fg mingw fixes part #1
Conflicts:
	src/Main/bootstrap.cxx
2013-02-18 09:18:23 +00:00
Thomas Geymayer
38ca30cbd5 Ignore events if canvas::Window is not visible 2013-02-13 12:10:25 +01:00
Thomas Geymayer
6c10f99573 Make compiling of all utils/tools optional 2013-02-12 17:38:46 +01:00
James Turner
b0a879a5b1 Fix ADA compilation.
Patch by Roland Haeder
2013-02-11 22:16:02 +00:00
James Turner
37f783e92d File mode fixes.
Contributed by Roland Haeder
2013-02-11 22:15:23 +00:00
James Turner
cedc3bb5c3 Typo fix, pointed out by Emillian. 2013-02-11 12:51:54 +00:00
James Turner
fdae459948 Allow HOME to be undefined, as on Windows. 2013-02-10 13:35:58 +00:00
James Turner
67ca0689c9 Work-around a clang glitch with 10.6 2013-02-10 11:53:42 +00:00
James Turner
d9159e719d FlightRecorder: smarter log warning.
When using the default (generic) config, which references many props which may not exist in a particular aircraft, suppress the 'recording non-existent' property warning.
2013-02-10 11:47:16 +00:00
James Turner
808f42e86a Linux fix.
One day I'm going to figure out why I get all the standard-library includes automatically on Mac, but not on Linux. Today is not that day.
2013-02-09 17:11:55 +00:00
Frederic Bouvier
aa19b2a77e Include file only needed by MSVC 2013-02-09 17:40:37 +01:00
James Turner
8551b010e9 Fix another compile fail.
No idea why I don't need this on Mac, hmm.
2013-02-09 16:38:34 +00:00
Frederic Bouvier
87b43057e1 Fix windows build 2013-02-09 17:24:44 +01:00
James Turner
8ca7632845 Fix a GCC warning. 2013-02-09 15:33:13 +00:00
James Turner
7b663cd7f7 Split huge NasalSys header apart. 2013-02-09 15:33:05 +00:00
James Turner
ce9afecdbd Support a log-list widget in PUI.
Add a puaListBox which can show the contents of a log-buffer. Currently only two buffer sources are supported more to follow (and the dialog XML updates).
2013-02-08 19:39:41 +00:00
James Turner
e08eb7457e Dump more config state at startup.
Ensure that log files capture enough config state to debug path/search issues. Easy to expand this mechanism now to record anything similar.
2013-02-08 13:15:20 +00:00
James Turner
9ccf159f81 Refactor FG_HOME init, so we can log sooner.
Logging to file now happens earlier, so some useful early output is captured.
2013-02-08 12:57:17 +00:00
Frederic Bouvier
7cc3ffb30f Fix build for windows after logstream changes 2013-02-08 08:46:34 +01:00
Thomas Geymayer
c0173cf2b5 Improve mouse event capturing with Canvas windows.
- Don't capture mouse events if mouse mode has
   pass-through disabled. This behaviour is
   consistent with the PUI dialogs and allows
   changing moving view and controls while above
   any GUI dialog.
 - Add option to canvas windows to ignore all
   events and let them pass through
   ("capture-events").
2013-02-07 23:08:53 +01:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
James Turner
b52a61c2cb Support logging from Nasal at custom levels.
For now, print() still logs at SG_ALERT level.
2013-02-07 16:44:24 +00:00
James Turner
1898449949 Map OSG notification system to Simgear logging.
With this, OSG notifications can be captured / buffered in-line with our other log messages, which should help debugging and feedback.
2013-02-07 16:01:36 +00:00
James Turner
7ad55a206e Adapt to revised logging API. 2013-02-07 12:02:52 +00:00
James Turner
0ced6a24a0 Log to file inside FG_HOME. 2013-02-07 12:02:52 +00:00
James Turner
240f98d0f3 Remove un-needed header. 2013-02-07 12:02:52 +00:00
James Turner
7cf4aa2d86 Make various PUI widgets private. 2013-02-07 12:02:52 +00:00
Thomas Geymayer
7ce1e100d7 Reapply canvas placements upon aircraft-model reinit 2013-02-06 01:23:06 +01:00
James Turner
1dd3b40907 Change the way the nav-cache is rebuilt.
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.
2013-02-03 22:24:40 +00:00
James Turner
5ef475865c Append major/minor version to autosave file name.
Ensure that new minor versions get a clean autosave file. In practice
this means settings from 2.10 and 2.11 would co-exist, for example.
2013-02-03 16:57:31 +00:00
James Turner
1a5b968d7e Update for tweaked SGPickCallback API.
(Requires corresponding SimGear commit)
2013-02-03 16:34:36 +00:00
James Turner
978a2cd8c6 Initial work on state-machine AP module. 2013-01-31 22:40:48 +00:00
James Turner
0729b0806e Fix numeric keypad support on Mac.
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.
2013-01-31 18:42:34 +00:00
Thomas Geymayer
5b38e00ade Expose some methods on strings to Nasal 2013-01-31 19:14:23 +01:00
James Turner
ac696a9601 Set preview mode when using --fgviewer 2013-01-31 16:51:06 +00:00
James Turner
31995420d3 Guard libudev include with extern "C". 2013-01-30 20:49:50 +00:00
James Turner
4ca85f2653 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)
2013-01-28 23:35:44 +00:00
Michał Gawron
e27be6ee92 Return double precision float as requested in generic/binary protocol. 2013-01-28 17:08:31 +00:00
Eric van den Berg
5a8e6aeb86 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
2013-01-28 16:54:35 +00:00
James Turner
5826cea0a8 Work-around a JSBSim reset issue following the sync.
Thanks to Ron Jensen for the catch. I've added a comment so we know to update this on the next JSBSim sync.
2013-01-28 12:54:21 +00:00
James Turner
11f15a9b36 Joystick/dialog caches, commit the transactions. 2013-01-25 09:30:31 +01:00
James Turner
37900e22a8 Wrap dialog and joystick stat-cache in a transaction.
Should improve startup times when the cache is rebuilt.
2013-01-24 09:27:09 +01:00
James Turner
143d9fe8b9 Kill off obsolete helper class in GPS code. 2013-01-22 20:50:21 +01:00
Thomas Geymayer
0e4aba11fa Fix initialization order 2013-01-22 20:33:17 +01:00
James Turner
a31c2d519c Tolerate old blocks support in 10.6 compiler. 2013-01-22 18:33:16 +01:00
James Turner
13303f96a1 Fix for namespace scope. 2013-01-22 18:15:19 +01:00
James Turner
980105385d Use the aircraft position helper. 2013-01-22 18:15:05 +01:00
James Turner
1755029470 Make radar-altimeter indépendant of wxradar. 2013-01-22 18:12:39 +01:00
Torsten Dreyer
07720af693 sync with JSBSim 2013-01-19 22:39:28 +01:00
James Turner
c70bd65922 Tweaking syntax for 10.6 block locals. 2013-01-19 18:05:35 +00:00
James Turner
008a2d65f1 Make it all work with existing FileSelector API. 2013-01-19 16:23:05 +00:00
James Turner
9f8c66fbf9 Cocoa: use a window-sheet, and fire the callback. 2013-01-19 14:41:45 +00:00
James Turner
2e1fb7972e Initial work on native file dialog support.
Add an abstract interface, version that forwards to the existing PUI dialog, and a Cocoa-native version.
2013-01-19 14:41:45 +00:00
James Turner
a138952ee5 Increase the nav-cache in-memory cache size.
(Avoid thrash in certain cases)
2013-01-19 13:58:22 +00:00
James Turner
ea81903f67 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.
2013-01-06 20:34:34 +00:00
James Turner
4873a28e97 Allow ND rules to occur in the symbols file. 2013-01-02 17:07:28 +00:00
James Turner
f3dec6a64d Fix runway elevations when threshold.xml is used.
SGGeodesy::direct doesn't preserve elevations, oops.
2013-01-01 20:58:42 +00:00
James Turner
f48ad2f20b 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.
2013-01-01 13:49:12 +00:00
Thomas Geymayer
0a879d3c65 Fix canvas gui size sometimes not initialized correct 2013-01-01 13:45:45 +01:00
Torsten Dreyer
4277ca6540 Autopilot: rename parameter, no functional change 2012-12-31 22:21:30 +01:00
Torsten Dreyer
fcf40ec6a8 Autopilot: initialize the derivative filter
Dont let the derivative filter emit a spike on init or reset if the input
value is non-zero. This is a potential fix for #973.
2012-12-31 21:27:13 +01:00
James Turner
6705a2ec6d Fix compilation on some platforms.
No idea why I don't need this on Mac - differing Boost versions?
2012-12-31 20:13:26 +00:00
James Turner
369e6b564f 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.
2012-12-31 17:39:52 +00:00
James Turner
5ff8311acc 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)
2012-12-31 17:21:05 +00:00
James Turner
6c3853fd0d Expose an additional flight plan leg data to Nasal. 2012-12-31 11:46:36 +00:00
James Turner
851029143e 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.
2012-12-30 17:01:48 +00:00
James Turner
d0e9503766 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.
2012-12-30 16:12:11 +00:00
James Turner
44a44a0246 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!
2012-12-30 15:37:25 +00:00
James Turner
8aa05a871a Make the GPS quieter at log-level info. 2012-12-29 14:47:23 +00:00
James Turner
0d22797b90 XMLHTTPRequest: handle network level failures. 2012-12-29 14:37:33 +00:00
James Turner
34e8181cc9 Bug 941, lower minimum speed for GPS sequencing.
10kts is fine, apparently some people 'fly' very slowly.
2012-12-29 13:46:29 +00:00
James Turner
d311045018 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.
2012-12-29 13:45:27 +00:00
James Turner
e9ecf4eb52 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.
2012-12-29 12:16:51 +00:00
James Turner
12076bce0e Expose position along the flight-path to Nasal.
Useful to query a point '100nm before wpt X' from Nasal, especially for VNAV calculations (T/C, T/D).
2012-12-26 23:48:19 +00:00
James Turner
a1031b052d NavDisplay - custom symbol support enabled. 2012-12-24 23:13:18 +00:00
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