1
0
Fork 0
Commit graph

9425 commits

Author SHA1 Message Date
James Turner
a63da0cbde Minor improvement to hangar list in the launcher. 2016-04-15 17:27:29 +01:00
James Turner
31cad6d384 Fixes to launcher description rendering. 2016-04-15 17:21:49 +01:00
James Turner
6095646a62 Prompt the user when the default hangar is missing.
In the Qt launcher, when the default hangar isn’t found, show
a hint in the aircraft list.
2016-04-15 17:06:53 +01:00
James Turner
c15e4753ac Different fix for traffic shutdown crash.
Fix for: https://sourceforge.net/p/flightgear/codetickets/1864/
2016-04-15 16:26:54 +01:00
James Turner
43add4f820 Fix stray back-button in Qt launcher
- when no location is set, don’t show the back button.
2016-04-14 18:54:27 +01:00
James Turner
7a36b96790 Update from SimGear API change
- support new HTTP cancellation API
2016-04-14 09:33:28 +01:00
Stuart Buchanan
56374621c5 Make LOD of buildings/trees/objects/STG configurable.
Now using /sim/rendering/static-lod/rough.
2016-04-08 22:38:17 +01:00
James Turner
5e4063b761 Move launcher settings store inside FG_HOME
Settings now in .ini format, at $FG_HOME/flightgear.org/FlightGear.ini
2016-04-08 10:40:26 +01:00
James Turner
5341d327fd Restructure paths handling in the launcher
- move the dialog into a new ‘add-ons’ tab

- separate out ‘restore settings’ from selecting a new fg-data

- actually relaunch the app
2016-04-08 10:26:34 +01:00
Torsten Dreyer
f837f1e808 Merge /u/sanhozay/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/35/
2016-04-07 09:47:01 +00:00
Richard Senior
78de2af130 Allow ATIS format specifications to compare tokens against text values
Prior to this change, it was only possible to compare the values of tokens
to each other for use in conditionals, e.g. landing and departing runway.
This change allows comparison of a token to a text value, e.g. to compare
wind speed to zero.
2016-04-07 00:58:34 +01:00
Erik Hofman
02174a1df6 Add the latest fixes and expose all inertias in the property tree 2016-04-06 14:26:30 +02:00
James Turner
ca6424f76a Fix a reset crash with pager threading.
Ensure pager thread is stopped before we touch
the sgUserData reference to the main props tree.
2016-03-28 23:50:47 +01:00
James Turner
08ea386197 Fix corrupt HUD fonts
osg::texture2D changes GL_UNPACK_ROW_LENGTH, which fntLoadTXF is not
prepared to deal with. Reset the value back to 0 before loading +
caching TXF fonts on the PLIB side.
2016-03-28 22:54:24 +01:00
James Turner
c29fa35840 Updated Canvas adaptor getImage API
Return the Image by ref ptr instead of raw pointer.
2016-03-26 20:25:31 +00:00
James Turner
e8398d5cee Fix Clang unused member warnings in JSBsim. 2016-03-26 20:24:57 +00:00
James Turner
6fc2403449 Fix iterator const-ness. 2016-03-24 20:23:39 +00:00
James Turner
5baca8598f Improve download-dir behaviour.
When set on the command line, will be used for aircraft packages. When
set in the Qt launcher, will also be used for aircraft downloads at
all times.

When changing the path in the launcher, the set of aircraft catalogs
is refresh automatically. Note the default catalog may need to be
re-installed.
2016-03-24 15:10:06 +00:00
James Turner
733e3b3f0c HTTP subsystem has a default name.
Switch to using type-safe accessors now.
2016-03-24 15:08:38 +00:00
James Turner
88bfaca2b3 New options setting/clearing helpers. 2016-03-24 15:05:03 +00:00
James Turner
ff7b82885f Fix for view look-at orientation bugs.
Force a manual re-calc of view parameters inside update. Will refactor
this in the future since shouldn’t really be necessary.

Ticket: https://sourceforge.net/p/flightgear/codetickets/1855/
2016-03-24 12:26:16 +00:00
James Turner
cbf16b7966 Fix copy-paste bug setting season in the Qt guy
Spotted by Adrian Serrano!
2016-03-22 10:56:05 +00:00
James Turner
d0c341fa47 Guard against a crash. 2016-03-22 10:42:21 +00:00
Erik Hofman
209194ecba Reload user preferences after reading the video configuration file 2016-03-21 11:50:11 +01:00
Florent Rougon
0cfa4ced9c Make --metar automatically imply --disable-real-weather-fetch
The --metar option has no effect unless --disable-real-weather-fetch is
also passed. This often makes users believe that --metar doesn't work.
Change the implementation for --metar so that it automatically implies
--disable-real-weather-fetch.
2016-03-20 19:56:18 +01:00
Torsten Dreyer
585b4a7f70 Fix "failed to load file: Models/..."
After removing /Models from FGData loading of shared models from
within a scenery model failed because the ResourceManager did not know
about additional scenery paths.
2016-03-19 21:08:24 +01:00
James Turner
74f17d2882 Fix missing menubar on Mac in some setups
- Only clear the OSG ‘pose as standalone’ flag when we really show
  a dialog, as opposed to when we /might/ show.

Tested:
 - Qt build using launcher
 - No Qt build 
 - Qt build but launcher not requested
2016-03-19 14:46:11 +00:00
Erik Hofman
e1bb47bc89 Add support for Video adapter rendering presets 2016-03-19 13:10:36 +01:00
Torsten Dreyer
1bf5fe1c27 Fix for FreeBSD and a typo
Fix provided by Ganael LAPLANCHE, thanks!
2016-03-12 20:55:46 +01:00
Torsten Dreyer
a1e81a2fdc Make some more noise if (stale) fgfs.pid file exists 2016-03-08 18:37:32 +01:00
Durk Talsma
31c66226e1 AI traffic refused to take-off, because the TrafficRecord destructor would unassign an AIAircraft from it's ATC. This caused it to get stuck in front of the runway and block all other traffic.
This patch may introduce an occasional crash on exit again, because it effectively undoes commit [a972df]. I'll try to find a better fix for that later on.
2016-03-06 21:23:26 +01:00
James Turner
43b4db7ef7 Improve UI around adding aircraft dirs
- Check if the selected path, or an ‘Aircraft’ subdir,  contains
some -set.xml files, and if not, warn the user.
2016-03-05 09:35:02 +00:00
James Turner
688ae7d156 Bugfix: Qt launcher, enable variant aircraft on-disk
When mapping a URI to a QModelIndex, we were only considering the 
primary aircraft path, for on-disk aircraft as opposed to packages.
2016-03-05 09:34:16 +00:00
Torsten Dreyer
4f8cbbb204 Fix #1851, wrong type in multiplayer messages
See https://sourceforge.net/p/flightgear/codetickets/1851/
for details
2016-02-29 22:29:32 +01:00
James Turner
1aa6482a59 Fix bug #1845, closing the Qt launcher
Intercept the close event and quit the app instead of continuing to
run the main FlightGear application.

https://sourceforge.net/p/flightgear/codetickets/1845/
2016-02-24 21:50:48 +02:00
Rebecca N. Palmer
41b78ce150 Nasal security: allow reading explicit --terrasync-dir
(but not /sim/terrasync/scenery-dir - https://bugs.debian.org/780716 )
Needed for animated jetways:
https://sourceforge.net/p/flightgear/mailman/message/34870606/
2016-02-21 20:25:02 +00:00
James Turner
de959a14f3 Rename Viewer/viewer.cxx to view
- keep class and file names in sync.
2016-02-17 21:25:39 +00:00
James Turner
1515154e12 View::updateData becomes a private helper. 2016-02-17 21:25:39 +00:00
James Turner
5b81333768 View offset/target-offset props are tied
- make these View properties work like all the others, i.e
  bound and unbound when the view changes.
2016-02-17 21:25:39 +00:00
James Turner
5629cf1a8d Remove legacy ‘axes/lat’ and ‘axes/long’ props.
- only exits to support some legacy joystick hat configs,
  which have been updated to use the goal- properties directly.
2016-02-17 21:25:39 +00:00
James Turner
7b08c621b4 Make many View APIs private
- many things are now only needed by tied methods, and 
  hence can be made private.
2016-02-17 21:25:39 +00:00
James Turner
a3382fec6d Simplify setting view eye/target offsets 2016-02-17 21:25:39 +00:00
James Turner
e404ebc38a Sink more properties into View 2016-02-17 21:25:39 +00:00
James Turner
27d739084a View-manager binds like a normal subsystem.
- no longer need the unusual init-bind order
2016-02-17 21:25:39 +00:00
James Turner
00a4f1ecbb Clean up view-number property handling 2016-02-17 21:25:39 +00:00
James Turner
ae1d96cdfb Move FOV property into View 2016-02-17 21:25:39 +00:00
James Turner
daf8c79705 View-Mgr absolute position is gone. 2016-02-17 21:25:39 +00:00
James Turner
65d5038962 Tie view orientations directly
- remove need for cached orientations in view-manager
2016-02-17 21:25:39 +00:00
James Turner
3171cbce75 copyToCurrent removed. 2016-02-17 21:25:39 +00:00
James Turner
bf69781ae0 Remove dead code. 2016-02-17 21:25:39 +00:00
James Turner
fa4a5e7a64 Better types for eye/target position 2016-02-17 21:25:39 +00:00
James Turner
03d5e55b57 Move data updating into the View class 2016-02-17 21:25:39 +00:00
James Turner
7391b9d76a ViewManager::copyToCurrent is a no-op 2016-02-17 21:25:39 +00:00
James Turner
655ac851e0 Start moving view-manager logic into View
- work in progress, goal is to make copyToCurrent and most of
  the bind/unbind logic sink into each specific View, avoiding all the
  null pointer checks in view manager.
2016-02-17 21:25:39 +00:00
James Turner
8c918c6cec Make View::set_clean private. 2016-02-17 21:25:39 +00:00
James Turner
d4d2121641 View can created itself from config properties
- use in view manager
- make View constructor private
2016-02-17 21:25:39 +00:00
James Turner
02ff854603 Re-Name FGViewer to flightgear::View
- avoids confusion with osgViewer and fgviewer application.

(source files to be renamed in a follow-up commit)
2016-02-17 21:25:39 +00:00
James Turner
e60d9a191e Viewer: move camera-group to view manager
- also devirtualise many methods in FGViewer
2016-02-17 21:25:39 +00:00
Edward d'Auvergne
97f8cdaaea Fix for the particle system.
The problem was that the change to make FGScenery a standard subsystem caused
the particle OSG group to no longer be inserted into the scene graph.  The
solution was to convert the particle group to be set up as a standard branch of
the scene graph, alongside the terrain, models, aircraft, and interior branches.
The particle system is now set up as part of the init() subsystem function call,
so it is compatible with the new subsystem design.
2016-02-16 17:33:40 +01:00
Edward d'Auvergne
34daa4de0b HUD fix for MSVC math.h incompatibility with C-99 and the round() function. 2016-02-11 19:36:32 +00:00
Rebecca N. Palmer
e1d0699bdb add new QtFileDialog to avoid using Nasal in file selectors
(and hence avoid applying Nasal security rules to them)
2016-02-10 22:58:56 +00:00
Rebecca N. Palmer
16e6009255 Nasal security: give a more user-friendly error on self-check fail
https://sourceforge.net/p/flightgear/mailman/message/34701972/
2016-02-10 22:54:52 +00:00
Edward d'Auvergne
c889198d09 Redesign of the latitude and longitude formatting for the HUD.
This follows from http://thread.gmane.org/gmane.games.flightgear.devel/78650 and
resolves the sign bug https://sourceforge.net/p/flightgear/codetickets/1778/ .

Combined with a matching change to FGData, this changes the HUD formats from the
current set of 3 (note that the text in brackets is not shown in the HUD
preferences PUI dialog, but is show here for reference):

    0) Decimal degrees (37.618890N -122.375000W)
    1) Degrees, minutes (37*37.133N -122*22.500W)
    2) Degrees, minutes, seconds (37*37 08.0 N -122*22 30.0 W)

to (here the text in brackets will be shown in the PUI dialog):

    0) DDD format (37.618890N 122.375000W)
    1) DMM format (37*37.133'N 122*22.500'W)
    2) DMS format (37*37'08.0"N 122*22'30.0"W)
    3) Signed DDD format (37.618890 -122.375000)
    4) Signed DMM format (37*37.133' -122*22.500')
    5) Signed DMS format (37*37'08.0" -122*22'30.0")
    6) Zero padded DDD (51.477500N 000.461389W)
    7) Zero padded DMM (51*28.650'N 000*27.683'W)
    8) Zero padded DMS (51*28'39.0"N 000*27'41.0"W)
    9) Trinity House Navigation (51* 28'.650N 000* 27'.683W)
2016-02-10 21:49:56 +00:00
Rebecca N. Palmer
f749953493 Nasal security: don't break file dialogs
Include the directory itself when allowing reading
Don't kill the script on a denied directory read
2016-02-09 23:17:41 +00:00
Rebecca N. Palmer
74356e84f7 Nasal security: make directory() use fgValidatePath
Being able to list arbitrary directories is a privacy violation;
existing in-fgdata uses of this are all permitted paths
(i.e. not Terrasync; FileSelector doesn't use it)
2016-02-06 21:26:05 +00:00
James Turner
c72309360e Defensive handling of locales.
- Use setlocale() to ensure consistent handling of locales and
  string handling irrespective of whether or not QCoreApplication
  is invoked. Forces a the C locale for numerics and collation,
  since many pieces of FG assume this.
2016-02-02 20:44:46 +00:00
Erik Hofman
5ef3413373 Add the latest batch of JSBSim changes. Tested with the Shuttle 2016-01-29 12:23:58 +01:00
James Turner
9172a8a8a9 VS2013 fixes for some FDMs. 2016-01-27 14:00:09 +00:00
James Turner
bb9fd9defe Fix a bug with updating packages.
- always refresh the catalogs each launch, so we don’t get mismatches
  between the cached copy the and package zips.
2016-01-26 16:46:58 +00:00
James Turner
acb630095d Possible fix for Mac strncmp crashes. 2016-01-26 07:48:30 +01:00
James Turner
2677b3a226 Use target_include_directories in some places.
I didn’t know about this feature when doing the original CMake files,
we can use this to target header-file includes more precisely.

(Probably more cases exist that can be changed from global to target-
specific includes)
2016-01-26 07:48:30 +01:00
Gijs de Rooy
9e7c3c5c89 Fix #1744: disable commradio when unserviceable 2016-01-25 16:38:57 +01:00
James Turner
81792bd6d0 Adjust fg root processing order
- ensure fg-root and FG_ROOT are higher precedence than the Qt gui
2016-01-19 18:32:20 -05:00
James Turner
d81d353940 Improved fg-root control from the Qt Launcher
- add a button to the main dialog, explaining how to adjust the 
  fg-root path via the GUI
- tweak the GUI flow to support explicitly changing the path even
  when the default path is acceptable.
2016-01-18 20:06:43 -05:00
bcoconni
bf851605fb Fixed a bug which caused the solid propellant thrusters of the space shuttle to be unconditionnally ignited during the trimming. 2016-01-17 10:26:25 +01:00
James Turner
e37e0d1bcf New log class for TerraSync 2016-01-16 15:50:13 -06:00
Bertrand Coconnier
95b932e9b3 JSBSim dropped the support of the simplex trim code 2016-01-16 19:36:32 +01:00
Bertrand Coconnier
f526dcdf3a Fixed the initialization process for JSBSim models: the error message "FGTrim::calcRotation DistPlane^2 larger than sqrRadius" should no longer be issued 2016-01-16 19:32:50 +01:00
bcoconni
4d2f9e7955 Remove the error message about the property atmosphere/P-sl-psf that can't be tied 2016-01-16 13:14:51 +01:00
Torsten Dreyer
6f09b9e31e httpd: expose /fg-home and /fg-root 2016-01-13 13:25:16 +01:00
James Turner
e3fe8ae199 Log options to INFO level when processing
- ensures they occur in the fgfs.log which should aid problem
  tracing.
2016-01-12 17:33:57 -06:00
James Turner
eb0f724c13 Fix a typo breaking some takeoff-state logic. 2016-01-12 17:26:06 -06:00
James Turner
e32b02b28f Launcher: fix slot name for old-style syntax 2016-01-12 17:25:54 -06:00
James Turner
ef1fd62b4b Fix an unused variable in non-developer-warning mode. 2016-01-12 12:50:58 -06:00
James Turner
a549c8fe45 Fix unused constants in YASim 2016-01-12 12:50:44 -06:00
James Turner
c62b004438 Fix many clang errors in UIUC code
- because uiuc_warning_error always called exit(-1), it can be marked
  no return, so Clang realises that when it’s used in the ‘else’
  side of a parsing test, uninitialised variables in the enclosing
  call site are safe.

(Requires Simgear update to define SG_NO_RETURN helper)
2016-01-12 12:50:31 -06:00
James Turner
dc17b5dda2 Fix unused variable in LaRCsim 2016-01-12 12:49:14 -06:00
James Turner
a972df05dc Fix a potential use-after-free in ATC code
- when dynamics shuts down the ATC controllers, they clear their
  traffic vectors (destroying the records), but we didn’t notify
  the AI aircraft of this. Ensure the controller is cleared so
  the AI aircraft shutdown doesn’t crash.
2016-01-12 12:22:23 -06:00
Erik Hofman
508c367c5b Sync. again 2016-01-12 19:05:51 +01:00
Erik Hofman
6e1b5e9f2e Fix a singed/unsigned warning 2016-01-12 19:05:51 +01:00
Torsten Dreyer
296849cf3d Fix a bug for allowed paths
Under some conditions on my system
aircraft_paths.begin() was equal to scenery_paths.end()
This resulted in neither of them being added to read_allowed_paths
followed by failure to load Nasal scripts from the aircraft directory.

This might happen, if scenery_paths gets allocated just before aircraft_paths
in memory.
Better loop across the desired lists instead of using fancy tricks with
the iterator.
2016-01-12 11:19:26 +01:00
James Turner
0250d2ee5b Bugfix: pause works for JSBsim/Yasim again 2016-01-11 11:47:40 -06:00
Erik Hofman
f19c8ac05d Apperently maybeRestoreAircraftSelection() needs to be a slot 2016-01-11 09:46:16 +01:00
James Turner
409ffc971d Fixes to launcher aircraft delegate.
- fix some text size computation issues
2016-01-10 23:46:44 -06:00
James Turner
4396c035df Linux build fix. 2016-01-10 22:11:32 -06:00
James Turner
f2bf30bcc7 Current time of day (warp) fixes:
- sim-speed-up (a/A keys) offsets warp correctly. This means at 4x speed
  up the warp will increase by 3 seconds for one elapsed real second.
  In practice this means simulation elements timed using sim ‘current time’
  will be correctly synchronised with those using simulated elapsed time.

  (AI traffic being a prime example of this)

- warp-delta (t/T keys) is independent of frame rate, and works when
  paused. The warp-delta values in the keybindings / GUI dialog
  will need to be updated since warp-delta in now seconds-per-second,
  as opposed to seconds-per-frame.
2016-01-10 22:10:10 -06:00
James Turner
d10d279064 Launcher finds parking positions from scenery
- change launcher to examine the scenery paths and hence load
  ground-net files for airports to populate parking data.

- refactor ground-net XML parsing to use FGGroundNetwork only, not
  AirportDynamics. 

- change parenting  of GroundNetwork to Airport, since it contains
  immutable data now.
2016-01-10 16:38:01 -06:00
James Turner
4befe0e6ea Launcher: Maintain aircraft selection better
- when launching or toggling settings, try to keep the current
  aircraft selected and in-view.
2016-01-10 13:47:57 -06:00
James Turner
b0ee3f98f3 ‘only show installed checkbox’ for Qt launcher
- will be replaced when I think of a prettier UI, but this
  feature is important to have for now.
2016-01-10 12:56:46 -06:00
James Turner
078366cbf7 Fix some FDM warnings with Clang 2016-01-10 12:55:18 -06:00
James Turner
e5c6d14cef Allow re-ordering of paths in the launcher.
- suggested by Gilberto, allow the user to set the order of the
  scenery and aircraft paths by dragging.
2016-01-09 17:17:58 -06:00
James Turner
a1b88d77ab Fallback for runway assignment logic
- when no runway use preferences XML exists, be smarter about using
  available runways. Makes the common case of using two parallel
  runways for arrivals and departures work, greatly improving AI
  traffic behaviour.
2016-01-09 13:48:00 -06:00
James Turner
704aba9041 Fix a dumb AI traffic bug I introduced. 2016-01-06 22:27:33 -06:00
James Turner
b2bec04733 Fix acceleration path of default takeoff taxi. 2016-01-06 17:58:24 -06:00
James Turner
ed8970a29d Fix some more uses of libC time() 2016-01-05 23:19:28 -06:00
James Turner
52f39abc6b Apply /sim/speed-up to general subsystem dt
- consistent with pause (freeze), /sim/speed-up is now applied to the
  dt value for all subsystems, not just the FDM and some instruments.
  For example AI traffic can now be sped-up or slowed down.
- requires both an FGData and Simgear update.
2016-01-05 23:19:28 -06:00
James Turner
540d4c2111 Use SGTime instead of time() in traffic/AI code
- avoids manual handling of /sim/time/warp in many places
2016-01-05 23:19:28 -06:00
James Turner
ac146f5658 Remove dt member of AIAircraft 2016-01-05 23:19:28 -06:00
James Turner
fadad5d70b Make TrafficRecord own its AIAircraft.
- use the ref-counting system, hopefully avoid a dangling pointer
  crash I encountered. (Of course it may turn into a leak)
2016-01-04 13:34:39 -06:00
James Turner
359f924ec9 Package variants working. 2016-01-03 20:58:03 -06:00
James Turner
c400405b0a Chatter-queue moved out of globals
- now lives as part of the sound-manager, yay.
2016-01-03 12:00:15 -06:00
James Turner
fc9c43b48d Remove FontCache from globals.
- access via a singleton instead.
2016-01-03 12:00:15 -06:00
Erik Hofman
0cd38c8be4 Remove scenefx code, it keeps crashing in untracable places and I lost interrest. It was a hughe waste of time 2016-01-03 14:38:18 +01:00
James Turner
52fd6986f8 Pull Sound-manager out of FGGlobals 2015-12-31 15:19:57 -06:00
James Turner
ba56c42eb4 Pull Ephemeris out of FGGlobals 2015-12-31 15:19:51 -06:00
James Turner
9e4e6a6fbf Avoid view-manager returning default SGGeod
- when switching views, force an update() to ensure view position
  is valid. Otherwise various subsystems such as AI traffic and the
  tile manager see a request for a 0,0 location.

- when switching to model view, we still generate a 0,0
  location initially - to be fixed.
2015-12-30 14:48:01 -06:00
Erik Hofman
335fda719d Prevent two possible nan's 2015-12-29 14:55:22 +01:00
Erik Hofman
d6c5dc647d Do not call setIsPushback, it causes a segmentation fault after about 10 minutes. I did commit this change in 6b9a28a568 to fix a warning, but it night not have been the wisest thing to do. 2015-12-24 13:44:34 +01:00
Erik Hofman
de023dd7bd Fix the tile-manager subsystem name 2015-12-24 11:52:09 +01:00
James Turner
7644c74df9 Better Traffic performance data warnings. 2015-12-22 15:15:27 -06:00
Torsten Dreyer
7a69b9beff don't always open "file opened in new browser window" popup
Setting /sim/gui/show-browser-open-hint to false disables the popup.
Default is true (show the popup)
2015-12-22 11:42:27 +01:00
Torsten Dreyer
2b66cf3484 Remove unused code 2015-12-22 11:41:56 +01:00
James Turner
6da9461f92 Fix a typo 2015-12-19 00:32:25 -08:00
James Turner
c69e6fde12 AI subsystem now does an orderly shutdown
- remove special case logic which is no longer required
2015-12-19 00:30:31 -08:00
James Turner
83ea6d32d0 Make PerformanceDB a real subsystem 2015-12-19 00:29:00 -08:00
James Turner
e80fc563e5 Fix off-by-one errors in GroundController
findSegment() and segments[] array use different indexing, account
for this in the conversion to always use findSegment
2015-12-19 00:08:07 -08:00
James Turner
b7c88e7acc Stop OSG threading earlier on shutdown.
Avoid intermittent race conditions on shutdown when the OSG 
pager/Db thread is running. Ensure the OSG threads are stopped before
we start tearing down any scene graph nodes.
2015-12-18 22:00:37 -08:00
James Turner
0e71a9593b Quiet down Traffic error logging. 2015-12-18 21:59:28 -08:00
James Turner
865bb365ed Trying to bullet-proof the traffic code. 2015-12-18 21:42:22 -08:00
James Turner
0f590280c7 Aircraft-model subsystem behaves better
- make shutdown logic more robust
- shutdown is no longer special cased in globals.
2015-12-18 20:13:23 -08:00
James Turner
89065ea5c2 Proper shutdown() for the model manager
- also move property setup to bind/unbind
2015-12-18 19:56:56 -08:00
James Turner
c76d106e64 Runtime checks for GroundContoller crashes.
Trying to identify what’s actually going wrong here.
2015-12-17 20:23:45 -08:00
James Turner
b431696e9b Fixes for first/last legs on a route
- fixes total route distance calculation
2015-12-17 19:22:14 -08:00
James Turner
c585f7f7d1 Asserts to pin down a reported crash. 2015-12-16 13:02:06 -08:00
Erik Hofman
64b80b4dab Sync with JSBSim again: remove a lot of unused trimming code 2015-12-15 09:47:08 +01:00
James Turner
ff33aa038e Fix a startup issue Vic Mar reported
- accept invalid/missing airport IDs when starting ATC
2015-12-14 14:59:33 -06:00
James Turner
9c467af6bf Interim windows build fix
(real fix to follow shortly)
2015-12-14 10:56:42 -06:00
James Turner
e5fa1a5ab1 Merge /u/userid-1550991/flightgear/ branch next into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/31/
2015-12-14 14:57:18 +00:00
Erik Hofman
a5e516fe8c Replace a program segmentation fault by an annoying message 2015-12-14 11:14:40 +01:00
www2
2da5541901 Add feedback if prompt mode is use 2015-12-13 15:57:53 +01:00
www2
95e3d00a17 Add new commands to telnet protocall
New comands:
setb set a Boolean value
setd set a Floaring point value
seti set a integer value
del delete a node
2015-12-12 15:43:00 +01:00
James Turner
7afedb1702 Work on visualisation of Vias 2015-12-11 13:43:25 -06:00
James Turner
846fd21698 GUI support for VIA/Discontinuity 2015-12-11 13:43:25 -06:00
James Turner
caead66ba6 Nasal support for VIA / Discontinuity 2015-12-11 13:43:25 -06:00
James Turner
eaa147e3c2 Work on FlightPlan VIA / discontinuity support.
Needed for realistic FMS route support.
2015-12-11 13:43:25 -06:00
James Turner
a55c939c5e Fix a JSBSim crash on OSG-quit
(i.e Cmd-Q / window closing, not the normal FlightGear quit sequence)
2015-12-11 12:49:32 -06:00
James Turner
8877b442f8 ATC/Traffic doesn’t crash reset.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
2015-12-11 12:11:59 -06:00
James Turner
1544641405 Remove view/tile/scenery members from globals
- also fix sound manager creation
2015-12-11 12:11:59 -06:00
Erik Hofman
6b9a28a568 Fix warning: variable ‘isPushBackRoute’ set but not used 2015-12-11 11:39:29 +01:00
James Turner
43fcbd2246 Progress towards testing
- remove route-manager from global variables
2015-12-10 16:40:22 -06:00
James Turner
76c6665af4 Merge /u/edauvergne/flightgear/ branch lat_lon_precision_fix_v3 into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/23/
2015-12-10 22:39:31 +00:00
James Turner
d891c5928c Remove /sim/temp/winding-ccw property
- part of work on unit-testing, remove OpenGL usage in fg_props
2015-12-10 15:53:05 -06:00
James Turner
545b347a16 Relocate implementation of geocRadialIntersection 2015-12-10 15:53:05 -06:00
James Turner
d7a680e848 Templated subsystem handling
- remove explicit FGControls var from globals, as part of work
  towards unit-testing infrastructure.
2015-12-10 15:53:05 -06:00
James Turner
6446d67431 Split GroundNetwork class down the middle
- ATC functions move to GroundController, which layers above
  remaining GroundNetwork functionality
- dynamics owns both the groundNetwork and the ground controller.
2015-12-10 15:53:05 -06:00
James Turner
8b49ed08cc Merge /u/edauvergne/flightgear/ branch warning_cleanup_UIUC_LaRCsim into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/26/
2015-12-10 20:22:56 +00:00
Erik Hofman
c1729253ee Read the scenery global scene effects configration file and update them every frame. The SceneFX class is not yet registered though. 2015-12-10 13:24:52 +01:00
Edward d'Auvergne
9b7db929f2 LaRCsim FDM - detabbing of all files.
All '\t' have been replaced with 8 spaces, as most of the code is indented with spaces.
2015-12-10 10:07:21 +01:00
Edward d'Auvergne
dc04fc2294 UIUC FDM - detabbing of all files.
All '\t' have been replaced with 8 spaces, as most of the code is indented with spaces.
2015-12-10 10:04:45 +01:00
Edward d'Auvergne
7ed80221c3 LaRCsim cleanup of -Wimplicit-function-declaration compilation warnings.
The stub FDM/LaRCsim/default_model_routines.h header has been expanded and completed.
2015-12-10 10:01:37 +01:00
Edward d'Auvergne
97d0ab7eb9 LaRCsim cleanup of -Wunused-variable compilation warnings.
A number of static array definitions were shifted into the scope of the function.
2015-12-10 09:23:29 +01:00
Edward d'Auvergne
cf9e3e7bf0 LaRCsim cleanup of -Wformat-contains-nul compilation warnings.
The sprintf() function automatically adds the terminating null character, so no
need to have it in the formatting string.
2015-12-10 09:13:34 +01:00
Edward d'Auvergne
13b05db6f9 UIUC cleanup of -Wunused-but-set-variable compilation warnings.
The two unused variables were commented out.
2015-12-10 09:11:09 +01:00
Edward d'Auvergne
4eeeaf140c UIUC cleanup for -Wsign-compare compilation warnings.
The string find_first_not_of() and find_first_of() functions return string::npos
if not found, rather than -1.
2015-12-10 09:04:23 +01:00
Edward d'Auvergne
e7d405d0ee UIUC and LaRCsim cleanup of -Wunused-variable compilation warnings.
This is for defined but unused variables, many of which are in commented out
code.
2015-12-10 09:04:18 +01:00
Edward d'Auvergne
ce7c6de726 UIUC cleanup of -Wparentheses compilation warnings. 2015-12-10 09:04:09 +01:00
Erik Hofman
5c7d261df5 Sync JSBSim again 2015-12-07 11:10:03 +01:00
Edward d'Auvergne
912215e949 The OSG version is now printed with --version.
This adds the OSG version number between the simgear and PLIB versions.
2015-12-05 15:24:47 +01:00
James Turner
2af076e6cb Add airport dynamics manager
- decouple dynamic airport data from the static (nav-db) data.
2015-12-05 00:25:29 +00:00
Edward d'Auvergne
524136d709 Minor rounding error fix for the latitude and longitude strings.
This is for the FGProperties::getLongitudeString() and
FGProperties::getLatitudeString() functions.  The previous algorithm was to
round the degrees up by the smallest fraction required to prevent a round up to
60 minutes or seconds, and then round down the final minutes or seconds by the
same fraction.  The new algorithm is to detect if the final minute or seconds
will be rounded to 60 by the string formatting and, if so, the higher unit
(degrees or minutes) is incremented by one, and the lower unit decremented by
60.
2015-12-02 17:48:02 +01:00
James Turner
fc887b106b Checkpoint - ground-net skips the cache 2015-12-01 14:01:32 +00:00
Rebecca N. Palmer
d56fbfd415 Revert "Initialise Qt earlier, and whenever available"
Temporary workaround for
http://sourceforge.net/p/flightgear/codetickets/1819/

This reverts commit 3e67417bf0.
2015-11-30 23:10:32 +00:00
James Turner
6954360dfa Merge /u/r-harrison/flightgear/ branch next into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/21/
2015-11-29 21:51:08 +00:00
Richard Harrison
0368e9a003 Fix indentation and use naIsNil to determine if _globals is nil 2015-11-29 19:15:24 +01:00
James Turner
cec1de6219 Use a transaction when indexing polylines. 2015-11-29 14:18:30 +00:00
James Turner
8bfb1c3aa5 Move functionality into clear_fg_scenerey helper. 2015-11-27 23:25:53 +00:00
James Turner
5e4f212b84 Remove some debugs 2015-11-27 23:25:24 +00:00
James Turner
6ee7e51af3 Clamp diagram zoom.
- avoid poor performance and unusable UI when zooming out
2015-11-27 23:25:11 +00:00
James Turner
242e79f5e9 Fix some coastline issues. 2015-11-27 23:02:42 +00:00
James Turner
bfb539f090 Launcher shows polygon/polyline data 2015-11-27 23:02:42 +00:00
James Turner
e52e20b54f SHPParser 2015-11-27 23:02:42 +00:00
James Turner
6a41353bdc Remove accidentally duplicated functions. 2015-11-26 23:48:16 +00:00
James Turner
f39fc0f086 Remove a stray debug. 2015-11-26 23:48:16 +00:00
James Turner
a63fff14cc Graphical picking of parking/helipads too. 2015-11-24 22:14:22 +00:00
James Turner
cfcdd9da45 Add helipad support to the diagram.
- stops crashes selecting a heliport.
2015-11-24 21:46:14 +00:00
James Turner
b15e5f559f Remove long-obsolete fields 2015-11-24 21:46:14 +00:00
James Turner
3cee5eea73 Initial work on rendering parking locations. 2015-11-24 21:46:14 +00:00
Rebecca N. Palmer
cc725c61de Use SLOT for both uses of QTimer::singleShot
(fix Qt < 5.4 build)
2015-11-24 18:40:54 +00:00
James Turner
2d1c5d47ee Fix MSVC2012 build
- multi-line QStringLiteral doesn’t work on MSVC prior to 2013. Boo.
2015-11-24 15:36:53 +00:00
James Turner
9e60dcba61 Use old-style SLOT macro for Qtimer::singleShot
- member-function-pointer variant was only added in 5.4
2015-11-24 08:05:17 +00:00
Rebecca N. Palmer
997a431d53 {fatal,modal}MessageBox: Use Qt on Linux when available
(console error messages are invisible when started from an icon)
2015-11-24 07:24:32 +00:00
Rebecca N. Palmer
3e67417bf0 Initialise Qt earlier, and whenever available
(to allow it to be used for error boxes)
2015-11-24 07:21:52 +00:00
James Turner
be1291f689 Change handling of default hangar / catalog.
- no longer re-add it on startup, add an explicit button in the UI

(will add a more obvious item to the aircraft list in a follow-up
commit)
2015-11-23 22:58:00 +00:00
James Turner
4ea093ecc4 Ensure aircraft list stays in sync
- when removing a catalog, use the new notification to refresh
  the list, so we don’t show stale package data.
2015-11-23 17:59:16 +00:00
James Turner
3ccea681ea Fix merge noise 2015-11-23 01:19:03 +00:00
James Turner
579881322e Lat-lon startup location fixes. 2015-11-23 00:48:21 +00:00
James Turner
5184f3404c Labels on large airports in the diagram 2015-11-23 00:48:21 +00:00
James Turner
e356e691b2 Cap number of airports displayed in diagrams
- restrict heliports / seaports by aircraft type
- prioritise by runway length
- clean up airport label names
2015-11-23 00:48:21 +00:00
James Turner
1010caeaf6 Remove some debugs. 2015-11-23 00:48:20 +00:00
James Turner
97a5e15aaf Show paused message when starting frozen. 2015-11-23 00:48:20 +00:00
James Turner
e63a95feb9 Draw aircraft on airport diagram 2015-11-23 00:48:20 +00:00
James Turner
5fd350cb3d Fix unproject / navaid drawing. 2015-11-23 00:48:20 +00:00
James Turner
eb06aeba97 Closed airport support. 2015-11-23 00:48:20 +00:00
James Turner
f4500e03f4 Label de-overlapping for diagrams 2015-11-23 00:48:20 +00:00
James Turner
317498fe4a Move airplane drawing into the base class.
- ground work for showing airplane on airport diagram
2015-11-23 00:48:20 +00:00
James Turner
6ec9c36afb Fix Linux compilation issues. 2015-11-23 00:48:20 +00:00
James Turner
9ab672abd8 Location history re-instaed 2015-11-23 00:48:20 +00:00
James Turner
19a8fc8822 Fixing launcher save/restore of settings. 2015-11-23 00:48:20 +00:00
James Turner
aa58d5c761 Fix for determining towered vs untowered airports. 2015-11-23 00:47:01 +00:00
James Turner
b9acb26c07 Work on launcher diagrams. 2015-11-23 00:47:01 +00:00
James Turner
e5df6e6d4a Allow distinguishing un-towered airports. 2015-11-23 00:47:01 +00:00
James Turner
5043bf0966 Fixes to launcher aircraft thumbnail sizing
- handle large images and longer descriptions correctly
2015-11-23 00:47:01 +00:00
James Turner
ceebd59001 Fallback when aircraft description is missing.
- avoids corrupted delegate display caused by asking for
  bounds of empty string.
2015-11-23 00:47:01 +00:00
James Turner
a39df48772 Navaid diagram for launcher
- work in progress, needs labels
2015-11-23 00:47:01 +00:00
James Turner
2b18479859 Lat-lon position support 2015-11-23 00:47:01 +00:00
James Turner
adedf7af65 Navaid diagram work 2015-11-23 00:47:01 +00:00
James Turner
c277395010 Start-paused for in-air starts 2015-11-23 00:47:01 +00:00
James Turner
addcc432fd ILS drawing in the airport diagram 2015-11-23 00:47:01 +00:00
James Turner
09cac14089 Work on LocationWidget for Qt launcher 2015-11-23 00:47:01 +00:00
James Turner
56d7d049bc Launcher GUI for in-air / navaid starts 2015-11-23 00:46:25 +00:00
James Turner
1e213201cf Work on the launcher 2015-11-23 00:45:21 +00:00
Rebecca N. Palmer
9d0fe40a45 QtLauncher::initApp: store argc to avoid crash
As QApplication only stores a reference to argc, it may crash if
the argc passed to it goes out of scope.  (One way to trigger this
is to pass an invalid --fg-root, triggering an initApp call from
Options::setupRoot.)  Copy argc to prevent this.
2015-11-22 21:05:09 +00:00
Stuart Buchanan
660c38ce72 Fix for SEGFAULT when using multiple loggers.
Patch from Julian BREITENEICHER.
2015-11-22 17:11:36 +00:00
Rebecca N. Palmer
3e462f3056 fgValidatePath: allow Nasal to read user-set scenery directories
(but not the Terrasync directory, as Nasal can change that)
2015-11-22 11:27:39 +00:00
Rebecca N. Palmer
97f235173e fgValidatePath: documentation improvements 2015-11-22 11:03:00 +00:00
Rebecca N. Palmer
91dc448875 Simplify fgValidatePath + minor fix (requires simgear update)
Drop fgNormalizePath, use realpath() only
As this makes it accept relative paths, always use the returned
(absolute) version for the actual file operation to avoid check-to-use
races, or where this is not possible (NasalSGPath) explicitly reject
relative paths
Fix: do_save is a write, not a read
2015-11-21 21:37:19 +00:00
James Turner
29ef561ed9 Fix some inverted logic
- spotted by Thomas Geymayer!
2015-11-20 21:28:19 +00:00
Thomas Geymayer
fdf4a61ed5 fgcommand remove-subsystem: fix double delete/segfault. 2015-11-19 23:17:58 +01:00
James Turner
f110fc57d6 Fix enable/disable-freeze option.
- set /sim/freeze/clock as well as /sim/freeze/master

Fix by Hamza Alloush
2015-11-13 22:13:44 +00:00
James Turner
bf6ef6664c Fix for OSG 3.5 2015-11-13 22:13:44 +00:00
James Turner
ca1f8cddc9 Fix a package crash on startup. 2015-11-13 22:13:44 +00:00
James Turner
2314ccfe13 Developer-warnings
- make some existing warnings developer-mode only
- add a warning about legacy aircraft path usage
2015-11-13 22:13:44 +00:00
Erik Hofman
27ca027a7e Fix permissions 2015-11-10 16:15:42 +01:00
Erik Hofman
26f1d12ad7 Rename EnvironmentFX to SceneFX and rethink the aircraft model specific properties: use a samping factor which applies to both volume and reference_distance and max_distance 2015-11-05 15:31:52 +01:00
Erik Hofman
8363ee8784 Add Nasal bindings 2015-11-04 14:37:41 +01:00
Erik Hofman
0f113060e9 First implementation of an environment audio fx module 2015-11-03 14:51:01 +01:00
Torsten Dreyer
62d0d2ab06 event input system: be a little more helpful on errors 2015-11-02 11:42:30 +01:00
Erik Hofman
a0e31b5565 Sync. with JSBSim again 2015-10-30 10:10:01 +01:00
Torsten Dreyer
e324c89171 newnavradio: expose localizer crosstrack error 2015-10-08 10:18:14 +02:00
Florent Rougon
7198dec355 Use SGPath::realpath() on the value supplied for --aircraft-dir
* Before setting /sim/aircraft-dir from the --aircraft-dir option,
canonicalize its value with SGPath::realpath() as is already done in
FGGlobals::append_aircraft_path() for the paths given with --fg-aircraft
or via the FG_AIRCRAFT environment variable.

* This fixes a bug when --aircraft-dir is used, due to the fact that
fgValidatePath() canonicalizes its 'path' argument before matching it
against the allowed patterns, and therefore will not validate paths
under the directory specified with --aircraft-dir if this directory has
been given in a non-canonical form by the user (e.g., containing at
least one symlink component).

* This fix does not lower security: the path which is canonicalized has
been explicitely given by the user. This operation is already done for
all paths specified with --fg-aircraft or via the FG_AIRCRAFT
environment variable, via Options::initPaths() which calls
FGGlobals::append_aircraft_paths().

* To reproduce the bug, create a symlink (e.g., /tmp/aircrafts) to a
directory suitable for --fg-aircraft, then run:

  fgfs ... --fg-aircraft=/tmp/aircrafts \
           --aircraft-dir=/tmp/aircrafts/SenecaII --aircraft=SenecaII

This will trigger many failures such as:

  loadxml: reading '/tmp/aircrafts/SenecaII/Dialogs/registration.xml'
  denied (unauthorized directory - authorization no longer follows
  symlinks; to authorize reading additional directories, add them to
  --fg-aircraft)

(from do_load_xml_to_proptree() in flightgear/src/Main/fg_commands.cxx)

I have also tested this with the ec130b4 and the 777-200ER. Same
problem, same fix.
2015-10-06 21:54:50 +02:00
James Turner
b49dd70de9 Remove some debug noise 2015-09-27 23:13:18 -05:00
James Turner
5f0e347c60 Keep in sync with SimGear Package API 2015-09-27 19:44:39 -05:00
James Turner
43bcc85919 Correct handling of updating packages 2015-09-27 19:44:29 -05:00
James Turner
1e2460d9bf Disable mouse hover code for now. 2015-09-27 19:43:50 -05:00
Florent Rougon
1d34b96d49 Don't load resources for the current aircraft from several aircraft dirs
* If one has the same aircraft in several aircraft directories,
  FlightGear should not mix resources from the various aircraft
  directories. For instance, if one starts FG with:

    --fg-aircraft=/my/personal/dir:/path/to/fgaddon/Aircraft

  and one has in /my/personal/dir/ec130 a clone of the upstream
  developer repo, FlightGear should use either the upstream version from
  /my/personal/dir/ec130 or the FGAddon version from
  /path/to/fgaddon/Aircraft/ec130, but not some strange, untested hybrid
  of both.

* This commit makes sure that when the looked-up resource starts with
  Aircraft/<ac>, where <ac> is the current aircraft name [last component
  of aircraftDir = fgGetString("/sim/aircraft-dir")], then
  AircraftResourceProvider::resolve() doesn't search other aircraft
  directories if the resource isn't found under 'aircraftDir'.

* To reproduce the bug before this commit, you may add the following
  code (there is nothing specific about the SenecaII here, it's just the
  aircraft I used for testing):

    var file_path = resolvepath("Aircraft/SenecaII/flo-test");
    if (file_path != "")
      gui.popupTip("flo-test found", 2);
    else
      gui.popupTip("flo-test not found", 2);

  in a keyboard binding for the SenecaII (for instance; you may use the
  F11 binding that otherwise only prints a short message). You should
  add this to the SenecaII/SenecaII-base.xml file *that will be loaded
  by FlightGear*, let's say the one under /my/personal/dir in the
  example above (beware of the <path-cache> in autosave_X_Y.xml). Then,
  by creating or removing a file named "flo-test" in the SenecaII
  subdirectory of other aircraft dirs (for instance,
  /path/to/fgaddon/Aircraft in the example above), you can see that the
  behavior of the loaded aircraft is influenced by the contents of
  unrelated versions of the same aircraft that might be present in other
  aircraft dirs (e.g., loaded /my/personal/dir/SenecaII influenced by
  /path/to/fgaddon/Aircraft/SenecaII).

* Aircrafts loading resources using paths relative to the current
  aircraft directory (e.g., with 'resolvepath("flo-test")') are not
  affected by this kind of problem, because this scheme is handled by
  CurrentAircraftDirProvider, which does not exhibit this bug.
2015-09-26 09:45:33 +02:00
Rebecca N. Palmer
a64cf82296 Use +=, not (5.5+ only) append, for concatenating QVectors 2015-09-21 22:12:24 +01:00
James Turner
18a898f5f9 Lots of work on aircraft package support 2015-09-20 19:46:35 -05:00
James Turner
c2cbb36d16 Work around a strange link failure on Mac
- Xcode 7 seems to dislike this code as was, adjusted version
links fine. Very odd.
2015-09-20 19:45:03 -05:00
Rebecca N. Palmer
79f1da6bef Nasal: use SG_LOG for security error messages to avoid truncation
These are often too long for naRuntimeError's 128-char limit:
http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/55B55856.2030709%40worldwideweb2.nl/#msg34319969
2015-08-14 21:37:28 +01:00
bcoconni
7bcbe8e802 Fixed the pilot acceleration for consistency with the accelerometer computation 2015-08-09 20:00:08 +02:00