1
0
Fork 0
Commit graph

9771 commits

Author SHA1 Message Date
Szymon Acedański
14611e905e GUI: do not complain if only NavData is present in scenery folder 2017-03-09 00:10:26 +01:00
Szymon Acedański
bd0fa1fa5a Do not apply .ils.xml adjustments while building the cache 2017-03-09 00:10:26 +01:00
Szymon Acedański
e37fd6ea1f Minor comment fixes 2017-03-09 00:10:26 +01:00
Szymon Acedański
4403f22a8b Support multiple nav.dat and fix.dat files 2017-03-09 00:10:26 +01:00
Szymon Acedański
b9dbe9c9e7 nav.dat: support XP NAV1100 format
This allows using NavXP1100-formatted nav.dat from gateway.x-plane.com.

The skipped field types are:

14 Final approach path alignment point of an SBAS or GBAS approach path
15 GBAS differential ground station of a GLS
16 Landing threshold point or fictitious threshold point of an SBAS/GBAS
   approach

We don't have SBAS/GBAS in Flightgear.

This change also includes duplicate detection for multiple nav.dat files
support.
2017-03-09 00:10:26 +01:00
Szymon Acedański
2b2780bfca fix.dat: support XP FIX1101 format
Also: duplicates detection, in preparation for multiple fix.dat files
support.
2017-03-09 00:10:26 +01:00
Henning Stahlke
06ba4fe351 YASim wrap bugfix with version check to maintain compatibility with old aircraft config. 2017-03-07 20:47:43 +01:00
Henning Stahlke
1e92c33a9e YASim export config version used by aircraft to property tree.
Gives /fdm/yasim/config-version as integer (see enum in Version.hpp to decode).
2017-03-07 20:45:46 +01:00
Henning Stahlke
80462d23c5 YASim Wing: remove unnecessary local variable "root" (use _base);
calculate _tip in directly in one command
  clarify signature of Wing::interp()
2017-03-07 18:03:25 +01:00
Henning Stahlke
583ea27dd6 YASim Version: add tag for version 2017.2 2017-03-07 17:50:05 +01:00
Henning Stahlke
a56f85ac95 YASim removed unused include from Rotor.cpp 2017-03-07 17:50:05 +01:00
Henning Stahlke
6efa1ab821 YASim moved one liners 2017-03-07 17:50:05 +01:00
Henning Stahlke
ce4df326d7 YASim Airplane.cpp additional comments 2017-03-07 17:50:05 +01:00
Henning Stahlke
05f9fcfd10 comments 2017-03-07 17:50:04 +01:00
Henning Stahlke
dc66959b83 YASim comments 2017-03-07 17:50:04 +01:00
Henning Stahlke
1198f5a3ec YASim CLI tool: add print out of max lift and min drag
add drag(speed) print function
2017-03-07 17:50:04 +01:00
Henning Stahlke
cb7d2a1bc5 YASim Wing: add _aspectRatio and _meanChord.
(an some indent)
2017-03-07 17:50:04 +01:00
Henning Stahlke
a87442c6f3 YASim fix performance problem due to export to prop.tree. 2017-03-07 17:50:04 +01:00
Henning Stahlke
76a0ea96cc YASim clarification. Add const to method parameters in Math.hpp 2017-03-07 17:50:04 +01:00
Henning Stahlke
4cbe540bec YASim: convert local variables alpha and stallAlpha to members of Surface. 2017-03-07 17:50:03 +01:00
Henning Stahlke
5f78545961 only white spaces 2017-03-07 17:50:03 +01:00
Henning Stahlke
d4688d206a YASim: export surface data to property tree. 2017-03-07 17:50:03 +01:00
Henning Stahlke
d322ded552 YASim bugfix: ground effect did not calculate wingspan correctly;
Variable name clarification;
Add Wing::getWingArea, separate Wing::getWingSpan and Wing::getBase.
2017-03-07 17:50:03 +01:00
Henning Stahlke
559dcf4e32 YASim optimization: pre-calculate data for masses that do not change in flight to save CPU (RigidBody::recalc() runs at FDM rate).
export mass data to property tree.
2017-03-07 17:50:03 +01:00
Henning Stahlke
4e1be43f15 YASim: export wing data to property tree. 2017-03-07 17:50:03 +01:00
Henning Stahlke
021a9db9be YASim add surface id and export surface positions to prop tree after model compile. 2017-03-07 17:50:02 +01:00
Henning Stahlke
dd420c6ff4 YASim bugfix, correct an obvious copy-and-paste error 2017-03-07 17:50:02 +01:00
Henning Stahlke
41b18155a8 YASim: export FDM state (v, a, rot) to property tree. 2017-03-07 17:50:02 +01:00
Henning Stahlke
70dd3de3bb YASim: FGFDM convert local variable _yasimN into a class member 2017-03-07 17:50:02 +01:00
Henning Stahlke
2cac4e4671 YASim: Move variables and methods for input properties from FGFDM to ControlMap. 2017-03-07 17:50:01 +01:00
Henning Stahlke
f14cc3be33 Extend yasim-test.cpp; add print mass distribution, add plot with different configs 2017-03-07 17:47:51 +01:00
Henning Stahlke
6f1f850c11 YASim method name clarification Airplane::setWeight 2017-03-07 17:47:50 +01:00
Henning Stahlke
97a0511ce0 YASim method name clarification in class Surface 2017-03-07 17:47:50 +01:00
Henning Stahlke
91fd075796 YASim method name clarification Wind::setSlat 2017-03-07 17:47:50 +01:00
Henning Stahlke
91806861c6 YASim method name clarification Wind::setFlap1 2017-03-07 17:47:50 +01:00
Henning Stahlke
e69f6ba9ab YASim method name clarification Wind::setFlap0 2017-03-07 17:47:50 +01:00
Henning Stahlke
ce753c0382 YASim method name clarification Wing::setSpoiler 2017-03-07 17:47:50 +01:00
Henning Stahlke
b447bbdc5e Optimize YASim/RigidBody.cpp utilizing symmetry of tensor. 2017-03-07 17:47:49 +01:00
Torsten Dreyer
6257c29fd8 Merge /u/martymac/flightgear/ branch freebsd-fix into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/79/
2017-03-07 07:51:59 +00:00
James Turner
8d68741ee9 On-disk support for multiple primary aircraft.
Also add support for customised / per-variant thumbnails in on-disk
aircraft; equivalent support for catalog aircraft still to be done.
2017-03-05 22:02:25 +02:00
James Turner
41f875a729 Silence a warning about log levels.
These levels will never be set on the output side, so handle them
as default here.
2017-03-05 21:41:52 +02:00
James Turner
39b239957e Startup-tip system.
Replace the license / website text with a startup tip. Tips are shown
based on the day of the year, can be changed easily.
2017-03-03 23:21:18 +02:00
Ganael Laplanche
c91284b3e1 Link to execinfo to fix build on FreeBSD 2017-03-01 20:53:56 +00:00
James Turner
868ec1f500 Log a message when launcher is requested without Qt. 2017-03-01 15:27:33 +00:00
James Turner
3653508412 Build- and run-time concept of developer mode.
Make a single Cmake value to expose the build type to code, and use
this to default a run-time ‘developer-mode’ property, which can be
over-ridden from the command line.

Use this to drive the different warning levels. Policies subject to
review, especially whether nightly builds should default to 
developer mode or not.
2017-02-27 23:37:59 +00:00
James Turner
be0ede64be Make some warnings be developer-only. 2017-02-27 23:37:59 +00:00
James Turner
bd17a64487 Fix a typo in launcher console handling. 2017-02-27 23:31:08 +00:00
James Turner
ec8b55d3c5 Explicitly log nav-cache read-only flag. 2017-02-27 15:50:19 +00:00
James Turner
cad283b2ce Change Windows multi-app launch detection.
Instead of using a .pid file, use a named mutex. This avoids any chance of stale datacausing mis-detection.
2017-02-27 15:45:28 +00:00
Erik Hofman
706ce325d3 Do not forget to signal the proper signal number first 2017-02-27 11:50:51 +01:00
Erik Hofman
6179a8d8d7 Still generate a core file 2017-02-27 11:46:25 +01:00
James Turner
314844e3c8 Make —console work in the launcher.
As discussed on the ML, due to how this options is processed, the
launcher setting it doesn’t make it take effect, so deal with it
manually.
2017-02-27 00:06:41 +00:00
James Turner
e74ebabc36 Fix compilation with OSG 3.2 2017-02-26 23:58:41 +00:00
James Turner
c316bd4af8 Mark nightly builds visually on the splash.
Ensure testers are in no doubt what they’re getting from a nightly
build.
2017-02-26 23:58:36 +00:00
Peter Sadrozinski
ec4b9f8542 Alternative terrain engine based on pagedLOD
- remove TileMgr from sub systems - add to btg terrain engine
2017-02-26 10:17:15 -05:00
Bertrand Coconnier
6e9d4e8ae4 Linux/Unix are case sensitive. 2017-02-26 01:39:33 +01:00
James Turner
918db84ac4 New splash screen system.
Uses TTF fonts, and displays more information textually including
the application version and current aircraft.

Also rename FGRenderer::splashinit to preinit, as was suggested
a long time ago.
2017-02-25 21:47:58 +00:00
James Turner
17fe0460a9 Previews displayed in the launcher. 2017-02-25 21:47:58 +00:00
James Turner
38554f629f Merge /u/accek/flightgear/ branch ap-freed-pointers into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/75/
2017-02-25 16:41:02 +00:00
James Turner
5c0550b495 Merge /u/accek/flightgear/ branch fixlets-1 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/74/
2017-02-25 16:40:01 +00:00
Bertrand Coconnier
7cbdc8b923 Sync w/ JSBSim (use SGPath to manage file names) 2017-02-25 16:22:23 +01:00
Szymon Acedański
28e9ba21f6 Fixed route manager returning freed char* pointers via tied properties
On Mac it was visible as random strings displayed in the route manager
dialog for selected SIDs and STARs.

Depends on a SimGear change which introduces SGStringValueMethods.
2017-02-25 15:17:03 +01:00
Szymon Acedański
e1668a2919 Fixed a number of use-after-free bugs with FGPositioneds
These were due to converting FGPositionedRef to FGPositioned*
and then again packing the pointer into another ref-counted
FGPositionedRef.
2017-02-25 15:10:17 +01:00
Szymon Acedański
d401a50e0a Fix crash on Mac OS X when FG does not finish input init 2017-02-25 15:05:09 +01:00
Szymon Acedański
f71c20600a Fixed erroreous reference to array instead of its element
net->master_{bat,alt} are arrays, but were mistakenly used as
values.

This correctly generated a compilation warning.
2017-02-25 15:05:09 +01:00
Szymon Acedański
4fd89b0b8f Fixed compilation warning on Mac
IOHIDManagerRegisterDeviceMatchingCallback must not be called with
nullptr as the second argument.
2017-02-25 15:05:09 +01:00
Richard Harrison
80dc810d15 MP2017.2 V2 protocol enhancements
1. Add support for scaled floats; most of the floats we transmit are small and thus can fit into a scaled short.
2. Change most properties to use scaled floats.
2017-02-23 22:33:33 +01:00
Richard Harrison
3fceba7a24 MP2017.2 changes
Support for short int encoded values (32 bits with 16 bit for ID and 16 bits for value)

Added extra debugging options
1. Debug level
  bit 1 - loopback (show your own model as an MP model)
  bit 2 - dump outgoing packets
  bit 3 - dump incoming packets
  bit 4 - hexdump outgoing packets

2. Update property (/simwith packet
- configurable debug (loopback, packet trace (in,out), packet dump)
- prevent properties from being visible to V1 clients - to ensure reliable compatibility, with just the basic position message being processed. This allows more changes to the V2 protocol whilst giving basic V1 support
- add debug
2017-02-23 00:46:01 +01:00
James Turner
006ca7186b Fix updating of add-on aircraft in the launcher.
Kick off a re-scan when adding or removing paths.
2017-02-22 17:09:24 +00:00
James Turner
72988a6bb7 Add the default hangar automatically on first-run.
Slightly ungainly but ensures we start with the default hangar
available. It can still be removed and re-added as normal.
2017-02-22 17:09:23 +00:00
Bertrand Coconnier
86d46ce79c Sync w/ JSBSim 2017-02-21 22:35:09 +01:00
James Turner
c04406d75a Clean shutdown+join of FLITE synthesis threads.
use a marker value to wake the blocking queue, and allow the thread
loop to terminate cleanly, before calling join() from the parent
thread.
2017-02-21 11:01:16 +00:00
Richard Harrison
4f04975508 Merge branch 'next-2' into multiplayer-dev
# Conflicts:
#	src/AIModel/AIMultiplayer.cxx
#	src/MultiPlayer/multiplaymgr.cxx
2017-02-20 03:38:51 +01:00
Richard Harrison
60eee7722d Another different fix for the pointer conversion issue.
Based on the comments in the list I think it is better to keep the type that was originally provided as a reference, take the address of it, and store that in a ref_ptr.

Possibly the problem was never compiler related rather OSG related; I'm using 3.5.x and it appears that there are better built in type conversions compared to the target version of 3.2 that we are currently using.
2017-02-17 17:56:32 +01:00
James Turner
478171b8db Testing a different fix for ref-ptr conversion.
This ‘should’ work, but might fail the same as Richard’s
original patch. Let’s find out.
2017-02-16 18:43:58 -08:00
Richard Harrison
2226428b85 AI Multiplayer interpolation.
Whilst debugging I had a cannot increment nextIt - because it was at end(). No idea if this could ever happen in flight but it still seems sensible to protect against it.
2017-02-16 20:53:44 +01:00
Richard Harrison
36fd6466b7 Multiplayer packet handling bugfix;
Unknown property ID causes break out of the loop to ensure that no further properties are processed from the incoming packet
2017-02-16 18:39:38 +01:00
Richard Harrison
4a156fe0b0 Temporary fix to the canvas replacement visitor
Use pointers to allow compilation on Linux/Mac until this is fixed properly as OSG elements should always be accessed via the reference counting mechanism.
2017-02-16 18:38:48 +01:00
Richard Harrison
cbb7915e49 Ensure to break out of the loop when an unrecognised incoming MP property id is encountered in a packet. 2017-02-16 18:30:17 +01:00
Richard Harrison
11778f595f Fixed exception caused when next is equal to end()
This happened whilst running under debug whilst spawning at a new location so it may be an edge case, but still worth checking for
2017-02-16 18:29:44 +01:00
Richard Harrison
bde3dd0644 Canvas texture replacement visitor compiler fix.
Change to use pointers rather than osg::ref_ptr<osg::Group> - based on http://andesengineering.com/OSG_ProducerArticles/RefPointers/RefPointers I think that it is not possible that the scenegraph can be modified between the visitor and the modify, provided that the methods are called after each other like this:

  ReplaceStaticTextureVisitor visitor(name, new_texture);
  branch->accept(visitor);
  visitor.modify_groups();
  return visitor.getPlacements();
2017-02-16 09:16:27 +01:00
Richard Harrison
41ecfd1972 Merge branch 'next-2' into multiplayer-dev
# Conflicts:
#	utils/fgqcanvas/CMakeLists.txt
2017-02-15 05:19:12 +01:00
Richard Harrison
e48a3d8b32 Replacement Texture visitor modified iterator whilst iterating
The visitor would modify the scenegraph during the traversal by inserting groups; this is not valid when using vectors, and MSVC2015 debug RTL throws an exception when this happens.

The fix is to simply make a list of the textures that need to be modified and modify once the scenegraph traversal has finished.
2017-02-14 18:56:38 +01:00
Richard Harrison
fa142c9464 Change log level for "prepare_ground_cache(): scenery_available returns false" message as the message occurs at a high rate and seems to be more suited at bulk rather than warn level 2017-02-14 16:08:05 +01:00
Richard Harrison
275d73d01f Multiplay: Improve log message handling for win32. 2017-02-14 16:08:04 +01:00
Richard Harrison
ecc38e76c2 ShortInts now transmit properly over MP.
I get a "unknown property ID" as we appear to transmit an extra 0 at the end; will investigate this next
2017-02-13 02:06:39 +01:00
Florent Rougon
8f24de831d Adapt includes according to relocation of SimGear's iostreams-related files
This change is the logical counterpart of SimGear's change from commit
79f869a7f32910197be72b21f6489fbbba02c836 that moved the following files
from simgear/misc to simgear/io/iostreams:

  gzcontainerfile.cxx
  gzcontainerfile.hxx
  gzfstream.cxx (formerly zfstream.cxx)
  gzfstream.hxx (formerly zfstream.hxx)
  sgstream.cxx
  sgstream.hxx
  sgstream_test.cxx
2017-02-12 21:30:51 +01:00
Richard Harrison
31e684b7e0 added support for short int encoding.
This is where the ID and the 16 bit value are transitted in the ID field; with no data field. The ID is in the highword - and this is detected by the client and processed as |ID  |VALU|
2017-02-12 20:14:02 +01:00
Richard Harrison
561087a30a Support for configurable MP Protocol Version 1.1.2
/sim/multiplay/protocol-version is either 1 or 2

The properties defined in multiplaymgr define which version they are related to; however if these are in a more recent protocol than selected they will be transmitted in the selected protocol version.

The id property list now defines a "transmit as" - however this is not yet implemented.

This commit is intended to be a WIP towards changes for 2017.1 that will ensure any future protocol changes are compatible with this version (so this 2017.1 would be able to see a protocl V3 FG if one ever existed), key to this is to stop processing the property list as soon as an unknown ID is encountered.
2017-02-12 16:57:24 +01:00
James Turner
a83947edbf Basic validation of added scenery paths.
Try to catch uses adding parent directories and hence missing
scenery.
2017-02-10 23:04:00 +00:00
Richard Harrison
ded4ec5ae3 merged 2017-02-07 00:37:14 +01:00
Richard Harrison
5b4e55a9a9 Should never happen; but I had a crash here. 2017-02-07 00:36:24 +01:00
Richard Harrison
efcb969c7f Merge remote-tracking branch 'main-source/topics/nasal-aircraft-offset' into multiplayer-dev 2017-02-05 12:44:10 +01:00
Richard Harrison
abd3e02d4d partitioned MP messages.
This moves certain properties into a second part of the buffer that isn't visible to the first with the intention of making a backwards compatible MP protocol that can have more efficient encoding in a second part that is after MsgLen.

Unfortunately this doesn't work because the code ensures that MsgLen in the header matches the received byte count.
2017-02-04 23:59:14 +01:00
Richard Harrison
78cfcbe466 Ensure avoinics sound totally disabled for AI craft 2017-02-04 23:57:26 +01:00
Richard Harrison
a896f4d20c Added new generic properties.
New string encoding that is efficient.
2017-02-04 06:11:12 +01:00
James Turner
d13a672698 Expose aircraft-relative offset to Nasal.
This allows easily computing offsets in aircraft-relative coordinates,
and converting to global cartesian (ECEF) reference frame.
2017-02-02 17:54:18 +01:00
Richard Harrison
9c3697e16d Revised f_get_cart_ground_intersection to take 2 parameters, start:vec3d(x,y,z) , direction:vec3d(x,y,z) and returns geod hash.
Revised logic of f_get_cart_ground_intersection to make it more readable by checking the parameter validity at the beginning of the function
2017-02-02 17:25:40 +01:00
James Turner
d05b934702 Revert "Fixes for HUD, model-manager listeners."
This reverts commit 831053bd04.

See if this fixes the problem deleting models which Denk reported.
2017-02-02 17:02:39 +01:00
Erik Hofman
05b2b6536b Make use of the Vector new interpolation function 2017-02-02 11:35:55 +01:00
Richard Harrison
a9c55b1760 Change log level for "prepare_ground_cache(): scenery_available returns false" message as the message occurs at a high rate and seems to be more suited at bulk rather than warn level 2017-02-02 06:25:48 +01:00
Richard Harrison
4e87b8ea9a Multiplay: Improve log message handling for win32. 2017-02-02 06:25:35 +01:00
James Turner
0f3659818b QtInfoMsg requires Qt 5.5 2017-02-01 17:36:48 +01:00
James Turner
8f7c0d6801 Scenery extraction: set progress text
Fixes bug:https://sourceforge.net/p/flightgear/codetickets/1938/
2017-01-31 17:11:44 +01:00
Richard Harrison
0bf80f9b2a Add protection to the multiplayer (AI) interpolation to protect against segfaults when the previous and next packets contain different properties. 2017-01-30 23:25:00 +01:00
Erik Hofman
e39eac8a6d Nicer, human readanle, stack trace output 2017-01-30 15:58:09 +01:00
Erik Hofman
57dc778565 Fix a last minute typo 2017-01-30 12:31:05 +01:00
Erik Hofman
182f758eb7 Add a segmentation-fault report for Linux and Apple 2017-01-30 12:29:51 +01:00
James Turner
5d27d2509f Add “—-log-file” option, to log to other locations.
Each argument creates another log file, in the directory named. Symbolic
value ‘desktop’ creates logs on the user’s desktop.

Needs corresponding SimGear commit to build
2017-01-30 08:01:20 +01:00
James Turner
658074f78e Map Qt log to the Simgear log. 2017-01-30 08:01:20 +01:00
Erik Hofman
7133bc5c0f Make MSVC happy 2017-01-30 00:41:27 +01:00
Erik Hofman
ebfadb908c Make sure the AISim code compiles with the latest SIMD code changes in simgear 2017-01-29 15:27:41 +01:00
Rebecca N. Palmer
2b1336cd39 clear GroundLightManager also on non-standard exits to avoid crash
(e.g. --show-aircraft,
https://sourceforge.net/p/flightgear/codetickets/1935/ )
2017-01-28 23:07:23 +00:00
James Turner
d343496084 Check nav-cache write-ability explicitly.
Check the file permissions before opening using the new SGPath APIs,
and validate the result using Sqlite APIs after opening.
2017-01-28 16:05:18 +00:00
James Turner
8472f8c6d0 Fix positional ordering of remote-canvas elements.
The mirror protocol now sends the position for internal as well as
leaf nodes, and the group uses this data to sort when no explicit
Z-indices exist. This gets the extra-500 much closer to working!
2017-01-26 23:14:48 +00:00
James Turner
c9f922ce1b Expose node position over property-mirror protocol. 2017-01-26 20:36:07 +00:00
Viktor Radnai
a26a5d741b Make wheels spin down slowly once off the ground 2017-01-26 20:36:07 +00:00
Erik Hofman
1a0537e493 Silence a few compiler warnings 2017-01-26 15:37:43 +01:00
James Turner
70e79a849e Tweak launcher to be a MainWindow
For unknown reasons this seems to alleviate the word-wrap / min-height
bug on Windows. Committing so we can test and verify this is really
the case before the next release.
2017-01-26 00:38:19 +00:00
James Turner
fb1a29200a Merge /u/setvisible/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/72/
2017-01-25 23:36:52 +00:00
James Turner
0fe14f7c36 Use enable-hot flag in model manager.
Allow control of the terrain flag on models added via the model
manager at runtime.

Designed and requested by Henning Stahlke
2017-01-25 22:19:15 +00:00
James Turner
a0f2726a39 Set default airport/aircraft in the launcher.
Parse the defaults file to set the desired default aircraft and
airport when no previous state exists.

Fixes:
https://sourceforge.net/p/flightgear/codetickets/1936/
2017-01-25 20:41:40 +00:00
setvisible
7d02ffecab Changed aircraft list's scrolling policy to *ScroolPerPixels*, because items have non-regular height. 2017-01-25 18:40:40 +01:00
setvisible
928567650f Added the missing FG icons to the Qt dialogs 2017-01-25 18:18:11 +01:00
Torsten Dreyer
1f9ece8303 Location preset for ENBR (2017.1) 2017-01-25 14:00:06 +01:00
James Turner
6311e1ad24 Merge /u/setvisible/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/70/
2017-01-23 09:16:21 +00:00
Stuart Buchanan
dab9a9fc73 Remove /sim/rendering/building-mesh.
Made redundant by /sim/rendering/scenery-path-suffix
2017-01-21 22:22:43 +00:00
martymac
ffc7ad6cdf Fix build with Clang 4.0.0.
Those patches fix errors related to ordered comparisons between pointers and
integers, such as the ones related here on FreeBSD :

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216203
2017-01-21 21:32:50 +00:00
setvisible
5ce85c2248 fixed the missing FG icon (QtLauncher's mainwindow) 2017-01-21 19:23:21 +01:00
James Turner
8472a8c38a Launcher smoothly scales thumbnails.
Was accidentally using nearest, not linear, interpolation when
resizing thumbnails. Very pixels. Much ugly.
2017-01-17 22:18:35 +00:00
Erik Hofman
404fad4254 MSVC fix 2017-01-15 09:26:34 +01:00
Erik Hofman
9f9f1c631f Add the latest code for reference in the JSBSim mailing list while bug hunting 2017-01-14 14:33:28 +01:00
Erik Hofman
1ef1d5ad43 Fix a potential segmentation fault and turn it into a harmless message. 2017-01-14 10:37:42 +01:00
Erik Hofman
ed4a9337d9 Fade in the sound exponentially at startup 2017-01-12 15:06:04 +01:00
James Turner
88fc98f57b Mcc build fix for JSBsim executable. 2017-01-12 12:30:43 +00:00
Geoff McLane
52572ef1f3 Add back a JSBSim.exe build, install 2017-01-12 12:30:42 +00:00
Geoff McLane
c7391668e6 To build JSBSim, add copy from jsbsim-code repo 2017-01-12 12:30:42 +00:00
Erik Hofman
f54e03d7c6 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2017-01-12 11:45:08 +01:00
Erik Hofman
9f6422b5e2 only start the sounds when the soundmanager becomes active 2017-01-12 11:44:53 +01:00
James Turner
78498c560d Rename preferences.xml -> defaults.xml
Requires FGData commit: 0565eaab10a5d466cd485766b17d1870936a0a57
(which actually renames the file).

Also disables the preferences-load command since I don’t believe it
would actually be safe to reload the defaults without doing a simulator
reset (aircraft -set.xml values would be overwritten, for example)
2017-01-12 09:45:19 +00:00
Erik Hofman
2098593531 Do not proceed in update() until is_active() returns true 2017-01-11 15:14:08 +01:00
James Turner
ac8fb6fd24 Add some additional check to NavCache opening.
Hoping to capture why opening the DB read-write fails in some cases
on Windows.
2017-01-10 10:44:18 +00:00
James Turner
9441f0d656 Work-around OS-X event-input shutdown crashes. 2017-01-09 16:54:15 +00:00
Erik Hofman
596ba557f1 Detect the absence of SSE2 hardware as soon as possible and bail out if it is not found but FligthGear is compiled with SSE2 support 2017-01-06 16:30:51 +01:00
Erik Hofman
9a71f6348f A new batch of updates, slowly moving forward 2017-01-06 15:02:35 +01:00
Florent Rougon
d762db2db8 Fix null pointer dereference introduced by 8aec4a0cef 2017-01-06 13:07:00 +01:00
Erik Hofman
cf935b5882 Try to prevent a possible device-by-zero 2017-01-05 14:35:50 +01:00
James Turner
4a3ee6a74a Relax base-package and SimGear version checks.
As discussed on the devel list, only require the major+minor versions
of FG+SG+data to match by default. If we encounter a situation on
a release branch where stronger checks are needed, it’s easy to
restore.
2017-01-05 11:09:41 +00:00
Florent Rougon
ea827f5677 Revert commits e1b65590, 0b1c3568 and 72886289
Commit e1b65590cb was:

  Add the top-level options.xml and Translations directory moved out of
  FGData

Commit 0b1c356837 was:

  Make the FG installation prefix available to C++ code via config.h

Commit 7288628919 was:

  Load --help output and translated strings from
  $FG_INSTALL_PREFIX/share/flightgear

For the reasons of these revertings, see the thread at
<https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/CAHtsj_eFdxLoXXoNq%3D3OKNRmyR6-FowFL97TASdQJx8N05Lmig%40mail.gmail.com/#msg35580548>,
including <https://sourceforge.net/p/flightgear/mailman/message/35584363/>,
<https://sourceforge.net/p/flightgear/mailman/message/35584803/> and
<https://sourceforge.net/p/flightgear/mailman/message/35585421/> (appearing
out-of-thread according to the SF mailing list archive...).
2017-01-05 06:53:53 +01:00
Florent Rougon
9fdcca5e94 Revert relevant parts of f4d8d8c6a1
For the reasons of this reverting, see the thread at
<https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/CAHtsj_eFdxLoXXoNq%3D3OKNRmyR6-FowFL97TASdQJx8N05Lmig%40mail.gmail.com/#msg35580548>,
including <https://sourceforge.net/p/flightgear/mailman/message/35584363/>,
<https://sourceforge.net/p/flightgear/mailman/message/35584803/> and
<https://sourceforge.net/p/flightgear/mailman/message/35585421/> (appearing
out-of-thread according to the SF mailing list archive).
2017-01-05 06:31:52 +01:00
James Turner
206b272210 Add additional nameForType aliases 2017-01-03 15:16:23 +00:00
James Turner
f062fd0f60 Fix missing FGPositioned nameForType data. 2017-01-03 15:14:26 +00:00
James Turner
8aec4a0cef Silence a clang warning. 2017-01-03 15:11:12 +00:00
Florent Rougon
16fdfac7ae QtFileDialog: allow showing hidden files 2016-12-30 02:12:59 +01:00
Florent Rougon
f4d8d8c6a1 Minor changes
Essentially, adapt two places where options.xml was supposed to be found
in $FG_ROOT (in one of these, the comment was already incorrect way
before the recent change moving options.xml out of FGData).
2016-12-29 14:01:56 +01:00
Florent Rougon
7288628919 Load --help output and translated strings from $FG_INSTALL_PREFIX/share/flightgear
$FG_INSTALL_PREFIX represents the FlightGear installation prefix, such
as /usr, /usr/local or /opt/FlightGear on Unix systems. Copying the
--help output and translated strings there avoids having to write to
$FG_ROOT when 'make install' (or some OS-dependent equivalent) is run
from the FlightGear build directory---that would be ugly when $FG_ROOT
points to the FGData Git repository.

In FGLocale::FGLocale(), Translations/locale.xml is loaded using
readProperties() and fatalMessageBox() (in case an error is
encountered). Note that it couldn't be loaded via fgLoadProps() in the
current state, because this function relies on guiErrorMessage() when an
error is encountered, which calls mkDialog(), which itself does
globals->get_subsystem("gui"). This last call can't be done from
FGGlobals' constructor---where the 'globals' pointer is still
NULL---hence the need for a different mechanism not relying on
FGGlobals.

For consistency, and also because it provides a better user experience[1],
load options.xml using the same method instead of with fgLoadProps().

[1] I.e., in case of an error, the user gets to see a graphical popup
    window with an explanatory message before FG exits, assuming he is
    either on Windows, or on Mac, or has Qt support built in FG, as
    opposed to only an SG_LOG() call [because when options.xml is
    loaded, guiErrorMessage() used by fgLoadProps() can't use the 'gui'
    subsystem].
2016-12-29 13:40:16 +01:00
Florent Rougon
a6afda53bb Split flightgear::initApp() to make it usable even without FGGlobals initialized
- Add an optional argument to flightgear::initApp(): doInitQSettings.
  This argument defaults to true, preserving initApp()'s behavior in
  this respect. If this argument is set to false, FGGlobals doesn't have
  to be initialized.

- New function flightgear::initQSettings(), called by
  flightgear::initApp() when its 'doInitQSettings' argument is true.
  This allows initializing the QSettings exactly when it is needed.

- New function flightgear::checkKeyboardModifiersForSettingFGRoot().
  The code it contains used to be run from initApp(), which is
  undesirable because:

    1) initApp() is not only called at FG initialization (fgMainInit()),
       but also from QtMessageBox(), from QtFileDialog::exec() and twice
       from Options::setupRoot(). However, checking the Alt and Shift
       modifiers to set 'fg-root' in QSettings to the special value
       "!ask" only makes sense in fgMainInit(), not in these other
       places.

    2) This code relies on the QSettings to be set up, and therefore on
       FGGlobals. Thus, freeing initApp() of its dependency on FGGlobals
       requires splitting this keyboard modifiers checking code out of
       initApp().
2016-12-29 11:33:19 +01:00
Florent Rougon
0b1c356837 Make the FG installation prefix available to C++ code via config.h
CMAKE_INSTALL_PREFIX is now available as FG_INSTALL_PREFIX from
config.h.
2016-12-29 11:33:19 +01:00
Erik Hofman
2b9de5ceaa Make it possible to choose a different electrical circuit instead of the defaukt systems/electrical/outputs/turn-indicator by specifying the xml tag <electrical/> 2016-12-29 09:55:54 +01:00
James Turner
95e09de1ff Remove a log message. 2016-12-28 22:01:29 +01:00
Florent Rougon
d6313e52b5 Correctly initialize an SGPath from the APPDATA environment variable on Windows
This is likely to fix the problem preventing startup on Windows when the
username contains non-ASCII characters (cf.
<https://forum.flightgear.org/viewtopic.php?f=22&t=31320>). Thanks to
Headhunter76 for the useful report and to wkitty42 for doing the liaison
officer. ;-)

I can't actually test this, because I don't have Windows. Windows users
should report whether this works for them.
2016-12-28 16:57:26 +01:00
Erik Hofman
ffdfdcb6d7 Alter the sequence to allow type conversion 2016-12-23 16:01:49 +01:00
Erik Hofman
31ed6184a9 NExt batch of updates: more use of SIMD instructions. Still work in progress. 2016-12-22 15:14:52 +01:00
Erik Hofman
33f0b83b69 Viktor Radnai:
There is a Flightgear property called /sim/hitches/winch/automatic-release-angle-deg that can be used to simulate a safety feature built into modern gliders. If the cable angle gets too great during a winch launch, the hook will automatically release the cable. This usually happens when the glider gets almost on top of the winch at the top of the launch without releasing the cable.

Unfortunately winch launching has two separate implementations, one in Nasal for JSBSim, and another one in C++ for YASIM. The YASIM one does not implement this property so I wrote a patch to add this.
2016-12-22 11:49:15 +01:00
James Turner
eba1f3221f Fix a bug starting the property-tree mirror. 2016-12-21 10:26:31 +00:00
James Turner
57432c20ad Remove some stale code. 2016-12-21 10:26:31 +00:00
Erik Hofman
342f75d48c Add a missing break statement 2016-12-21 09:50:53 +01:00
Torsten Dreyer
c472788ad8 Httpd: fix slow websocket init 2016-12-20 11:46:02 +01:00
James Turner
d831751b11 Fix aircraft-history naming of variants. 2016-12-18 21:25:05 +00:00
Erik Hofman
8b466cb207 One last(?) MSVC fix 2016-12-15 20:08:25 +01:00
Erik Hofman
e845dab6e0 Fix an MSVC error 2016-12-15 10:49:09 +01:00
James Turner
0af316d7fc Nasal Time objects can use simulated time.
Previously timer objects defaulted to using wall-clock (real) dt which
does not reflect pause/speed-up. Keep this as the default for
compatibility but make it possible to request simulated time.
2016-12-11 16:10:57 +00:00
Florent Rougon
3dea0f73aa Use SGPath::fromUtf8() to construct an SGPath from a property node string value
This was missing in a few places of src/Autopilot/route_mgr.cxx.
2016-12-11 12:40:09 +01:00
James Turner
85f75dee4f Fix a couple of potential crashes on exit.
- Font cache shutdown explicitly
- Pending GUI snapshot cleared explicitly

Both of these are dependencies on the osgViewer / GLContext.
2016-12-10 23:24:09 +00:00
James Turner
4fb5bc8512 Property-Mirror websocket: fix removing props.
Special case handling when recently removed properties are re-added;
when this happens simply send a value change since it's much cheaper
over the wire and for the receiver. Poorly designed Canvas code does
this frequently (eg, every update)
2016-12-10 22:01:25 +00:00
Florent Rougon
a3560adc03 nav.dat parser: small changes
- Try to make log messages less cryptic.
- Lower the level of two of them to SG_INFO, as discussed on the mailing
  list (<https://sourceforge.net/p/flightgear/mailman/message/35537475/>).
- Add a const qualifier.
2016-12-10 09:45:51 +01:00
Florent Rougon
a2bf424118 Improve parsing of nav.dat and carrier_nav.dat
- Handle file I/O and parsing errors. This allows current
  <http://gateway.x-plane.com/navaids/LatestNavFix.zip> to be loaded
  instead of failing in an endless loop.

  Read the fields of a record with std::getline() followed by
  simgear::strutils::split(), itself followed by calls to std::stoi(),
  std::stof() and std::stod(). Stream extraction (>>) isn't very good
  here, because it can read for instance an int *and* a float from the
  string "3.14", i.e. extract 3 followed by 0.14 (thus falsifying the
  number of fields found...).

  Check the number of fields (not 100 % reliable since the last field,
  the navaid name, typically contains spaces---but we can detect
  some situations where the number of fields is definitely too low).

- Fix line numbering (sgstream.cxx's skipcomment() isn't fit for this
  purpose, because it can gobble any number of lines without the line
  number being increased).

- Don't use a hardcoded number of lines for the nav.dat loading
  percentage indicator; rely on sg_gzifstream::approxOffset() instead.

- Make navDBInit() and loadCarrierNav() throw an sg_io_exception upon
  I/O errors (not for parsing errors that only affect a record). They
  don't return a bool anymore (which wasn't checked by their only
  caller, anyway).

- Use the 'rowCode' variable name instead of 'rawType' for consistency
  with the *.dat specs.

- Small change in tests: (elev_ft < 0.01) replaced with (elev_ft <= 0).
  Doesn't change the behavior, since 'elev_ft' is an int. Can be
  reverted if someone really prefers the float comparison, I don't mind
  that much about it.

- Add missing headers and a few comments.

This commit does not change the contents added to the NavCache with
FlightGear's current $FG_ROOT/Navaids/nav.dat.gz, except for 4 bogus
navaids which are not added anymore (at LIBV, OPJA, RCFN and RCYU): see
<https://sourceforge.net/p/flightgear/mailman/message/35526617/>. They
are instead properly reported as coming from invalid nav.dat lines.
2016-12-10 01:02:30 +01:00
Florent Rougon
280cd52368 Security fix: don't allow the route manager to overwrite any file
Since the Save function can be triggered from Nasal with an arbitrary
path, we must check this path before overwriting the file.

(also add a missing include that is directly needed for this commit)
2016-12-09 17:15:06 +01:00
Erik Hofman
709936a265 MSVC fixes 2016-12-08 01:03:26 +01:00
Erik Hofman
7ec7a8b60c Add the first version of AISim but 2016-12-07 11:05:07 +01:00
Erik Hofman
7ed4a5162e Replace auto_ptr with unique_ptr 2016-12-07 11:03:54 +01:00
James Turner
b767a33f84 MirrorPropertyTree websocket fixes
- deal with ‘NONE’ properties correctly
- use a better method to send the initial tree on connection.
2016-12-05 21:27:38 +00:00
Torsten Dreyer
c3c0d25fe7 Fix Linux build 2016-12-03 22:46:31 +01:00
James Turner
47042b03f4 Expose an entire property tree via WebSockets.
Use a recursive listener to expose a property tree via a WebSocket.
Currently using a JSON-based encoding, will likely change to binary so
please don’t write code using this interface until the encoding
is stable and documented!
2016-12-03 14:23:48 +00:00
James Turner
54aec82c38 Search packages using the matches API 2016-11-30 21:33:16 +00:00
James Turner
1c4e3263f8 Multiple Flight-Plan clears are a no-op 2016-11-30 12:16:23 +00:00
James Turner
df2ab15e6c Quiet Canvas font-loading. 2016-11-30 12:15:54 +00:00
James Turner
825c8c2006 Nicer rendering of aircraft ratings. 2016-11-29 15:45:17 +00:00
Florent Rougon
80bf762556 Replace C++-version-dependent conditional code with the C++11 variant only 2016-11-29 16:35:31 +01:00
James Turner
53d50d9ba0 Tweak painting of aircraft ratings in launcher.
Should ensure the full text is visible with a wider range of font sizes.
2016-11-28 18:17:25 +00:00
James Turner
831053bd04 Fixes for HUD, model-manager listeners.
Make the HUD listener recursive (its tree is quite shallow) and 
manually watch the children of /models/model[n] nodes when they
are added.
2016-11-27 14:49:28 +00:00
James Turner
b0fcd78e9f Fix lazy-loaded thumbnail size for aircraft dirs. 2016-11-25 22:53:06 +00:00
James Turner
5db1f5cad6 Per variant authors/description data.
Will only work once the catalogs(s) are updated, and needs a
corresponding SimGear update.
2016-11-25 22:45:48 +00:00
James Turner
14942f4e8b Move Yasim properties to /fdm/yasim
As discussed on the mailing list, make this more consistent with JSBsim.
We could still define common locations for these values as well, but
waiting on positive answer to that discussion on the ML.
2016-11-25 17:41:05 +00:00
Torsten Dreyer
7f3fa4a3b7 Set fallback (hardcoded) startup airport to LSZH 2016-11-22 09:27:30 +01:00
James Turner
ee1a042847 respect servers online flag. 2016-11-21 22:01:06 +00:00
James Turner
e64a2db5a0 Remove the scenery path mangling.
Requires a matching SG commit for correct operation.
2016-11-20 22:42:48 +00:00
James Turner
780e0f5a02 Restore active aircraft variant also. 2016-11-20 22:42:48 +00:00
James Turner
4db129cb01 Guard against a null result from HID code.
It seems strange that CFGetTypeID on null would crash, but the reports
from users suggest this might be the case.
2016-11-20 22:42:48 +00:00
Torsten Dreyer
c4ea89dc97 Revert "temporarily add some noisy debug messages"
This reverts commit f538a6e1a1.
2016-11-20 11:39:46 +01:00