1
0
Fork 0
No description
Find a file
Julian Smith 5772325bc6 Allow most default views to work on multiplayer aircraft as well as the user's aircraft.
Currently this works for all the default views except for Tower Look From (for
which it doesn't really make sense) and Fly-by View.

We now search for and load a -set.xml that matches the model .xml,
when new multiplayer aircraft is set up. This allows us to find view
offsets etc, e.g. allowing cockpit and helicopter views to work with
multiplayer aircraft. Properties from the -set.xml are placed into
/ai/models/multiplayer[]/set, so for example viewing offsets are in
/ai/models/multiplayer[]/set/sim/view[]/config/target-{x,y,z}-offset-m. We also
copy the aircraft's chase-distance into the view config params, similar to how
fgdata:defaults.xml does for the user's aircraft. And we also fill in views'
missing offsets from the Helicopter View config; e.g. this enables the new
Tower View AGL to show aircraft correctly centred, despite aircraft currently
not having this view defined in their -set.xml. [We don't currently attempt to
cache or reuse -set.xml data.]

Have ensured that view position responds to mouse movement in the same way for
viewing the user's aircraft as for multiplayer aircraft (previously, Model View
reversed the affect of vertical mouse movements).

Added new Tower AGL view. Behaves similarly to Tower view, but automatically
scales and pans vertically in order to always show the vertical range
extending from just above the aircraft down to the ground immediately below
the aircraft. We use aircrafts chase-distance as an indication of size. We
damp the ground level value to reduce the viewing jumping around too much
e.g. if the aircraft flies over buildings. The amount of damping is set by
fgdata:defaults.xml's lookat-agl-damping value.

Fixed problem where Tower View eye position moves slightly as target
aircraft heading changes. This was caused by us unnecessarily applying the
aircraft-centre correction to the eye position.

src/FDM/flight.cxx: also make /orientation/true-heading-deg. This allows
local orientation to be used like multiplayer orientation, which only
has /ai/models/multiplayer[]/orientation/true-heading-deg. [A better fix
might be to replace all occurrencies of /orientation/true-heading-deg with
/orientation/heading-deg, but this would be a rather large commit.]

Details:

src/Viewer/view.*: removed View::updateData() as is no longer required.

src/MultiPlayer/multiplaymgr.cxx: use helicopter view target offsets as
defaults. E.g. in tower view agl, aircraft won't currently be defining these
offsets. More generally, this allows aircraft to define target offsets only in
helicoter view.

src/FDM/flight.cxx
    FGMultiplayMgr::FillMsgHdr(): Added tie of /orientation/true-heading-deg to
    get_Psi_deg, so it duplictes the existing /orientation/heading-deg.

src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
    FGMultiplayMgr::addMultiplayer(): look for and load -set.xml that matches
    the model. Patch various view-related things up in similar way to what we
    do for the user's aircraft, so that multiplayer views work.

    Made FGMultiplayMgr::getMultiplayer() public, so it can be used by
    src/Viewer/view.cxx.

src/Viewer/view.cxx
src/Viewer/view.hxx
    View::View(): Added lookat_agl, lookat_agl_damping params for new Tower
    View AGL. Preserve user's field-of-view in separate variable so that Tower
    View AGL can modify the actual field of view independently.

    Added view_index param so that we can find multiplayer view[]/config/
    properties.

    getViewOffsets(): new fn that finds view offsets for user aircraft or
    multiplayer aircraft.

    View::recalcLookFrom() View::recalcLookAt: Lots of changes to allow things
    to work with multiplayer aircraft. View::recalcLookAt() can now do Tower
    View AGL.

    View::Damping: support for damping, used by Tower View AGL. Might be good
    to use this for other damping.

    View::updateData(): removed, as calculations are now all done inside
    View::recalc*().

    put properties {x,y,z}-offset-m into new View::_adjust_offset_m member
    instead of _offset_m. This avoids confusion between a view's offsets and
    the offsets added in by the user via the 'Adjust View Position' dialogue.

src/Viewer/viewmgr.cxx
    FGViewMgr::init(): pass view number to
    flightgear::View::createFromProperties().
2019-07-04 13:16:22 +01:00
3rdparty Flite always compiled now. 2019-06-03 16:51:08 +01:00
CMakeModules Flite always compiled now. 2019-06-03 16:51:08 +01:00
docs-mini SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:51:32 +02:00
examples/netfdm Add an example implementation for the NetFDM structure. 2004-04-27 08:55:04 +00:00
icons Add CMake Linux install directives for the icons and the .desktop file 2017-05-24 22:47:01 +02:00
man Translate man pages to Italian 2017-06-25 22:20:58 +02:00
package Add CMake Linux install directives for the icons and the .desktop file 2017-05-24 22:47:01 +02:00
scripts Bug fix to set a valid default value for the right edge. 2018-10-04 18:59:15 -05:00
src Allow most default views to work on multiplayer aircraft as well as the user's aircraft. 2019-07-04 13:16:22 +01:00
test_suite Revert "CommRadio: fix tuning 25Khz and 75Khz channels" 2019-07-01 06:29:05 +01:00
utils SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:51:32 +02:00
.clang-format Clang-format: Removal of non-ascii characters from the auto-generated comments. 2018-04-11 12:21:21 +02:00
.gitignore Enhanced git-ignore 2017-11-05 13:49:45 +00:00
AUTHORS Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
ChangeLog Updated ... 2001-06-18 22:25:59 +00:00
CMakeLists.txt Flite always compiled now. 2019-06-03 16:51:08 +01:00
COPYING Fix minor compiler and checker warnings. 2011-12-19 21:35:50 +01:00
INSTALL Add INSTALL file, split MSVC instructions from README.cmake 2012-06-08 13:20:39 +02:00
NEWS Update the NEWS file to reflect v2.0.0 changes. 2010-02-25 23:22:47 +01:00
README README typo 2007-07-24 05:35:31 +00:00
README.cmake Use CMAKE_INSTALL_BINDIR 2016-07-09 18:52:58 -04:00
README.msvc Add INSTALL file, split MSVC instructions from README.cmake 2012-06-08 13:20:39 +02:00
README.OSG Update README.OSG 2012-06-26 23:04:44 +02:00
README.plib Minor documentation update. 2007-11-18 14:22:40 +00:00
README.SimGear Documentation fixes: Updated the contents of README.plib and README.OpenAL. 2007-09-01 10:06:56 +00:00
README.sound Detect AeonWave and if it is installed use it, otherwise fall back to OpenAL. Also let get_available_devices() use C++ strings instead of const char* 2018-06-02 14:06:36 +02:00
Thanks Old address abandoned. 2015-08-26 08:05:30 -07:00
version new version: 2019.2.0 2019-03-13 21:20:53 +01:00

Welcome to the FlightGear Flight Simulator project.
===================================================

The primary web page for this project is: http://www.flightgear.org

For basic installation instructions see the "INSTALL" file.

Before you can run FlightGear you will also need to download and
install the "base" package which is a collection of textures, sounds,
sample scenery, and other data files needed by the sim.

For additional install help for specific platforms please browse the
"docs-mini/" subdirectory.

More complete documentation is available from our web page as a
separate distribution.

Please take a look at the "Thanks" file for a list of people who have
contributed to this project.  If you have contributed something but
don't find your name in this file.  Please send a polite reminder to
http://www.flightgear.org/~curt

For a summary of changes/additions by version see the "NEWS" file.

This project is GPL'd.  For complete details on our licensing please
see the "COPYING" file.

For information on available mailing lists, mailing list archives, and
other available source code and documenation, please visit our web
site.

FlightGear is a product of the collaboration of large international
group of volunteers.  FlightGear is a work in progress.  FlightGear
comes with no warrantee.  We hope you enjoy FlightGear and/or find it
of some value!