]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/yasim-test.cpp
Port over remaining Point3D usage to the more type and unit safe SG* classes.
[flightgear.git] / src / FDM / YASim / yasim-test.cpp
index ebda62476ad5e81a5f4ba9fd34b9fff2e80df6b9..2fa6425267f2488eaaf3f5fe0926d8ee7ef36aa0 100644 (file)
@@ -1,5 +1,8 @@
 #include <stdio.h>
 
+#include <cstring>
+#include <cstdlib>
+
 #include <simgear/props/props.hxx>
 #include <simgear/xml/easyxml.hxx>
 
@@ -13,6 +16,7 @@ using namespace yasim;
 bool fgSetFloat (const char * name, float val) { return false; }
 bool fgSetBool(char const * name, bool val) { return false; }
 bool fgGetBool(char const * name, bool def) { return false; }
+bool fgSetString(char const * name, char const * str) { return false; }
 SGPropertyNode* fgGetNode (const char * path, bool create) { return 0; }
 SGPropertyNode* fgGetNode (const char * path, int i, bool create) { return 0; }
 float fgGetFloat (const char * name, float defaultValue) { return 0; }
@@ -46,7 +50,7 @@ void yasim_graph(Airplane* a, float alt, float kts)
 
     for(int deg=-179; deg<=179; deg++) {
         float aoa = deg * DEG2RAD;
-        Airplane::setupState(aoa, kts * KTS2MPS, &s);
+        Airplane::setupState(aoa, kts * KTS2MPS, 0 ,&s);
         m->getBody()->reset();
         m->initIteration();
         m->calcForces(&s);
@@ -92,8 +96,8 @@ int main(int argc, char** argv)
     if(!a->getFailureMsg() && argc > 2 && strcmp(argv[2], "-g") == 0) {
         float alt = 5000, kts = 100;
         for(int i=3; i<argc; i++) {
-            if     (strcmp(argv[i], "-a") == 0) alt = atof(argv[++i]);
-            else if(strcmp(argv[i], "-s") == 0) kts = atof(argv[++i]);
+            if     (std::strcmp(argv[i], "-a") == 0) alt = std::atof(argv[++i]);
+            else if(std::strcmp(argv[i], "-s") == 0) kts = std::atof(argv[++i]);
             else return usage();
         }
         yasim_graph(a, alt, kts);