Merge branch 'next' into durk-atc
This commit is contained in:
commit
5228053f7f
56 changed files with 763 additions and 248 deletions
|
@ -56,6 +56,7 @@ option(ENABLE_JSBSIM "Set to ON to build FlightGear with JSBSim FDM" ON)
|
|||
option(ENABLE_FGADMIN "Set to ON to build FlightGear with FGADMIN" ON)
|
||||
option(EVENT_INPUT "Set to ON to build FlightGear with event-based Input support" OFF)
|
||||
option(ENABLE_LIBSVN "Set to ON to build FlightGear/terrasync with libsvnclient support" OFF)
|
||||
option(WITH_FGPANEL "Set to ON to build the fgpanel application" ON)
|
||||
|
||||
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
|
||||
|
||||
|
@ -131,7 +132,7 @@ if(ENABLE_LIBSVN)
|
|||
endif(ENABLE_LIBSVN)
|
||||
|
||||
find_package(PLIB REQUIRED puaux pu js fnt)
|
||||
find_package(SimGear 2.3.0 REQUIRED)
|
||||
find_package(SimGear 2.5.0 REQUIRED)
|
||||
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
macro(flightgear_component name sources)
|
||||
|
||||
set(libName "fg${name}")
|
||||
add_library(${libName} STATIC ${sources} )
|
||||
add_library(${libName} STATIC ${sources} ${ARGV2})
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY FG_LIBS ${libName})
|
||||
|
||||
|
|
108
Thanks
108
Thanks
|
@ -36,9 +36,11 @@ Raul Alonzo <amil@las.es>
|
|||
Michele America <nomimarketing@mail.telepac.pt>
|
||||
Contributed to the HUD code.
|
||||
|
||||
|
||||
Emmanuel Baranger <>
|
||||
Many, many very nice aircraft models.
|
||||
|
||||
|
||||
Andrei Barbu <andrei@0xab.com>
|
||||
Designed and implemented the current version of the FlightGear website.
|
||||
|
||||
|
@ -74,13 +76,21 @@ Paul Bleisch <pbleisch@acm.org>
|
|||
Also contributed a first stab at a config file/command line parsing
|
||||
system.
|
||||
|
||||
|
||||
Matthias Boerner <>
|
||||
Coorganizer of the FlightGear booth at the annual LinuxTag event in
|
||||
Germany.
|
||||
|
||||
|
||||
Thorsten Brehm
|
||||
Thorsten provided the TCAS system and fixed an uncountable number of
|
||||
bugs, closed memory leaks and helps creating new releases.
|
||||
|
||||
|
||||
Alexis Bory
|
||||
Very nice models, including the F14-B.
|
||||
|
||||
|
||||
Jim Brennan <jj@kingmont.com>
|
||||
Provided a big chunk of online space to store USA scenery for Flight Gear.
|
||||
|
||||
|
@ -91,8 +101,10 @@ Bernie Bright <bbright@bigpond.net.au>
|
|||
Threading support and threaded tile pager.
|
||||
Initiate the fgrun project
|
||||
|
||||
|
||||
Francesco Brisa <>
|
||||
Scenery models and ground networks for Italian airports.
|
||||
Scripts for automated source downloads and builds.
|
||||
|
||||
|
||||
Bernhard H. Buckel <buckel@mail.uni-wuerzburg.de>
|
||||
|
@ -128,6 +140,11 @@ John Check <j4strngs@rockfish.net>
|
|||
New instrument panel configurations
|
||||
|
||||
|
||||
Bertrand Coconnier
|
||||
Contributed several bugfixes and improvements for the integration of
|
||||
the JSBSim flight dynamics model.
|
||||
|
||||
|
||||
Dave Cornish <dmc@halcyon.com>
|
||||
Created our new, super cool, runway textures.
|
||||
Created some of our cloud textures.
|
||||
|
@ -139,15 +156,24 @@ Oliver Delise <delise@mail.isis.de>
|
|||
Founder of the FlightGear MultiPilot Project :
|
||||
http://www.isis.de/members/~odelise/progs/flightgear
|
||||
|
||||
|
||||
John Denker
|
||||
Contributed bugfixes and improvements to the navigation and ATIS code.
|
||||
|
||||
|
||||
Jean-Francois Doue
|
||||
Vector 2D, 3D, 4D and Matrix 3D and 4D inlined C++ classes. (Based on
|
||||
Graphics Gems IV ed. Paul S. Heckbert)
|
||||
http://www.animats.com/simpleppp/ftp/public_html/topics/developers.html
|
||||
|
||||
|
||||
Torsten Dreyer
|
||||
Contributed a very nice Piper Sceneca, closely modelled after the
|
||||
real thing.
|
||||
Many other nice aircraft, buildings, etc etc.
|
||||
Contributed the very nice Piper Seneca, closely modelled after the
|
||||
real thing. Also added many other nice aircraft (such as the ogeL, also
|
||||
closely modelled after the real thing), buildings, etc.
|
||||
Creator of fgpanel. Code maintainer of weather, environment, autopilot
|
||||
and many other core systems.
|
||||
|
||||
|
||||
Dave Eberly <eberly@magic-software.com>
|
||||
Contributed some sphere interpolation code used by Christian Mayer's
|
||||
|
@ -155,9 +181,11 @@ Dave Eberly <eberly@magic-software.com>
|
|||
really useful looking code available there.
|
||||
http://www.magic-software.com
|
||||
|
||||
|
||||
Martin Eschen <>
|
||||
Helped enourmously toward finishing the full scale traffic demo at EHAM.
|
||||
|
||||
|
||||
Francine Evans <evans@cs.sunysb.edu>
|
||||
Wrote the @#$@#$@% GPL'd tri-striper we use and "love". :-)
|
||||
http://www.cs.sunysb.edu/~evans/stripe.html
|
||||
|
@ -168,6 +196,7 @@ Oscar Everitt <bigoc@premier.net>
|
|||
for FS98. They are pretty cool and Oscar was happy to contribute
|
||||
them to our little project.
|
||||
|
||||
|
||||
Detlef Faber
|
||||
Many WWII era aircraft.
|
||||
|
||||
|
@ -175,13 +204,16 @@ Detlef Faber
|
|||
Leidson Campos A. Ferreira <leidson@planetamessenger.org>
|
||||
Rewrote the Jpeg screen httpd streaming (--jpg-httpd option)
|
||||
|
||||
|
||||
Olaf Flebbe
|
||||
Improved the build system for Windows and provided pre-built
|
||||
dependencies.
|
||||
|
||||
|
||||
Bruce Finney <bfinney@gte.net>
|
||||
MSVC5 compatibility.
|
||||
|
||||
|
||||
Thomas Förster <>
|
||||
Updates to the AI system, including the Dykstra route finding algorithm,
|
||||
adding a performance class, and many code clean-ups.
|
||||
|
@ -209,13 +241,18 @@ Jean-loup Gailly and Mark Adler <zlib@gzip.org>
|
|||
Thomas Gellekum <tg@ihf.rwth-aachen.de>
|
||||
Changes and updates for compiling on FreeBSD
|
||||
|
||||
|
||||
Ralf Gerlich <>
|
||||
Technical Genius behind the Custom Scenery Project.
|
||||
Current maintainer of TaxiDraw
|
||||
|
||||
|
||||
Anders Gidenstam <>
|
||||
Support for Lighter than Air vehicles.
|
||||
Author of the ZeppelinNT.
|
||||
Added support for lighter than air vehicles to JSBSim.
|
||||
Contributed simulation of wildfires and a basic system for dual control
|
||||
of an aircraft over the multiplayer network.
|
||||
Author of several airships and one aircraft.
|
||||
|
||||
|
||||
Neetha Girish <neethagirish@usa.net>
|
||||
Contributed the xml configurable HUD changes.
|
||||
|
@ -235,18 +272,22 @@ Michael I. Gold <gold@puck.asd.sgi.com>
|
|||
Habibie <habibie@MailandNews.com>
|
||||
RedHat package building changes for SimGear.
|
||||
|
||||
|
||||
Csaba Halász <>
|
||||
Many bugfixes and code checking.
|
||||
|
||||
|
||||
Ampere Hardraade <>
|
||||
Many detailed 3D models of aircraft, including the MD11, and several
|
||||
Airbuses.
|
||||
|
||||
|
||||
Brett Harrison <>
|
||||
Ground networks for various airports.
|
||||
Most of the liveries for the new C172p by HHS.
|
||||
AI Repaints for several 737's and C172's
|
||||
|
||||
|
||||
Dave Haskell <dave@haskell.demon.co.uk>
|
||||
Original exterior textures for the Cessna 310 U-3A model. Only a few
|
||||
minor modifications were made.
|
||||
|
@ -277,6 +318,7 @@ Bruce Jackson of NASA <e.b.jackson@larc.nasa.gov>
|
|||
the flight model. Bruce has patiently answered my many, many questions.
|
||||
http://dcb.larc.nasa.gov/www/DCBStaff/ebj/ebj.html
|
||||
|
||||
|
||||
Ron Jensen
|
||||
Contributed to the piston engine code in JSBSim.
|
||||
|
||||
|
@ -402,10 +444,12 @@ Phil Nelson <phil@cs.wwu.edu>
|
|||
Author of GNU dbm. gdbm is a set of database routines that use
|
||||
extendible hashing and works similar to the standard UNIX dbm routines.
|
||||
|
||||
|
||||
Tatsuhiro Nishioka
|
||||
Maintainer of the Mac port.
|
||||
Contributed some very nice Japanese aircraft models.
|
||||
|
||||
|
||||
Alexei Novikov <anovikov@heron.itep.ru>
|
||||
Created European Scenery
|
||||
Contributed a script to turn fgfs scenery into beautifully rendered
|
||||
|
@ -445,9 +489,11 @@ Alex Perry <alex.perry@ieee.org>
|
|||
Contributed code to more accurately model VSI, DG, Altitude.
|
||||
Contributed to the Install and Getting Started manual.
|
||||
|
||||
|
||||
Pigeon <>
|
||||
Developed the multiplayer network infrastructure.
|
||||
|
||||
|
||||
Friedemann Reinhard <mpt218@faupt212.physik.uni-erlangen.de>
|
||||
Contributed beginnings of a textured instrument panel.
|
||||
|
||||
|
@ -465,7 +511,6 @@ Frederic Bouvier <fredfgfs01@free.fr>
|
|||
the windows community.
|
||||
|
||||
|
||||
|
||||
Petter Reinholdtsen <pere@games.no>
|
||||
Incorporated the Gnu automake/autoconf system (with libtool).
|
||||
This should streamline and standardize the build process for all
|
||||
|
@ -473,22 +518,32 @@ Petter Reinholdtsen <pere@games.no>
|
|||
environments since the don't use the Unix make system.
|
||||
|
||||
|
||||
Thorsten Renk
|
||||
Created the local weather system, providing beautiful cloudscapes
|
||||
and an accurate meteorological simulation.
|
||||
|
||||
|
||||
William Riley <riley@technologist.com>
|
||||
Contributed code to add "brakes".
|
||||
Patch to support a first joystick with more than two axes.
|
||||
World scenery based on vmap0 data.
|
||||
|
||||
|
||||
Gijs de Rooy <>
|
||||
Contributed some very nice building models, including a very
|
||||
detailed layout of the Amsterdam airport terminals, and many
|
||||
downtown buildings.
|
||||
Redid the Boeing 747-400 3D model
|
||||
Very active first aid responder on the official Flightgear
|
||||
forum.
|
||||
|
||||
Redid the Boeing 747-400 3D model.
|
||||
Greatly contributed to the FlightGear community as a very active
|
||||
first aid responder on the official Flightgear forum, as a forum
|
||||
and wiki admin, and as the editor of the monthly FlightGear
|
||||
newsletter.
|
||||
|
||||
|
||||
Gerard Robin <>
|
||||
Many nice Aircraft models
|
||||
|
||||
|
||||
Andy Ross <andy@plausible.org>
|
||||
Contributed a new configurable FDM, "YASim", based on geometry
|
||||
information rather than aerodynamic coefficients.
|
||||
|
@ -497,19 +552,23 @@ Andy Ross <andy@plausible.org>
|
|||
Modified the UI code to allow a far more flexible grouping system.
|
||||
Added the Nasal scripting language and added FlightGear integration.
|
||||
|
||||
|
||||
Brian Schack <>
|
||||
Current maintainer of Atlas, the moving map program for FlightGear
|
||||
|
||||
|
||||
|
||||
Paul Schlyter <pausch@saaf.se>
|
||||
Mr. Schlyter provided Durk Talsma with all the information
|
||||
he needed to write the astro code. Mr. S. is also willing
|
||||
to answer astro-related questions whenever one needs to.
|
||||
http://welcome.to/pausch
|
||||
|
||||
|
||||
Christian Schmitt <>
|
||||
Detailed Frankfurt airport buildings.
|
||||
Contributions to the custom scenery project.
|
||||
|
||||
|
||||
Chris Schoeneman <crs@millpond.engr.sgi.com>
|
||||
Contributed some 3d sound playing code for Irix, Win32, and Linux
|
||||
It is unclear if this code will be used directly, but it certainly
|
||||
|
@ -519,7 +578,8 @@ Chris Schoeneman <crs@millpond.engr.sgi.com>
|
|||
Phil Schubert <philip@zedley.com>
|
||||
Contributed various textures and engine modelling.
|
||||
http://www.zedley.com/Philip/index.htm
|
||||
|
||||
|
||||
|
||||
Heiko Schulz <>
|
||||
Contributed AI traffic for EDDF
|
||||
EDDF Night lights
|
||||
|
@ -548,10 +608,14 @@ Martin Spott <Martin.Spott@uni-duisburg.de>
|
|||
Coorganizer of the FlightGear booth at the annual LinuxTag event in
|
||||
Germany.
|
||||
Manages the "World Scenery" releases.
|
||||
Maintains world's biggest repository and toolchain for free and
|
||||
open map and scenery data at http://mapserver.flightgear.org/
|
||||
|
||||
|
||||
Jon Stockill <>
|
||||
Maintainer of the object database.
|
||||
|
||||
|
||||
Martin Dressler <dr@musicabona.cz>
|
||||
Created some outstanding panel instrumentation textures
|
||||
for use in full-screen mode.
|
||||
|
@ -573,16 +637,19 @@ Durk Talsma <d.talsma@chello.nl>
|
|||
Full scale AI traffic demo for EHAM.
|
||||
Current FlightGear release manager.
|
||||
|
||||
|
||||
Gabor Toth <>
|
||||
Contributed some Livery repaints for AI Aircraft
|
||||
Contributed many ideas leading towards the Traffic Manager II format
|
||||
Runs FGTracker, an online flight tracking service for FlightGear
|
||||
|
||||
|
||||
James Turner <>
|
||||
Many code cleanups of the internal structure of the airport database,
|
||||
runway parsing, route management.
|
||||
Is currently working on adding flightmanagement support.
|
||||
|
||||
|
||||
UIUC - Department of Aeronautical and Astronautical Engineering
|
||||
Contributed modifications to LaRCsim to allow loading of aircraft
|
||||
parameters from a file. These modifications were made as part of an
|
||||
|
@ -683,14 +750,17 @@ Jean-Claude Wippler <jcw@equi4.com>
|
|||
X/MIT-style license. Please see the following URL for more info:
|
||||
http://www.equi4.com/metakit
|
||||
|
||||
|
||||
Holger Wirtz <>
|
||||
Author of FGCom, a voice communication program intented for FlightGear
|
||||
multiplayer/ATC.
|
||||
Author of FGCom, a voice communication program intented for FlightGear
|
||||
multiplayer/ATC.
|
||||
|
||||
|
||||
John Wojnaroski <castle@mminternet.com>
|
||||
Open Glass Cockpit project
|
||||
3d clouds
|
||||
|
||||
|
||||
Marcus Zojer <>
|
||||
Contributed a B1B aircraft model.
|
||||
|
||||
|
@ -728,6 +798,7 @@ Mathias Fr
|
|||
land on aircraft carriers.
|
||||
Modified YASim, JSBSim and LaRCsim to support the groundcache code.
|
||||
Reorganized the code to eliminate the viewer jitter for close by objects.
|
||||
Mathias is responsible for the transition to OSG and he added HLA support.
|
||||
|
||||
|
||||
Harald Johnsen <hjohnsen@evc.net>
|
||||
|
@ -783,7 +854,7 @@ SkyscraperPage.com http://skyscraperpage.com
|
|||
WoodSoup Project http://www.woodsoup.org
|
||||
[ FlightGear no longer uses woodsoup services, but we appreciate
|
||||
the support provided to our project during the time they hosted us. ]
|
||||
Provided computing resources and services so that the Flight Gear
|
||||
Provided computing resources and services so that the FlightGear
|
||||
project could have real home. This includes, web services,
|
||||
ftp services, shell accounts, email lists, dns services, etc.
|
||||
|
||||
|
@ -802,12 +873,7 @@ THIS DOCUMENT WAS INITIALLY WRITTEN BY
|
|||
|
||||
Curt L. Olson <http://www.flightgear.org/~curt>
|
||||
|
||||
|
||||
THE CONTENTS WERE LASTLY RESEARCHED AND UPDATED MARCH, 8 2000
|
||||
|
||||
Oliver Delise <delise@mail.isis.de>
|
||||
|
||||
|
||||
Updated 2000-03-08 by Oliver Delise, delise@mail.isis.de
|
||||
Updated 2001-12-11 by David Megginson, david@megginson.com
|
||||
Updated 2003-04-17,
|
||||
Updated 2004-06-01,
|
||||
|
|
|
@ -583,7 +583,7 @@ if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
|
|||
exit
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for SimGear 2.3.0 or newer])
|
||||
AC_MSG_CHECKING([for SimGear 2.5.0 or newer])
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ Use FlightGear.sln to compile fgfs executable for Win32 or x64 architectures wit
|
|||
Previous versions of Visual Studio are not officially supported anymore.
|
||||
|
||||
Precompiled librairies and headers for compiling Win32 executables with VS2008 :
|
||||
ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-win32-VS90-3rdParty+OSG-20110618.zip
|
||||
ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-win32-VS90-3rdParty+OSG-20110703.zip
|
||||
|
||||
Precompiled librairies and headers for compiling x64 executables with VS2008 :
|
||||
ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-x64-VS90-3rdParty+OSG-20110618.zip
|
||||
ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-x64-VS90-3rdParty+OSG-20110703.zip
|
||||
|
||||
The VS2008 / v9.0 project files assume the directory layout below :
|
||||
|
||||
|
|
|
@ -102,6 +102,16 @@ Section "" ;No components page, name is not important
|
|||
File ${OSGPluginsDir}\osgdb_png.dll
|
||||
File ${OSGPluginsDir}\osgdb_dds.dll
|
||||
File ${OSGPluginsDir}\osgdb_txf.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osg.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osganimation.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgfx.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgmanipulator.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgparticle.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgshadow.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgsim.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgterrain.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgtext.dll
|
||||
File ${OSGPluginsDir}\osgdb_serializers_osgvolume.dll
|
||||
File ${OSGPluginsDir}\osgdb_deprecated_osg.dll
|
||||
File ${OSGPluginsDir}\osgdb_deprecated_osgparticle.dll
|
||||
|
||||
|
|
|
@ -23,6 +23,27 @@ set(SOURCES
|
|||
performancedb.cxx
|
||||
submodel.cxx
|
||||
)
|
||||
|
||||
flightgear_component(AIModel "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
AIAircraft.hxx
|
||||
AIBallistic.hxx
|
||||
AIBase.hxx
|
||||
AICarrier.hxx
|
||||
AIEscort.hxx
|
||||
AIFlightPlan.hxx
|
||||
AIGroundVehicle.hxx
|
||||
AIManager.hxx
|
||||
AIMultiplayer.hxx
|
||||
AIShip.hxx
|
||||
AIStatic.hxx
|
||||
AIStorm.hxx
|
||||
AITanker.hxx
|
||||
AIThermal.hxx
|
||||
AIWingman.hxx
|
||||
performancedata.hxx
|
||||
performancedb.hxx
|
||||
submodel.hxx
|
||||
)
|
||||
|
||||
flightgear_component(AIModel "${SOURCES}" "${HEADERS}")
|
||||
|
|
@ -250,8 +250,25 @@ void FGATCMgr::FreqSearch(const string navcomm, const int unit) {
|
|||
|
||||
_aircraftPos = SGGeod::fromDegFt(lon_node->getDoubleValue(),
|
||||
lat_node->getDoubleValue(), elev_node->getDoubleValue());
|
||||
|
||||
class RangeFilter : public CommStation::Filter {
|
||||
public:
|
||||
RangeFilter( const SGGeod & pos ) : CommStation::Filter(), _pos(pos) {}
|
||||
virtual bool pass(FGPositioned* aPos) const {
|
||||
flightgear::CommStation * stn = dynamic_cast<flightgear::CommStation*>(aPos);
|
||||
if( NULL == stn ) return false;
|
||||
double dist = SGGeodesy::distanceNm( stn->geod(), _pos );
|
||||
// if range is not configured, assume at least 10NM range
|
||||
// TODO: maybe ramp down range with proximity to ground?
|
||||
return dist <= SGMiscd::max( stn->rangeNm(), 10.0 );
|
||||
}
|
||||
private:
|
||||
SGGeod _pos;
|
||||
};
|
||||
|
||||
RangeFilter rangeFilter(_aircraftPos );
|
||||
|
||||
CommStation* sta = CommStation::findByFreq(freqKhz, _aircraftPos);
|
||||
CommStation* sta = CommStation::findByFreq(freqKhz, _aircraftPos, &rangeFilter );
|
||||
if (!sta) {
|
||||
ZapOtherService(ncunit, "x x x");
|
||||
return;
|
||||
|
|
|
@ -4,5 +4,11 @@ set(SOURCES
|
|||
controls.cxx
|
||||
replay.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Aircraft "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
controls.hxx
|
||||
replay.hxx
|
||||
)
|
||||
|
||||
|
||||
flightgear_component(Aircraft "${SOURCES}" "${HEADERS}")
|
|
@ -2,7 +2,6 @@ include(FlightGearComponent)
|
|||
|
||||
set(SOURCES
|
||||
apt_loader.cxx
|
||||
calc_loc.cxx
|
||||
dynamicloader.cxx
|
||||
dynamics.cxx
|
||||
gnnode.cxx
|
||||
|
@ -17,5 +16,22 @@ set(SOURCES
|
|||
simple.cxx
|
||||
xmlloader.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Airports "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
apt_loader.hxx
|
||||
dynamicloader.hxx
|
||||
dynamics.hxx
|
||||
gnnode.hxx
|
||||
groundnetwork.hxx
|
||||
parking.hxx
|
||||
pavement.hxx
|
||||
runwaybase.hxx
|
||||
runwayprefloader.hxx
|
||||
runwayprefs.hxx
|
||||
runways.hxx
|
||||
sidstar.hxx
|
||||
simple.hxx
|
||||
xmlloader.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Airports "${SOURCES}" "${HEADERS}")
|
|
@ -16,4 +16,20 @@ set(SOURCES
|
|||
route_mgr.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Autopilot "${SOURCES}")
|
||||
set(HEADERS
|
||||
analogcomponent.hxx
|
||||
autopilot.hxx
|
||||
autopilotgroup.hxx
|
||||
component.hxx
|
||||
digitalcomponent.hxx
|
||||
digitalfilter.hxx
|
||||
flipflop.hxx
|
||||
inputvalue.hxx
|
||||
logic.hxx
|
||||
pidcontroller.hxx
|
||||
pisimplecontroller.hxx
|
||||
predictor.hxx
|
||||
route_mgr.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Autopilot "${SOURCES}" "${HEADERS}")
|
|
@ -119,23 +119,29 @@ void FGXMLAutopilotGroupImplementation::initFrom( SGPropertyNode_ptr rootNode, c
|
|||
}
|
||||
|
||||
SGPath config = globals->resolve_maybe_aircraft_path(pathNode->getStringValue());
|
||||
if (config.isNull())
|
||||
{
|
||||
SG_LOG( SG_ALL, SG_ALERT, "Cannot find property-rule configuration file '" << pathNode->getStringValue() << "'." );
|
||||
}
|
||||
else
|
||||
{
|
||||
SG_LOG( SG_ALL, SG_INFO, "Reading property-rule configuration from " << config.str() );
|
||||
|
||||
SG_LOG( SG_ALL, SG_INFO, "Reading property-rule configuration from " << config.str() );
|
||||
try {
|
||||
SGPropertyNode_ptr root = new SGPropertyNode();
|
||||
readProperties( config.str(), root );
|
||||
|
||||
try {
|
||||
SGPropertyNode_ptr root = new SGPropertyNode();
|
||||
readProperties( config.str(), root );
|
||||
SG_LOG( SG_AUTOPILOT, SG_INFO, "adding property-rule subsystem " << apName );
|
||||
FGXMLAutopilot::Autopilot * ap = new FGXMLAutopilot::Autopilot( autopilotNodes[i], root );
|
||||
ap->set_name( apName );
|
||||
set_subsystem( apName, ap );
|
||||
_autopilotNames.push_back( apName );
|
||||
|
||||
SG_LOG( SG_AUTOPILOT, SG_INFO, "adding property-rule subsystem " << apName );
|
||||
FGXMLAutopilot::Autopilot * ap = new FGXMLAutopilot::Autopilot( autopilotNodes[i], root );
|
||||
ap->set_name( apName );
|
||||
set_subsystem( apName, ap );
|
||||
_autopilotNames.push_back( apName );
|
||||
|
||||
} catch (const sg_exception& e) {
|
||||
SG_LOG( SG_AUTOPILOT, SG_ALERT, "Failed to load property-rule configuration: "
|
||||
<< config.str() << ":" << e.getMessage() );
|
||||
continue;
|
||||
} catch (const sg_exception& e) {
|
||||
SG_LOG( SG_AUTOPILOT, SG_ALERT, "Failed to load property-rule configuration: "
|
||||
<< config.str() << ":" << e.getMessage() );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -379,8 +379,8 @@ void FGRouteMgr::init() {
|
|||
void FGRouteMgr::postinit()
|
||||
{
|
||||
SGPath path(_pathNode->getStringValue());
|
||||
if (path.exists()) {
|
||||
SG_LOG(SG_AUTOPILOT, SG_INFO, "loading flight-plan from:" << path.str());
|
||||
if (!path.isNull()) {
|
||||
SG_LOG(SG_AUTOPILOT, SG_INFO, "loading flight-plan from: " << path.str());
|
||||
loadRoute(path);
|
||||
}
|
||||
|
||||
|
@ -1303,13 +1303,20 @@ bool FGRouteMgr::saveRoute(const SGPath& path)
|
|||
writeProperties(path.str(), d, true /* write-all */);
|
||||
return true;
|
||||
} catch (sg_exception& e) {
|
||||
SG_LOG(SG_IO, SG_WARN, "failed to save flight-plan:" << e.getMessage());
|
||||
SG_LOG(SG_IO, SG_ALERT, "Failed to save flight-plan '" << path.str() << "'. " << e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool FGRouteMgr::loadRoute(const SGPath& path)
|
||||
{
|
||||
if (!path.exists())
|
||||
{
|
||||
SG_LOG(SG_IO, SG_ALERT, "Failed to load flight-plan '" << path.str()
|
||||
<< "'. The file does not exist.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// deactivate route first
|
||||
active->setBoolValue(false);
|
||||
|
||||
|
@ -1335,8 +1342,8 @@ bool FGRouteMgr::loadRoute(const SGPath& path)
|
|||
}
|
||||
return true;
|
||||
} catch (sg_exception& e) {
|
||||
SG_LOG(SG_IO, SG_WARN, "failed to load flight-plan (from '" << e.getOrigin()
|
||||
<< "'):" << e.getMessage());
|
||||
SG_LOG(SG_IO, SG_ALERT, "Failed to load flight-plan '" << e.getOrigin()
|
||||
<< "'. " << e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1456,12 +1463,12 @@ WayptRef FGRouteMgr::parseVersion1XMLWaypt(SGPropertyNode* aWP)
|
|||
|
||||
bool FGRouteMgr::loadPlainTextRoute(const SGPath& path)
|
||||
{
|
||||
sg_gzifstream in(path.str().c_str());
|
||||
if (!in.is_open()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
sg_gzifstream in(path.str().c_str());
|
||||
if (!in.is_open()) {
|
||||
throw sg_io_exception("Cannot open file for reading.");
|
||||
}
|
||||
|
||||
WayptVec wpts;
|
||||
while (!in.eof()) {
|
||||
string line;
|
||||
|
@ -1478,7 +1485,7 @@ bool FGRouteMgr::loadPlainTextRoute(const SGPath& path)
|
|||
|
||||
WayptRef w = waypointFromString(line);
|
||||
if (!w) {
|
||||
throw sg_io_exception("failed to create waypoint from line:" + line);
|
||||
throw sg_io_exception("Failed to create waypoint from line '" + line + "'.");
|
||||
}
|
||||
|
||||
wpts.push_back(w);
|
||||
|
@ -1487,7 +1494,7 @@ bool FGRouteMgr::loadPlainTextRoute(const SGPath& path)
|
|||
_route = wpts;
|
||||
return true;
|
||||
} catch (sg_exception& e) {
|
||||
SG_LOG(SG_IO, SG_WARN, "failed to load route from:" << path.str() << ":" << e.getMessage());
|
||||
SG_LOG(SG_IO, SG_ALERT, "Failed to load route from: '" << path.str() << "'. " << e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,4 +6,11 @@ set(SOURCES
|
|||
built_in/FGMagRibbon.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Cockpit "${SOURCES}")
|
||||
set(HEADERS
|
||||
panel.hxx
|
||||
panel_io.hxx
|
||||
built_in/FGMagRibbon.hxx
|
||||
)
|
||||
|
||||
|
||||
flightgear_component(Cockpit "${SOURCES}" "${HEADERS}")
|
|
@ -18,5 +18,24 @@ set(SOURCES
|
|||
presets.cxx
|
||||
gravity.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Environment "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
atmosphere.hxx
|
||||
environment.hxx
|
||||
environment_ctrl.hxx
|
||||
environment_mgr.hxx
|
||||
ephemeris.hxx
|
||||
fgclouds.hxx
|
||||
fgmetar.hxx
|
||||
fgwind.hxx
|
||||
metarairportfilter.hxx
|
||||
metarproperties.hxx
|
||||
precipitation_mgr.hxx
|
||||
realwx_ctrl.hxx
|
||||
ridge_lift.hxx
|
||||
terrainsampler.hxx
|
||||
presets.hxx
|
||||
gravity.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Environment "${SOURCES}" "${HEADERS}")
|
||||
|
|
|
@ -366,6 +366,7 @@ void TerrainSamplerImplementation::reinit()
|
|||
if( subsys == NULL )
|
||||
break;
|
||||
remove_subsystem( subsystemName );
|
||||
delete subsys;
|
||||
}
|
||||
|
||||
init();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Date started: 01/21/08
|
||||
Purpose: Encapsulates the buoyant forces
|
||||
|
||||
------------- Copyright (C) 2008 - 2010 Anders Gidenstam -------------
|
||||
------------- Copyright (C) 2008 - 2011 Anders Gidenstam -------------
|
||||
------------- Copyright (C) 2008 Jon S. Berndt (jon@jsbsim.org) -------------
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
|
@ -45,7 +45,7 @@ using namespace std;
|
|||
|
||||
namespace JSBSim {
|
||||
|
||||
static const char *IdSrc = "$Id: FGBuoyantForces.cpp,v 1.17 2011/05/20 03:18:36 jberndt Exp $";
|
||||
static const char *IdSrc = "$Id: FGBuoyantForces.cpp,v 1.19 2011/07/01 21:22:25 andgi Exp $";
|
||||
static const char *IdHdr = ID_BUOYANTFORCES;
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
@ -179,16 +179,7 @@ const FGMatrix33& FGBuoyantForces::GetGasMassInertia(void)
|
|||
gasCellJ = FGMatrix33();
|
||||
|
||||
for (unsigned int i=0; i < size; i++) {
|
||||
FGColumnVector3 v = FDMExec->GetMassBalance()->StructuralToBody( Cells[i]->GetXYZ() );
|
||||
// Body basis is in FT.
|
||||
const double mass = Cells[i]->GetMass();
|
||||
|
||||
// FIXME: Verify that this is the correct way to change between the
|
||||
// coordinate frames.
|
||||
gasCellJ += Cells[i]->GetInertia() +
|
||||
FGMatrix33( 0, - mass*v(1)*v(2), - mass*v(1)*v(3),
|
||||
- mass*v(2)*v(1), 0, - mass*v(2)*v(3),
|
||||
- mass*v(3)*v(1), - mass*v(3)*v(2), 0 );
|
||||
gasCellJ += Cells[i]->GetInertia();
|
||||
}
|
||||
|
||||
return gasCellJ;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Author: Anders Gidenstam, Jon S. Berndt
|
||||
Date started: 01/21/08
|
||||
|
||||
------------- Copyright (C) 2008 - 2010 Anders Gidenstam -------------
|
||||
------------- Copyright (C) 2008 - 2011 Anders Gidenstam -------------
|
||||
------------- Copyright (C) 2008 Jon S. Berndt (jon@jsbsim.org) -------------
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
|
@ -51,7 +51,7 @@ INCLUDES
|
|||
DEFINITIONS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#define ID_BUOYANTFORCES "$Id: FGBuoyantForces.h,v 1.12 2011/05/20 03:18:36 jberndt Exp $"
|
||||
#define ID_BUOYANTFORCES "$Id: FGBuoyantForces.h,v 1.13 2011/07/01 21:22:25 andgi Exp $"
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
FORWARD DECLARATIONS
|
||||
|
@ -96,7 +96,7 @@ CLASS DOCUMENTATION
|
|||
See FGGasCell for the full configuration file format for gas cells.
|
||||
|
||||
@author Anders Gidenstam, Jon S. Berndt
|
||||
@version $Id: FGBuoyantForces.h,v 1.12 2011/05/20 03:18:36 jberndt Exp $
|
||||
@version $Id: FGBuoyantForces.h,v 1.13 2011/07/01 21:22:25 andgi Exp $
|
||||
*/
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
@ -132,19 +132,19 @@ public:
|
|||
bool Load(Element* element);
|
||||
|
||||
/** Gets the total Buoyant force vector.
|
||||
@return a force vector. */
|
||||
@return a force vector in lbs. */
|
||||
const FGColumnVector3& GetForces(void) const {return vTotalForces;}
|
||||
|
||||
/** Gets a component of the total Buoyant force vector.
|
||||
@return a component of the force vector. */
|
||||
@return a component of the force vector in lbs. */
|
||||
double GetForces(int idx) const {return vTotalForces(idx);}
|
||||
|
||||
/** Gets the total Buoyancy moment vector.
|
||||
@return a moment vector. */
|
||||
@return a moment vector in the body frame in lbs ft. */
|
||||
const FGColumnVector3& GetMoments(void) const {return vTotalMoments;}
|
||||
|
||||
/** Gets a component of the total Buoyancy moment vector.
|
||||
@return a component of the moment vector. */
|
||||
@return a component of the moment vector in the body frame in lbs ft. */
|
||||
double GetMoments(int idx) const {return vTotalMoments(idx);}
|
||||
|
||||
/** Gets the total gas mass. The gas mass is part of the aircraft's
|
||||
|
@ -153,11 +153,12 @@ public:
|
|||
double GetGasMass(void);
|
||||
|
||||
/** Gets the total moment from the gas mass.
|
||||
@return a moment vector. */
|
||||
@return a moment vector in the structural frame in lbs in. */
|
||||
const FGColumnVector3& GetGasMassMoment(void);
|
||||
|
||||
/** Gets the total moments of inertia for the gas mass.
|
||||
@return . */
|
||||
/** Gets the total moments of inertia for the gas mass in the body frame.
|
||||
@return moments of inertia matrix in the body frame
|
||||
in slug ft<sup>2</sup>. */
|
||||
const FGMatrix33& GetGasMassInertia(void);
|
||||
|
||||
/** Gets the strings for the current set of gas cells.
|
||||
|
@ -174,13 +175,13 @@ public:
|
|||
private:
|
||||
vector <FGGasCell*> Cells;
|
||||
// Buoyant forces and moments. Excluding the gas weight.
|
||||
FGColumnVector3 vTotalForces;
|
||||
FGColumnVector3 vTotalMoments;
|
||||
FGColumnVector3 vTotalForces; // [lbs]
|
||||
FGColumnVector3 vTotalMoments; // [lbs ft]
|
||||
|
||||
// Gas mass related masses, inertias and moments.
|
||||
FGMatrix33 gasCellJ;
|
||||
FGMatrix33 gasCellJ; // [slug ft^2]
|
||||
FGColumnVector3 vGasCellXYZ;
|
||||
FGColumnVector3 vXYZgasCell_arm;
|
||||
FGColumnVector3 vXYZgasCell_arm; // [lbs in]
|
||||
|
||||
bool NoneDefined;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Author: Anders Gidenstam
|
||||
Date started: 01/21/2006
|
||||
|
||||
----- Copyright (C) 2006 - 2008 Anders Gidenstam (anders(at)gidenstam.org) --
|
||||
----- Copyright (C) 2006 - 2011 Anders Gidenstam (anders(at)gidenstam.org) --
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the Free Software
|
||||
|
@ -53,7 +53,7 @@ using std::max;
|
|||
|
||||
namespace JSBSim {
|
||||
|
||||
static const char *IdSrc = "$Id: FGGasCell.cpp,v 1.13 2010/12/29 22:39:25 andgi Exp $";
|
||||
static const char *IdSrc = "$Id: FGGasCell.cpp,v 1.14 2011/07/01 21:22:25 andgi Exp $";
|
||||
static const char *IdHdr = ID_GASCELL;
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
@ -405,6 +405,9 @@ void FGGasCell::Calculate(double dt)
|
|||
gasCellJ(2,2) = Iyy;
|
||||
gasCellJ(3,3) = Izz;
|
||||
Mass = mass;
|
||||
// Transform the moments of inertia to the body frame.
|
||||
gasCellJ += MassBalance->GetPointmassInertia(Mass, GetXYZ());
|
||||
|
||||
gasCellM.InitMatrix();
|
||||
gasCellM(eX) +=
|
||||
GetXYZ(eX) * Mass*slugtolb;
|
||||
|
@ -415,12 +418,10 @@ void FGGasCell::Calculate(double dt)
|
|||
|
||||
if (no_ballonets > 0) {
|
||||
// Add the mass, moment and inertia of any ballonets.
|
||||
const FGColumnVector3 p = MassBalance->StructuralToBody( GetXYZ() );
|
||||
|
||||
for (i = 0; i < no_ballonets; i++) {
|
||||
Mass += Ballonet[i]->GetMass();
|
||||
|
||||
// Add ballonet moments.
|
||||
// Add ballonet moments due to mass (in the structural frame).
|
||||
gasCellM(eX) +=
|
||||
Ballonet[i]->GetXYZ(eX) * Ballonet[i]->GetMass()*slugtolb;
|
||||
gasCellM(eY) +=
|
||||
|
@ -428,15 +429,7 @@ void FGGasCell::Calculate(double dt)
|
|||
gasCellM(eZ) +=
|
||||
Ballonet[i]->GetXYZ(eZ) * Ballonet[i]->GetMass()*slugtolb;
|
||||
|
||||
// Moments of inertia must be converted to the gas cell frame here.
|
||||
FGColumnVector3 v =
|
||||
MassBalance->StructuralToBody( Ballonet[i]->GetXYZ() ) - p;
|
||||
// Body basis is in FT.
|
||||
const double mass = Ballonet[i]->GetMass();
|
||||
gasCellJ += Ballonet[i]->GetInertia() +
|
||||
FGMatrix33( 0, - mass*v(1)*v(2), - mass*v(1)*v(3),
|
||||
- mass*v(2)*v(1), 0, - mass*v(2)*v(3),
|
||||
- mass*v(3)*v(1), - mass*v(3)*v(2), 0 );
|
||||
gasCellJ += Ballonet[i]->GetInertia();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -525,6 +518,7 @@ FGBallonet::FGBallonet(FGFDMExec* exec, Element* el, int num, FGGasCell* parent)
|
|||
Atmosphere = exec->GetAtmosphere();
|
||||
PropertyManager = exec->GetPropertyManager();
|
||||
Inertial = exec->GetInertial();
|
||||
MassBalance = exec->GetMassBalance();
|
||||
|
||||
ballonetJ = FGMatrix33();
|
||||
|
||||
|
@ -791,6 +785,8 @@ void FGBallonet::Calculate(double dt)
|
|||
ballonetJ(1,1) = Ixx;
|
||||
ballonetJ(2,2) = Iyy;
|
||||
ballonetJ(3,3) = Izz;
|
||||
// Transform the moments of inertia to the body frame.
|
||||
ballonetJ += MassBalance->GetPointmassInertia(GetMass(), GetXYZ());
|
||||
}
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Author: Anders Gidenstam
|
||||
Date started: 01/21/2006
|
||||
|
||||
----- Copyright (C) 2006 - 2008 Anders Gidenstam (anders(at)gidenstam.org) --
|
||||
----- Copyright (C) 2006 - 2011 Anders Gidenstam (anders(at)gidenstam.org) --
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the Free Software
|
||||
|
@ -50,7 +50,7 @@ INCLUDES
|
|||
DEFINITIONS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#define ID_GASCELL "$Id: FGGasCell.h,v 1.10 2009/10/24 22:59:30 jberndt Exp $"
|
||||
#define ID_GASCELL "$Id: FGGasCell.h,v 1.11 2011/07/01 21:22:25 andgi Exp $"
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
FORWARD DECLARATIONS
|
||||
|
@ -189,12 +189,12 @@ public:
|
|||
|
||||
/** Get the center of gravity location of the gas cell
|
||||
(including any ballonets)
|
||||
@return CoG location in the structural frame. */
|
||||
@return CoG location in the structural frame in inches. */
|
||||
const FGColumnVector3& GetXYZ(void) const {return vXYZ;}
|
||||
|
||||
/** Get the center of gravity location of the gas cell
|
||||
(including any ballonets)
|
||||
@return CoG location in the structural frame. */
|
||||
@return CoG location in the structural frame in inches. */
|
||||
double GetXYZ(int idx) const {return vXYZ(idx);}
|
||||
|
||||
/** Get the current mass of the gas cell (including any ballonets)
|
||||
|
@ -202,7 +202,7 @@ public:
|
|||
double GetMass(void) const {return Mass;}
|
||||
|
||||
/** Get the moments of inertia of the gas cell (including any ballonets)
|
||||
@return moments of inertia matrix relative the gas cell location
|
||||
@return moments of inertia matrix in the body frame
|
||||
in slug ft<sup>2</sup>. */
|
||||
const FGMatrix33& GetInertia(void) const {return gasCellJ;}
|
||||
|
||||
|
@ -210,7 +210,7 @@ public:
|
|||
|
||||
Note that the buoyancy of the gas cell is handled separately by the
|
||||
FGForce part and not included here.
|
||||
@return moment vector in lbs ft. */
|
||||
@return moment vector in the structural frame in lbs in. */
|
||||
const FGColumnVector3& GetMassMoment(void) const {return gasCellM;}
|
||||
|
||||
/** Get the current gas temperature inside the gas cell
|
||||
|
@ -229,8 +229,8 @@ private:
|
|||
std::string type;
|
||||
int CellNum;
|
||||
// Structural constants
|
||||
double MaxVolume; // [ft<EFBFBD>]
|
||||
double MaxOverpressure; // [lbs/ft<EFBFBD>]
|
||||
double MaxVolume; // [ft^2]
|
||||
double MaxOverpressure; // [lbs/ft^2]
|
||||
FGColumnVector3 vXYZ; // [in]
|
||||
double Xradius, Yradius, Zradius; // [ft]
|
||||
double Xwidth, Ywidth, Zwidth; // [ft]
|
||||
|
@ -240,17 +240,17 @@ private:
|
|||
typedef vector <FGBallonet*> BallonetArray;
|
||||
BallonetArray Ballonet;
|
||||
// Variables
|
||||
double Pressure; // [lbs/ft<EFBFBD>]
|
||||
double Pressure; // [lbs/ft^2]
|
||||
double Contents; // [mol]
|
||||
double Volume; // [ft<EFBFBD>]
|
||||
double dVolumeIdeal; // [ft<EFBFBD>]
|
||||
double Volume; // [ft^2]
|
||||
double dVolumeIdeal; // [ft^2]
|
||||
double Temperature; // [Rankine]
|
||||
double Buoyancy; // [lbs] Note: Gross lift.
|
||||
// Does not include the weight of the gas itself.
|
||||
double ValveOpen; // 0 <= ValveOpen <= 1 (or higher).
|
||||
double Mass; // [slug]
|
||||
FGMatrix33 gasCellJ; // [slug foot<EFBFBD>]
|
||||
FGColumnVector3 gasCellM; // [lbs ft]
|
||||
FGMatrix33 gasCellJ; // [slug foot^2]
|
||||
FGColumnVector3 gasCellM; // [lbs in]
|
||||
|
||||
FGAuxiliary* Auxiliary;
|
||||
FGAtmosphere* Atmosphere;
|
||||
|
@ -295,7 +295,6 @@ private:
|
|||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
/** Models a ballonet inside a gas cell.
|
||||
Models a ballonet inside a gas cell.
|
||||
Not intended to be used outside FGGasCell.
|
||||
See FGGasCell for the configuration file format.
|
||||
@author Anders Gidenstam
|
||||
|
@ -312,10 +311,10 @@ public:
|
|||
|
||||
|
||||
/** Get the center of gravity location of the ballonet
|
||||
@return CoG location in the structural frame. */
|
||||
@return CoG location in the structural frame in inches. */
|
||||
const FGColumnVector3& GetXYZ(void) const {return vXYZ;}
|
||||
/** Get the center of gravity location of the ballonet
|
||||
@return CoG location in the structural frame. */
|
||||
@return CoG location in the structural frame in inches. */
|
||||
double GetXYZ(int idx) const {return vXYZ(idx);}
|
||||
|
||||
/** Get the current mass of the ballonets
|
||||
|
@ -323,7 +322,8 @@ public:
|
|||
double GetMass(void) const {return Contents * M_air;}
|
||||
|
||||
/** Get the moments of inertia of the ballonet
|
||||
@return moments of inertia matrix in slug ft<sup>2</sup>. */
|
||||
@return moments of inertia matrix in the body frame in
|
||||
slug ft<sup>2</sup>. */
|
||||
const FGMatrix33& GetInertia(void) const {return ballonetJ;}
|
||||
|
||||
/** Get the current volume of the ballonet
|
||||
|
@ -336,8 +336,8 @@ public:
|
|||
private:
|
||||
int CellNum;
|
||||
// Structural constants
|
||||
double MaxVolume; // [ft<EFBFBD>]
|
||||
double MaxOverpressure; // [lbs/ft<EFBFBD>]
|
||||
double MaxVolume; // [ft^2]
|
||||
double MaxOverpressure; // [lbs/ft^2]
|
||||
FGColumnVector3 vXYZ; // [in]
|
||||
double Xradius, Yradius, Zradius; // [ft]
|
||||
double Xwidth, Ywidth, Zwidth; // [ft]
|
||||
|
@ -347,19 +347,20 @@ private:
|
|||
FGFunction* BlowerInput; // [ft^3 / sec]
|
||||
FGGasCell* Parent;
|
||||
// Variables
|
||||
double Pressure; // [lbs/ft<EFBFBD>]
|
||||
double Pressure; // [lbs/ft^2]
|
||||
double Contents; // [mol]
|
||||
double Volume; // [ft<EFBFBD>]
|
||||
double dVolumeIdeal; // [ft<EFBFBD>]
|
||||
double Volume; // [ft^2]
|
||||
double dVolumeIdeal; // [ft^2]
|
||||
double dU; // [lbs ft / sec]
|
||||
double Temperature; // [Rankine]
|
||||
double ValveOpen; // 0 <= ValveOpen <= 1 (or higher).
|
||||
FGMatrix33 ballonetJ; // [slug foot<EFBFBD>]
|
||||
FGMatrix33 ballonetJ; // [slug foot^2]
|
||||
|
||||
FGAuxiliary* Auxiliary;
|
||||
FGAtmosphere* Atmosphere;
|
||||
FGPropertyManager* PropertyManager;
|
||||
FGInertial* Inertial;
|
||||
FGMassBalance* MassBalance;
|
||||
void Debug(int from);
|
||||
|
||||
/* Constants. */
|
||||
|
|
|
@ -259,6 +259,11 @@ void YASim::copyToYASim(bool copyState)
|
|||
|
||||
// position
|
||||
sgGeodToCart(lat, lon, alt, s.pos);
|
||||
{
|
||||
// allow setting of /position/[lat|long|alti]tude
|
||||
double * dp = &model->getState()->pos[0];
|
||||
dp[0] = s.pos[0]; dp[1] = s.pos[1]; dp[2] = s.pos[2];
|
||||
}
|
||||
|
||||
// orientation
|
||||
Glue::euler2orient(roll, pitch, hdg, s.orient);
|
||||
|
|
|
@ -15,5 +15,18 @@ set(SOURCES
|
|||
new_gui.cxx
|
||||
property_list.cxx
|
||||
)
|
||||
|
||||
flightgear_component(GUI "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
AirportList.hxx
|
||||
MapWidget.hxx
|
||||
SafeTexFont.hxx
|
||||
WaypointList.hxx
|
||||
dialog.hxx
|
||||
gui.h
|
||||
layout.hxx
|
||||
menubar.hxx
|
||||
new_gui.hxx
|
||||
property_list.hxx
|
||||
)
|
||||
|
||||
flightgear_component(GUI "${SOURCES}" "${HEADERS}")
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
#include <Navaids/positioned.hxx>
|
||||
#include <Autopilot/route_mgr.hxx>
|
||||
|
||||
// select if the widget grabs keys necessary to fly aircraft from the keyboard,
|
||||
// or not. See http://code.google.com/p/flightgear-bugs/issues/detail?id=338
|
||||
// for discussion about why / what is going on.
|
||||
#define AVOID_FLIGHT_KEYS 1
|
||||
|
||||
using namespace flightgear;
|
||||
|
||||
enum {
|
||||
|
@ -659,6 +664,10 @@ int WaypointList::checkKey (int key, int updown )
|
|||
if ((updown == PU_UP) || !isVisible () || !isActive () || (window != puGetWindow())) {
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
#ifdef AVOID_FLIGHT_KEYS
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
switch (key)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
#define PACKAGE "FlightGear"
|
||||
|
||||
/* Define to package version - use in main.cxx */
|
||||
#define FLIGHTGEAR_VERSION "MSVC9.0-WIN32-2.0.0"
|
||||
// define in version.h and no_version.h
|
||||
/* #define FLIGHTGEAR_VERSION "MSVC9.0-WIN32-2.0.0" */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
// placeholder values instead.
|
||||
|
||||
#define FLIGHTGEAR_VERSION "development " __DATE__
|
||||
#define SIMGEAR_VERSION FLIGHTGEAR_VERSION
|
||||
|
||||
#define HUDSON_BUILD_NUMBER 0
|
||||
#define HUDSON_BUILD_ID "none"
|
||||
#define REVISION "unknown"
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -305,7 +305,9 @@ void FGJoystickInput::update( double dt )
|
|||
// Do nothing if the axis position
|
||||
// is unchanged; only a change in
|
||||
// position fires the bindings.
|
||||
if (fabs(axis_values[j] - a.last_value) > a.tolerance) {
|
||||
// But only if there are bindings
|
||||
if (fabs(axis_values[j] - a.last_value) > a.tolerance
|
||||
&& a.bindings[KEYMOD_NONE].size() > 0 ) {
|
||||
a.last_value = axis_values[j];
|
||||
for (unsigned int k = 0; k < a.bindings[KEYMOD_NONE].size(); k++)
|
||||
a.bindings[KEYMOD_NONE][k]->fire(axis_values[j]);
|
||||
|
@ -329,7 +331,7 @@ void FGJoystickInput::update( double dt )
|
|||
FGButton &b = bindings[i].buttons[j];
|
||||
b.last_dt += dt;
|
||||
if(b.last_dt >= b.interval_sec) {
|
||||
bindings[i].buttons[j].update( modifiers, (buttons & (1 << j)) > 0 );
|
||||
bindings[i].buttons[j].update( modifiers, (buttons & (1u << j)) > 0 );
|
||||
b.last_dt -= b.interval_sec;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,6 +346,11 @@ int HUD::load(const char *file, float x, float y, int level, const string& inden
|
|||
const int MAXNEST = 10;
|
||||
|
||||
SGPath path(globals->resolve_maybe_aircraft_path(file));
|
||||
if (path.isNull())
|
||||
{
|
||||
SG_LOG(SG_INPUT, SG_ALERT, "HUD: Cannot find configuration file '" << file << "'.");
|
||||
return 0x2;
|
||||
}
|
||||
|
||||
if (!level) {
|
||||
SG_LOG(SG_INPUT, TREE, endl << "load " << file);
|
||||
|
@ -362,7 +367,7 @@ int HUD::load(const char *file, float x, float y, int level, const string& inden
|
|||
int ret = 0;
|
||||
ifstream input(path.c_str());
|
||||
if (!input.good()) {
|
||||
SG_LOG(SG_INPUT, SG_ALERT, "HUD: Cannot read configuration from " << path.str());
|
||||
SG_LOG(SG_INPUT, SG_ALERT, "HUD: Cannot read configuration from '" << path.c_str() << "'");
|
||||
return 0x4;
|
||||
}
|
||||
|
||||
|
|
|
@ -897,7 +897,8 @@ void FGNavRadio::updateAudio()
|
|||
}
|
||||
|
||||
last_time = now;
|
||||
play_count = ++play_count % NUM_IDENT_SLOTS;
|
||||
play_count++;
|
||||
play_count %= NUM_IDENT_SLOTS;
|
||||
|
||||
// Previous ident is out of time; if still playing, cut it off:
|
||||
_sgr->stop( nav_fx_name );
|
||||
|
|
|
@ -31,8 +31,29 @@ set(SOURCES
|
|||
viewmgr.cxx
|
||||
${RESOURCE_FILE}
|
||||
)
|
||||
|
||||
add_executable(fgfs ${SOURCES})
|
||||
|
||||
set(HEADERS
|
||||
CameraGroup.hxx
|
||||
FGEventHandler.hxx
|
||||
WindowBuilder.hxx
|
||||
WindowSystemAdapter.hxx
|
||||
fg_commands.hxx
|
||||
fg_init.hxx
|
||||
fg_io.hxx
|
||||
fg_props.hxx
|
||||
fgviewer.hxx
|
||||
globals.hxx
|
||||
logger.hxx
|
||||
main.hxx
|
||||
options.hxx
|
||||
renderer.hxx
|
||||
splash.hxx
|
||||
util.hxx
|
||||
viewer.hxx
|
||||
viewmgr.hxx
|
||||
)
|
||||
|
||||
add_executable(fgfs ${SOURCES} ${HEADERS})
|
||||
|
||||
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
|
||||
#message(STATUS "fg libs ${FG_LIBS}")
|
||||
|
|
|
@ -71,10 +71,10 @@ bool free_hostname = false;
|
|||
void fgExitCleanup();
|
||||
|
||||
static bool fpeAbort = false;
|
||||
static void handleFPE(int);
|
||||
static void initFPE();
|
||||
|
||||
#if defined(HAVE_FEENABLEEXCEPT)
|
||||
static void handleFPE(int);
|
||||
static void
|
||||
initFPE ()
|
||||
{
|
||||
|
@ -93,6 +93,7 @@ static void handleFPE(int)
|
|||
}
|
||||
#elif defined(__linux__) && defined(__i386__)
|
||||
|
||||
static void handleFPE(int);
|
||||
static void
|
||||
initFPE ()
|
||||
{
|
||||
|
@ -115,10 +116,6 @@ handleFPE (int num)
|
|||
SG_LOG(SG_GENERAL, SG_ALERT, "Floating point interrupt (SIGFPE)");
|
||||
}
|
||||
#else
|
||||
static void handleFPE(int)
|
||||
{
|
||||
}
|
||||
|
||||
static void initFPE()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -726,15 +726,18 @@ static bool
|
|||
do_property_assign (const SGPropertyNode * arg)
|
||||
{
|
||||
SGPropertyNode * prop = get_prop(arg);
|
||||
const SGPropertyNode * prop2 = get_prop2(arg);
|
||||
const SGPropertyNode * value = arg->getNode("value");
|
||||
|
||||
if (value != 0)
|
||||
return prop->setUnspecifiedValue(value->getStringValue());
|
||||
else if (prop2)
|
||||
return prop->setUnspecifiedValue(prop2->getStringValue());
|
||||
else
|
||||
return false;
|
||||
{
|
||||
const SGPropertyNode * prop2 = get_prop2(arg);
|
||||
if (prop2)
|
||||
return prop->setUnspecifiedValue(prop2->getStringValue());
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1064,14 +1067,9 @@ static bool
|
|||
do_add_model (const SGPropertyNode * arg)
|
||||
{
|
||||
SGPropertyNode * model = fgGetNode("models", true);
|
||||
for (int i = 0;; i++) {
|
||||
if (i < 0)
|
||||
return false;
|
||||
if (!model->getChild("model", i, false)) {
|
||||
model = model->getChild("model", i, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
int i;
|
||||
for (i = 0; model->hasChild("model",i); i++);
|
||||
model = model->getChild("model", i, true);
|
||||
copyProperties(arg, model);
|
||||
if (model->hasValue("elevation-m"))
|
||||
model->setDoubleValue("elevation-ft", model->getDoubleValue("elevation-m")
|
||||
|
@ -1229,7 +1227,15 @@ do_load_xml_to_proptree(const SGPropertyNode * arg)
|
|||
std::string icao = arg->getStringValue("icao");
|
||||
if (icao.empty()) {
|
||||
if (file.isRelative()) {
|
||||
file = globals->resolve_maybe_aircraft_path(file.str());
|
||||
SGPath absPath = globals->resolve_maybe_aircraft_path(file.str());
|
||||
if (!absPath.isNull())
|
||||
file = absPath;
|
||||
else
|
||||
{
|
||||
SG_LOG(SG_IO, SG_ALERT, "loadxml: Cannot find XML property file '"
|
||||
<< file.str() << "'.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!XMLLoader::findAirportData(icao, file.str(), file)) {
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include <simgear/misc/sg_path.hxx>
|
||||
#include <simgear/misc/sg_dir.hxx>
|
||||
#include <simgear/misc/sgstream.hxx>
|
||||
#include <simgear/misc/strutils.hxx>
|
||||
|
||||
#include <simgear/misc/interpolator.hxx>
|
||||
#include <simgear/scene/material/matlib.hxx>
|
||||
|
@ -997,18 +998,37 @@ static void fgSetDistOrAltFromGlideSlope() {
|
|||
|
||||
|
||||
// Set current_options lon/lat given an airport id and heading (degrees)
|
||||
static bool fgSetPosFromNAV( const string& id, const double& freq ) {
|
||||
FGNavRecord *nav
|
||||
= globals->get_navlist()->findByIdentAndFreq( id.c_str(), freq );
|
||||
static bool fgSetPosFromNAV( const string& id, const double& freq, FGPositioned::Type type ) {
|
||||
|
||||
if (!nav) {
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "Failed to locate NAV = "
|
||||
<< id << ":" << freq );
|
||||
return false;
|
||||
}
|
||||
|
||||
fgApplyStartOffset(nav->geod(), fgGetDouble("/sim/presets/heading-deg"));
|
||||
return true;
|
||||
const nav_list_type navlist
|
||||
= globals->get_navlist()->findByIdentAndFreq( id.c_str(), freq, type );
|
||||
|
||||
if (navlist.size() == 0 ) {
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "Failed to locate NAV = "
|
||||
<< id << ":" << freq );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( navlist.size() > 1 ) {
|
||||
ostringstream buf;
|
||||
buf << "Ambigous NAV-ID: '" << id << "'. Specify id and frequency. Available stations:" << endl;
|
||||
for( nav_list_type::const_iterator it = navlist.begin(); it != navlist.end(); ++it ) {
|
||||
// NDB stored in kHz, VOR stored in MHz * 100 :-P
|
||||
double factor = (*it)->type() == FGPositioned::NDB ? 1.0 : 1/100.0;
|
||||
string unit = (*it)->type() == FGPositioned::NDB ? "kHz" : "MHz";
|
||||
buf << (*it)->ident() << " "
|
||||
<< setprecision(5) << (double)((*it)->get_freq() * factor) << " "
|
||||
<< (*it)->get_lat() << "/" << (*it)->get_lon()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, buf.str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
FGNavRecord *nav = navlist[0];
|
||||
fgApplyStartOffset(nav->geod(), fgGetDouble("/sim/presets/heading-deg"));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Set current_options lon/lat given an aircraft carrier id
|
||||
|
@ -1220,14 +1240,14 @@ bool fgInitPosition() {
|
|||
|
||||
if ( !set_pos && !vor.empty() ) {
|
||||
// a VOR is requested
|
||||
if ( fgSetPosFromNAV( vor, vor_freq ) ) {
|
||||
if ( fgSetPosFromNAV( vor, vor_freq, FGPositioned::VOR ) ) {
|
||||
set_pos = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !set_pos && !ndb.empty() ) {
|
||||
// an NDB is requested
|
||||
if ( fgSetPosFromNAV( ndb, ndb_freq ) ) {
|
||||
if ( fgSetPosFromNAV( ndb, ndb_freq, FGPositioned::NDB ) ) {
|
||||
set_pos = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,8 +182,12 @@ FGGlobals::~FGGlobals()
|
|||
delete current_panel;
|
||||
|
||||
delete ATC_mgr;
|
||||
controls->unbind();
|
||||
delete controls;
|
||||
|
||||
if (controls)
|
||||
{
|
||||
controls->unbind();
|
||||
delete controls;
|
||||
}
|
||||
|
||||
delete channel_options_list;
|
||||
delete initial_waypoints;
|
||||
|
|
|
@ -615,7 +615,7 @@ int fgMainInit( int argc, char **argv ) {
|
|||
fgInitFGRoot(argc, argv);
|
||||
|
||||
// Check for the correct base package version
|
||||
static char required_version[] = "2.3.0";
|
||||
static char required_version[] = "2.5.0";
|
||||
string base_version = fgBasePackageVersion();
|
||||
if ( !(base_version == required_version) ) {
|
||||
// tell the operator how to use this application
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include <Main/viewer.hxx>
|
||||
#include <Environment/presets.hxx>
|
||||
|
||||
#include <simgear/version.h>
|
||||
#include <osg/Version>
|
||||
|
||||
using std::string;
|
||||
|
@ -70,6 +69,7 @@ using std::endl;
|
|||
|
||||
#if defined( HAVE_VERSION_H ) && HAVE_VERSION_H
|
||||
# include <Include/version.h>
|
||||
# include <simgear/version.h>
|
||||
#else
|
||||
# include <Include/no_version.h>
|
||||
#endif
|
||||
|
@ -1132,10 +1132,16 @@ fgOptDME( const char *arg )
|
|||
fgSetString("/instrumentation/dme/frequencies/source",
|
||||
"/instrumentation/nav[1]/frequencies/selected-mhz");
|
||||
} else {
|
||||
double frequency = atof(arg);
|
||||
if (frequency==0.0)
|
||||
{
|
||||
SG_LOG(SG_INPUT, SG_ALERT, "Invalid DME frequency: '" << arg << "'.");
|
||||
return FG_OPTIONS_ERROR;
|
||||
}
|
||||
fgSetInt("/instrumentation/dme/switch-position", 2);
|
||||
fgSetString("/instrumentation/dme/frequencies/source",
|
||||
"/instrumentation/dme/frequencies/selected-mhz");
|
||||
fgSetString("/instrumentation/dme/frequencies/selected-mhz", arg);
|
||||
fgSetDouble("/instrumentation/dme/frequencies/selected-mhz", frequency);
|
||||
}
|
||||
return FG_OPTIONS_OK;
|
||||
}
|
||||
|
@ -1335,7 +1341,9 @@ struct OptionDesc {
|
|||
{"airport", true, OPTION_STRING, "/sim/presets/airport-id", false, "", 0 },
|
||||
{"runway", true, OPTION_FUNC, "", false, "", fgOptRunway },
|
||||
{"vor", true, OPTION_FUNC, "", false, "", fgOptVOR },
|
||||
{"vor-frequency", true, OPTION_DOUBLE, "/sim/presets/vor-freq", false, "", fgOptVOR },
|
||||
{"ndb", true, OPTION_FUNC, "", false, "", fgOptNDB },
|
||||
{"ndb-frequency", true, OPTION_DOUBLE, "/sim/presets/ndb-freq", false, "", fgOptVOR },
|
||||
{"carrier", true, OPTION_FUNC, "", false, "", fgOptCarrier },
|
||||
{"parkpos", true, OPTION_FUNC, "", false, "", fgOptParkpos },
|
||||
{"fix", true, OPTION_FUNC, "", false, "", fgOptFIX },
|
||||
|
|
|
@ -187,8 +187,19 @@ static osg::Node* fgCreateSplashCamera()
|
|||
fgSetString("/sim/startup/program-name", namestring);
|
||||
delete[] namestring;
|
||||
|
||||
SGPath tpath( globals->get_fg_root() );
|
||||
if (splash_texture == NULL || !strcmp(splash_texture, "")) {
|
||||
SGPath tpath;
|
||||
if (splash_texture && strcmp(splash_texture, "")) {
|
||||
tpath = globals->resolve_maybe_aircraft_path(splash_texture);
|
||||
if (tpath.isNull())
|
||||
{
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot find splash screen file '" << splash_texture
|
||||
<< "'. Using default." );
|
||||
}
|
||||
}
|
||||
|
||||
if (tpath.isNull()) {
|
||||
// no splash screen specified - select random image
|
||||
tpath = globals->get_fg_root();
|
||||
// load in the texture data
|
||||
int num = (int)(sg_random() * 5.0 + 1.0);
|
||||
char num_str[5];
|
||||
|
@ -197,10 +208,8 @@ static osg::Node* fgCreateSplashCamera()
|
|||
tpath.append( "Textures/Splash" );
|
||||
tpath.concat( num_str );
|
||||
tpath.concat( ".png" );
|
||||
} else {
|
||||
tpath = globals->resolve_maybe_aircraft_path(splash_texture);
|
||||
}
|
||||
|
||||
|
||||
osg::Texture2D* splashTexture = new osg::Texture2D;
|
||||
splashTexture->setImage(osgDB::readImageFile(tpath.c_str()));
|
||||
|
||||
|
|
|
@ -6,5 +6,12 @@ set(SOURCES
|
|||
modelmgr.cxx
|
||||
panelnode.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Model "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
acmodel.hxx
|
||||
model_panel.hxx
|
||||
modelmgr.hxx
|
||||
panelnode.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Model "${SOURCES}" "${HEADERS}")
|
|
@ -5,4 +5,9 @@ set(SOURCES
|
|||
tiny_xdr.cxx
|
||||
)
|
||||
|
||||
flightgear_component(MultiPlayer "${SOURCES}")
|
||||
set(HEADERS
|
||||
multiplaymgr.hxx
|
||||
tiny_xdr.hxx
|
||||
)
|
||||
|
||||
flightgear_component(MultiPlayer "${SOURCES}" "${HEADERS}")
|
|
@ -2,7 +2,6 @@ include(FlightGearComponent)
|
|||
|
||||
set(SOURCES
|
||||
airways.cxx
|
||||
awynet.cxx
|
||||
fixlist.cxx
|
||||
markerbeacon.cxx
|
||||
navdb.cxx
|
||||
|
@ -16,4 +15,19 @@ set(SOURCES
|
|||
PositionedBinding.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Navaids "${SOURCES}")
|
||||
set(HEADERS
|
||||
airways.hxx
|
||||
fixlist.hxx
|
||||
markerbeacon.hxx
|
||||
navdb.hxx
|
||||
navlist.hxx
|
||||
navrecord.hxx
|
||||
positioned.hxx
|
||||
procedure.hxx
|
||||
route.hxx
|
||||
routePath.hxx
|
||||
waypoint.hxx
|
||||
PositionedBinding.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Navaids "${SOURCES}" "${HEADERS}")
|
|
@ -317,7 +317,7 @@ void FGAirwayNetwork::load(const SGPath& path)
|
|||
int FGAirwayNetwork::findNearestNode(const SGGeod& aPos)
|
||||
{
|
||||
double minDist = HUGE_VAL;
|
||||
int index;
|
||||
int index = -1;
|
||||
SGVec3d cart = SGVec3d::fromGeod(aPos);
|
||||
|
||||
//cerr << "Lat " << lat << " lon " << lon << endl;
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
#include <Airports/runways.hxx>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using std::string;
|
||||
|
||||
// FGNavList ------------------------------------------------------------------
|
||||
|
@ -73,41 +75,74 @@ FGNavRecord *FGNavList::findByFreq( double freq, const SGGeod& position)
|
|||
return findNavFromList( position, stations );
|
||||
}
|
||||
|
||||
class VORNDBFilter : public FGPositioned::Filter
|
||||
class TypeFilter : public FGPositioned::Filter
|
||||
{
|
||||
public:
|
||||
TypeFilter( const FGPositioned::Type mintype, const FGPositioned::Type maxtype ) : _mintype(mintype), _maxtype(maxtype) {}
|
||||
|
||||
virtual FGPositioned::Type minType() const {
|
||||
return FGPositioned::VOR;
|
||||
return _mintype;
|
||||
}
|
||||
|
||||
virtual FGPositioned::Type maxType() const {
|
||||
return FGPositioned::NDB;
|
||||
return _maxtype;
|
||||
}
|
||||
private:
|
||||
FGPositioned::Type _mintype;
|
||||
FGPositioned::Type _maxtype;
|
||||
};
|
||||
|
||||
// Given an Ident and optional freqency, return the first matching
|
||||
// station.
|
||||
FGNavRecord *FGNavList::findByIdentAndFreq(const string& ident, const double freq )
|
||||
const nav_list_type FGNavList::findByIdentAndFreq(const string& ident, const double freq, const FGPositioned::Type type )
|
||||
{
|
||||
FGPositionedRef cur;
|
||||
VORNDBFilter filter;
|
||||
TypeFilter filter(
|
||||
type == FGPositioned::INVALID ? FGPositioned::VOR : type,
|
||||
type == FGPositioned::INVALID ? FGPositioned::NDB : type );
|
||||
nav_list_type reply;
|
||||
|
||||
cur = FGPositioned::findNextWithPartialId(cur, ident, &filter);
|
||||
|
||||
if (freq <= 0.0) {
|
||||
return static_cast<FGNavRecord*>(cur.ptr()); // might be null
|
||||
}
|
||||
|
||||
int f = (int)(freq*100.0 + 0.5);
|
||||
while (cur) {
|
||||
FGNavRecord* nav = static_cast<FGNavRecord*>(cur.ptr());
|
||||
if (nav->get_freq() == f) {
|
||||
return nav;
|
||||
if ( f <= 0.0 || nav->get_freq() == f) {
|
||||
reply.push_back( nav );
|
||||
}
|
||||
|
||||
cur = FGPositioned::findNextWithPartialId(cur, ident, &filter);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return reply;
|
||||
}
|
||||
|
||||
class NavRecordDistanceSortPredicate
|
||||
{
|
||||
public:
|
||||
NavRecordDistanceSortPredicate( const SGGeod & position ) :
|
||||
_position(SGVec3d::fromGeod(position)) {}
|
||||
|
||||
bool operator()( const nav_rec_ptr & n1, const nav_rec_ptr & n2 )
|
||||
{
|
||||
if( n1 == NULL || n2 == NULL ) return false;
|
||||
return distSqr(n1->cart(), _position) < distSqr(n2->cart(), _position);
|
||||
}
|
||||
private:
|
||||
SGVec3d _position;
|
||||
|
||||
};
|
||||
|
||||
// Given an Ident and optional freqency and type ,
|
||||
// return a list of matching stations sorted by distance to the given position
|
||||
const nav_list_type FGNavList::findByIdentAndFreq( const SGGeod & position,
|
||||
const std::string& ident, const double freq, const FGPositioned::Type type )
|
||||
{
|
||||
nav_list_type reply = findByIdentAndFreq( ident, freq, type );
|
||||
NavRecordDistanceSortPredicate sortPredicate( position );
|
||||
std::sort( reply.begin(), reply.end(), sortPredicate );
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
// discount navids if they conflict with another on the same frequency
|
||||
|
|
|
@ -76,10 +76,16 @@ public:
|
|||
*/
|
||||
FGNavRecord *findByFreq( double freq, const SGGeod& position);
|
||||
|
||||
// Given an Ident and optional freqency, return the first matching
|
||||
// station.
|
||||
FGNavRecord *findByIdentAndFreq( const std::string& ident,
|
||||
const double freq = 0.0 );
|
||||
// Given an Ident and optional freqency and type ,
|
||||
// return a list of matching stations.
|
||||
const nav_list_type findByIdentAndFreq( const std::string& ident,
|
||||
const double freq = 0.0, const FGPositioned::Type = FGPositioned::INVALID );
|
||||
|
||||
// Given an Ident and optional freqency and type ,
|
||||
// return a list of matching stations sorted by distance to the given position
|
||||
const nav_list_type findByIdentAndFreq( const SGGeod & position,
|
||||
const std::string& ident, const double freq = 0.0,
|
||||
const FGPositioned::Type = FGPositioned::INVALID );
|
||||
|
||||
// given a frequency returns the first matching entry
|
||||
FGNavRecord *findStationByFreq( double frequency );
|
||||
|
|
|
@ -27,8 +27,36 @@ set(SOURCES
|
|||
ray.cxx
|
||||
rul.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Network "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
ATC-Inputs.hxx
|
||||
ATC-Main.hxx
|
||||
ATC-Outputs.hxx
|
||||
AV400.hxx
|
||||
AV400Sim.hxx
|
||||
AV400WSim.hxx
|
||||
atlas.hxx
|
||||
garmin.hxx
|
||||
generic.hxx
|
||||
httpd.hxx
|
||||
joyclient.hxx
|
||||
jpg-httpd.hxx
|
||||
jsclient.hxx
|
||||
lfsglass.hxx
|
||||
native.hxx
|
||||
native_ctrls.hxx
|
||||
native_fdm.hxx
|
||||
native_gui.hxx
|
||||
nmea.hxx
|
||||
opengc.hxx
|
||||
props.hxx
|
||||
protocol.hxx
|
||||
pve.hxx
|
||||
ray.hxx
|
||||
rul.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Network "${SOURCES}" "${HEADERS}")
|
||||
|
||||
if(RTI_FOUND)
|
||||
add_subdirectory(HLA)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
EXTRA_DIST = jpg-httpd.cxx jpg-httpd.hxx \
|
||||
multiplay.cxx multiplay.hxx
|
||||
EXTRA_DIST = jpg-httpd.cxx jpg-httpd.hxx
|
||||
|
||||
noinst_LIBRARIES = libNetwork.a
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <simgear/io/iochannel.hxx>
|
||||
|
||||
#include <FDM/flightProperties.hxx>
|
||||
|
||||
#include <Environment/gravity.hxx>
|
||||
#include "ray.hxx"
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ bool FGRAY::gen_message() {
|
|||
double dt = 0.05; /* seconds */
|
||||
|
||||
/* get basic information about gravity */
|
||||
double grav_acc = -9.81;
|
||||
double grav_acc = -Environment::Gravity::instance()->getGravity( f.getPosition() );
|
||||
double vert_acc = f.get_A_Z_pilot() * 0.3;
|
||||
if ( -3.0 < vert_acc )
|
||||
vert_acc = -3.0;
|
||||
|
|
|
@ -6,6 +6,13 @@ set(SOURCES
|
|||
scenery.cxx
|
||||
tilemgr.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Scenery "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
SceneryPager.hxx
|
||||
redout.hxx
|
||||
scenery.hxx
|
||||
tilemgr.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Scenery "${SOURCES}" "${HEADERS}")
|
||||
|
||||
|
|
|
@ -87,9 +87,6 @@ FGTileMgr::FGTileMgr():
|
|||
|
||||
FGTileMgr::~FGTileMgr()
|
||||
{
|
||||
if (_terra_sync)
|
||||
_terra_sync->setTileCache(NULL);
|
||||
|
||||
// remove all nodes we might have left behind
|
||||
osg::Group* group = globals->get_scenery()->get_terrain_branch();
|
||||
group->removeChildren(0, group->getNumChildren());
|
||||
|
|
|
@ -4,6 +4,11 @@ set(SOURCES
|
|||
NasalSys.cxx
|
||||
nasal-props.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Scripting "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
NasalSys.hxx
|
||||
)
|
||||
|
||||
|
||||
flightgear_component(Scripting "${SOURCES}" "${HEADERS}")
|
||||
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
#include <Main/fg_props.hxx>
|
||||
#include <Main/util.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
#include <Navaids/navrecord.hxx>
|
||||
#include <Navaids/navlist.hxx>
|
||||
#include <Navaids/procedure.hxx>
|
||||
|
||||
|
||||
#include "NasalSys.hxx"
|
||||
|
||||
static FGNasalSys* nasalSys = 0;
|
||||
|
@ -695,6 +696,91 @@ static naRef f_airportinfo(naContext c, naRef me, int argc, naRef* args)
|
|||
}
|
||||
|
||||
|
||||
// Returns vector of data hash for navaid of a <type>, nil on error
|
||||
// navaids sorted by ascending distance
|
||||
// navinfo([<lat>,<lon>],[<type>],[<id>])
|
||||
// lat/lon (numeric): use latitude/longitude instead of ac position
|
||||
// type: ("fix"|"vor"|"ndb"|"ils"|"dme"|"tacan"|"any")
|
||||
// id: (partial) id of the fix
|
||||
// examples:
|
||||
// navinfo("vor") returns all vors
|
||||
// navinfo("HAM") return all navaids who's name start with "HAM"
|
||||
// navinfo("vor", "HAM") return all vor who's name start with "HAM"
|
||||
//navinfo(34,48,"vor","HAM") return all vor who's name start with "HAM"
|
||||
// sorted by distance relative to lat=34, lon=48
|
||||
static naRef f_navinfo(naContext c, naRef me, int argc, naRef* args)
|
||||
{
|
||||
static SGConstPropertyNode_ptr latn = fgGetNode("/position/latitude-deg", true);
|
||||
static SGConstPropertyNode_ptr lonn = fgGetNode("/position/longitude-deg", true);
|
||||
SGGeod pos;
|
||||
|
||||
if(argc >= 2 && naIsNum(args[0]) && naIsNum(args[1])) {
|
||||
pos = SGGeod::fromDeg(args[1].num, args[0].num);
|
||||
args += 2;
|
||||
argc -= 2;
|
||||
} else {
|
||||
pos = SGGeod::fromDeg(lonn->getDoubleValue(), latn->getDoubleValue());
|
||||
}
|
||||
|
||||
FGPositioned::Type type = FGPositioned::INVALID;
|
||||
nav_list_type navlist;
|
||||
const char * id = "";
|
||||
|
||||
if(argc > 0 && naIsString(args[0])) {
|
||||
const char *s = naStr_data(args[0]);
|
||||
if(!strcmp(s, "any")) type = FGPositioned::INVALID;
|
||||
else if(!strcmp(s, "fix")) type = FGPositioned::FIX;
|
||||
else if(!strcmp(s, "vor")) type = FGPositioned::VOR;
|
||||
else if(!strcmp(s, "ndb")) type = FGPositioned::NDB;
|
||||
else if(!strcmp(s, "ils")) type = FGPositioned::ILS;
|
||||
else if(!strcmp(s, "dme")) type = FGPositioned::DME;
|
||||
else if(!strcmp(s, "tacan")) type = FGPositioned::TACAN;
|
||||
else id = s; // this is an id
|
||||
++args;
|
||||
--argc;
|
||||
}
|
||||
|
||||
if(argc > 0 && naIsString(args[0])) {
|
||||
if( *id != 0 ) {
|
||||
naRuntimeError(c, "navinfo() called with navaid id");
|
||||
return naNil();
|
||||
}
|
||||
id = naStr_data(args[0]);
|
||||
++args;
|
||||
--argc;
|
||||
}
|
||||
|
||||
if( argc > 0 ) {
|
||||
naRuntimeError(c, "navinfo() called with too many arguments");
|
||||
return naNil();
|
||||
}
|
||||
|
||||
navlist = globals->get_navlist()->findByIdentAndFreq( pos, id, 0.0, type );
|
||||
|
||||
naRef reply = naNewVector(c);
|
||||
for( nav_list_type::const_iterator it = navlist.begin(); it != navlist.end(); ++it ) {
|
||||
const FGNavRecord * nav = *it;
|
||||
|
||||
// set navdata hash
|
||||
naRef navdata = naNewHash(c);
|
||||
#define HASHSET(s,l,n) naHash_set(navdata, naStr_fromdata(naNewString(c),s,l),n)
|
||||
HASHSET("id", 2, naStr_fromdata(naNewString(c),
|
||||
const_cast<char *>(nav->ident().c_str()), nav->ident().length()));
|
||||
HASHSET("name", 4, naStr_fromdata(naNewString(c),
|
||||
const_cast<char *>(nav->name().c_str()), nav->name().length()));
|
||||
HASHSET("lat", 3, naNum(nav->get_lat()));
|
||||
HASHSET("lon", 3, naNum(nav->get_lon()));
|
||||
HASHSET("elevation", 9, naNum(nav->get_elev_ft() * SG_FEET_TO_METER));
|
||||
HASHSET("type", 4, naStr_fromdata(naNewString(c),
|
||||
const_cast<char *>(nav->nameForType(nav->type())), strlen(nav->nameForType(nav->type()))));
|
||||
HASHSET("distance", 8, naNum(SGGeodesy::distanceNm( pos, nav->geod() ) * SG_NM_TO_METER ) );
|
||||
HASHSET("bearing", 7, naNum(SGGeodesy::courseDeg( pos, nav->geod() ) ) );
|
||||
#undef HASHSET
|
||||
naVec_append( reply, navdata );
|
||||
}
|
||||
return reply;
|
||||
}
|
||||
|
||||
// Table of extension functions. Terminate with zeros.
|
||||
static struct { const char* name; naCFunction func; } funcs[] = {
|
||||
{ "getprop", f_getprop },
|
||||
|
@ -717,6 +803,7 @@ static struct { const char* name; naCFunction func; } funcs[] = {
|
|||
{ "geodtocart", f_geodtocart },
|
||||
{ "geodinfo", f_geodinfo },
|
||||
{ "airportinfo", f_airportinfo },
|
||||
{ "navinfo", f_navinfo },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -880,8 +967,13 @@ void FGNasalSys::loadPropertyScripts(SGPropertyNode* n)
|
|||
if (!p.isAbsolute() || !p.exists())
|
||||
{
|
||||
p = globals->resolve_maybe_aircraft_path(file);
|
||||
if (p.isNull())
|
||||
{
|
||||
SG_LOG(SG_NASAL, SG_ALERT, "Cannot find Nasal script '" <<
|
||||
file << "' for module '" << module << "'.");
|
||||
}
|
||||
}
|
||||
ok &= loadModule(p, module);
|
||||
ok &= p.isNull() ? false : loadModule(p, module);
|
||||
j++;
|
||||
}
|
||||
|
||||
|
@ -1134,7 +1226,7 @@ naRef FGNasalSys::setListener(naContext c, int argc, naRef* args)
|
|||
FGNasalListener *nl = new FGNasalListener(node, code, this,
|
||||
gcSave(code), _listenerId, init, type);
|
||||
|
||||
node->addChangeListener(nl, init);
|
||||
node->addChangeListener(nl, init != 0);
|
||||
|
||||
_listener[_listenerId] = nl;
|
||||
return naNum(_listenerId++);
|
||||
|
|
|
@ -8,5 +8,14 @@ set(SOURCES
|
|||
voice.cxx
|
||||
voiceplayer.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Sound "${SOURCES}")
|
||||
|
||||
set(HEADERS
|
||||
beacon.hxx
|
||||
fg_fx.hxx
|
||||
morse.hxx
|
||||
sample_queue.hxx
|
||||
voice.hxx
|
||||
voiceplayer.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Sound "${SOURCES}" "${HEADERS}")
|
|
@ -7,5 +7,14 @@ set(SOURCES
|
|||
system_mgr.cxx
|
||||
vacuum.cxx
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
electrical.hxx
|
||||
pitot.hxx
|
||||
static.hxx
|
||||
system_mgr.hxx
|
||||
vacuum.hxx
|
||||
)
|
||||
|
||||
|
||||
flightgear_component(Systems "${SOURCES}")
|
||||
flightgear_component(Systems "${SOURCES}" "${HEADERS}")
|
|
@ -6,4 +6,10 @@ set(SOURCES
|
|||
sunsolver.cxx
|
||||
)
|
||||
|
||||
flightgear_component(Time "${SOURCES}")
|
||||
set(HEADERS
|
||||
TimeManager.hxx
|
||||
light.hxx
|
||||
sunsolver.hxx
|
||||
)
|
||||
|
||||
flightgear_component(Time "${SOURCES}" "${HEADERS}")
|
|
@ -227,7 +227,7 @@ bool FGAISchedule::update(time_t now, const SGVec3d& userCart)
|
|||
// Check if this aircraft has been released.
|
||||
FGTrafficManager *tmgr = (FGTrafficManager *) globals->get_subsystem("Traffic Manager");
|
||||
if (tmgr->isReleased(AIManagerRef)) {
|
||||
AIManagerRef = NULL;
|
||||
AIManagerRef = 0;
|
||||
} else {
|
||||
return true; // in visual range, let the AIManager handle it
|
||||
}
|
||||
|
|
|
@ -2,24 +2,30 @@
|
|||
find_package(PNG REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(GLUT REQUIRED)
|
||||
if(GLUT_FOUND)
|
||||
message(STATUS "found glut")
|
||||
|
||||
add_executable(fgpanel main.cxx
|
||||
FGGLApplication.cxx
|
||||
FGPanelApplication.cxx
|
||||
FGPNGTextureLoader.cxx
|
||||
FGRGBTextureLoader.cxx
|
||||
FGPanelProtocol.cxx
|
||||
FGFontCache.cxx
|
||||
panel.cxx
|
||||
panel_io.cxx)
|
||||
add_executable(fgpanel main.cxx
|
||||
FGGLApplication.cxx
|
||||
FGPanelApplication.cxx
|
||||
FGPNGTextureLoader.cxx
|
||||
FGRGBTextureLoader.cxx
|
||||
FGPanelProtocol.cxx
|
||||
FGFontCache.cxx
|
||||
panel.cxx
|
||||
panel_io.cxx)
|
||||
|
||||
target_link_libraries(fgpanel
|
||||
${PNG_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
${SIMGEAR_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${PLIB_LIBRARIES}
|
||||
)
|
||||
target_link_libraries(fgpanel
|
||||
-lrt
|
||||
${PNG_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
${SIMGEAR_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${PLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS fgpanel RUNTIME DESTINATION bin)
|
||||
install(TARGETS fgpanel RUNTIME DESTINATION bin)
|
||||
else()
|
||||
message(STATUS "glut NOT found, can't build fgpanel")
|
||||
endif()
|
||||
|
|
|
@ -90,29 +90,31 @@ main(int argc, char** argv)
|
|||
fog->setDensity(1e-6);
|
||||
camera->getOrCreateStateSet()->setAttribute(fog);
|
||||
|
||||
const char *fg_root_env = std::getenv("FG_ROOT");
|
||||
std::string fg_root;
|
||||
if (fg_root_env)
|
||||
if (arguments.read("--fg-root", fg_root)) {
|
||||
} else if (const char *fg_root_env = std::getenv("FG_ROOT")) {
|
||||
fg_root = fg_root_env;
|
||||
else
|
||||
} else {
|
||||
#if defined(PKGDATADIR)
|
||||
fg_root = PKGDATADIR;
|
||||
#else
|
||||
fg_root = ".";
|
||||
#endif
|
||||
}
|
||||
|
||||
osgDB::FilePathList filePathList;
|
||||
filePathList.push_back(fg_root);
|
||||
|
||||
const char *fg_scenery_env = std::getenv("FG_SCENERY");
|
||||
std::string fg_scenery;
|
||||
string_list path_list;
|
||||
if (fg_scenery_env) {
|
||||
if (arguments.read("--fg-scenery", fg_scenery)) {
|
||||
path_list.push_back(fg_scenery);
|
||||
} else if (const char *fg_scenery_env = std::getenv("FG_SCENERY")) {
|
||||
path_list = sgPathSplit(fg_scenery_env);
|
||||
} else {
|
||||
SGPath path(fg_root);
|
||||
path.append("Scenery");
|
||||
path_list.push_back(path.str());
|
||||
}
|
||||
osgDB::FilePathList filePathList;
|
||||
filePathList.push_back(fg_root);
|
||||
for (unsigned i = 0; i < path_list.size(); ++i) {
|
||||
SGPath pt(path_list[i]), po(path_list[i]);
|
||||
pt.append("Terrain");
|
||||
|
@ -153,6 +155,10 @@ main(int argc, char** argv)
|
|||
btgOptions->getDatabasePathList() = filePathList;
|
||||
btgOptions->setMatlib(ml);
|
||||
|
||||
// Here, all arguments are processed
|
||||
arguments.reportRemainingOptionsAsUnrecognized();
|
||||
arguments.writeErrorMessages(std::cerr);
|
||||
|
||||
// read the scene from the list of file specified command line args.
|
||||
osg::ref_ptr<osg::Node> loadedModel;
|
||||
loadedModel = osgDB::readNodeFiles(arguments, btgOptions);
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
2.3.0
|
||||
2.5.0
|
||||
|
|
Loading…
Reference in a new issue