From b5fe38c1eb7d828320557dfc08499daa3bd005e3 Mon Sep 17 00:00:00 2001 From: Bertrand Coconnier Date: Sat, 10 Jun 2017 20:19:43 +0200 Subject: [PATCH] Compile AI wake numerical core in FG main executable. AI wake code is still dead code except that it is now compiled with FG. Input data for wake computations are extracted from the performance database. The data must be specified as follows (values are for illustration only) : 100. 12. 90000. --- src/AIModel/performancedata.cxx | 3 +++ src/AIModel/performancedata.hxx | 8 ++++++++ src/FDM/AIWake/AircraftMesh.cxx | 2 +- src/FDM/CMakeLists.txt | 6 +++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/AIModel/performancedata.cxx b/src/AIModel/performancedata.cxx index 80d62dba6..351cf92d8 100644 --- a/src/AIModel/performancedata.cxx +++ b/src/AIModel/performancedata.cxx @@ -69,6 +69,9 @@ void PerformanceData::initFromProps(SGPropertyNode *db_node) _vApproach = db_node->getDoubleValue("approach-speed-kts", _vApproach); _vTouchdown = db_node->getDoubleValue("touchdown-speed-kts", _vTouchdown); _vTaxi = db_node->getDoubleValue("taxi-speed-kts", _vTaxi); + _wingSpan = db_node->getDoubleValue("geometry/wing/span-ft", 100.); + _wingChord = db_node->getDoubleValue("geometry/wing/chord-ft", 12.); + _weight = db_node->getDoubleValue("geometry/weight-lbs", 90000.); } double PerformanceData::actualSpeed(FGAIAircraft* ac, double tgt_speed, double dt, bool maxBrakes) { diff --git a/src/AIModel/performancedata.hxx b/src/AIModel/performancedata.hxx index a8aef6400..08e3f6e44 100644 --- a/src/AIModel/performancedata.hxx +++ b/src/AIModel/performancedata.hxx @@ -45,6 +45,9 @@ public: inline double vApproach () { return _vApproach; }; inline double vTouchdown () { return _vTouchdown; }; inline double vCruise () { return _vCruise; }; + inline double wingSpan () { return _wingSpan; }; + inline double wingChord () { return _wingChord; }; + inline double weight () { return _weight; }; double decelerationOnGround() const; private: @@ -63,6 +66,11 @@ private: double _rollrate; double _maxbank; + + // Data for aerodynamic wake computation + double _wingSpan; + double _wingChord; + double _weight; }; #endif diff --git a/src/FDM/AIWake/AircraftMesh.cxx b/src/FDM/AIWake/AircraftMesh.cxx index cfcae8013..f5338feab 100644 --- a/src/FDM/AIWake/AircraftMesh.cxx +++ b/src/FDM/AIWake/AircraftMesh.cxx @@ -31,10 +31,10 @@ #include #include "AircraftMesh.hxx" #include +#include "AIWakeGroup.hxx" #ifndef FG_TESTLIB #include "AIModel/AIAircraft.hxx" #else -#include "AIWakeGroup.hxx" #include "fakeAIAircraft.hxx" #endif extern "C" { diff --git a/src/FDM/CMakeLists.txt b/src/FDM/CMakeLists.txt index 2f1dc6a09..72a956761 100644 --- a/src/FDM/CMakeLists.txt +++ b/src/FDM/CMakeLists.txt @@ -112,7 +112,6 @@ set(LARCSIM_SOURCES ls_gravity.c ls_init.c ls_interface.c - ls_matrix.c ls_model.c ls_step.c navion_aero.c @@ -136,6 +135,11 @@ set(SOURCES ${SP_FDM_SOURCES} ExternalNet/ExternalNet.cxx ExternalPipe/ExternalPipe.cxx + AIWake/AircraftMesh.cxx + AIWake/WakeMesh.cxx + AIWake/AeroElement.cxx + AIWake/AIWakeGroup.cxx + LaRCsim/ls_matrix.c ) if(ENABLE_UIUC_MODEL)