]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/FGExternalReactions.cpp
Merge branch 'jmt/units-fix' into maint
[flightgear.git] / src / FDM / JSBSim / models / FGExternalReactions.cpp
index 6bff2bb46184e6fd05d5e6f9c1c3ef8f182221a1..a9b6ee2753b33f4c45331656e6c5ad2aad078d5a 100755 (executable)
@@ -37,8 +37,12 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGExternalReactions.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
 #include <string>
 
+using namespace std;
+
 namespace JSBSim {
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -81,6 +85,8 @@ bool FGExternalReactions::Load(Element* el)
     force_element = el->FindNextElement("force");
   }
 
+  FGModel::PostLoad(el);
+
   return true;
 }
 
@@ -111,6 +117,8 @@ bool FGExternalReactions::Run()
   if (FDMExec->Holding()) return false; // if paused don't execute
   if (NoneDefined) return true;
 
+  RunPreFunctions();
+
   vTotalForces.InitMatrix();
   vTotalMoments.InitMatrix();
 
@@ -119,6 +127,8 @@ bool FGExternalReactions::Run()
     vTotalMoments += Forces[i]->GetMoments();
   }
 
+  RunPostFunctions();
+
   return false;
 }