1
0
Fork 0
Commit graph

7923 commits

Author SHA1 Message Date
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
James Turner
66a6438de1 Avoid a segfault-on-null
This code is called both when there's no ground-net, but also when there's no parking data at all.
2012-09-23 23:07:00 +01:00
James Turner
b1854459b3 Clean up dynamics/parking handing code.
Refactor some parking / airport-dynamics APIs, in preparation for caching the ground cache data in the nav-cache.
2012-09-23 21:42:40 +01:00