~ubuntu-branches/ubuntu/precise/flightgear/precise

« back to all changes in this revision

Viewing changes to src/FDM/YASim/yasim-test.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ove Kaaven
  • Date: 2011-01-30 15:46:35 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110130154635-rlynmg9n5hzxq5xe
Tags: 2.0.0-3
* Recommend fgfs-aircraft-base and fgfs-models-base.
  Closes. #610276.
* Added note about scenery SharedModels.tgz to README.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#include "Atmosphere.hpp"
11
11
#include "Airplane.hpp"
12
12
 
 
13
#include <simgear/math/SGMath.hxx>
 
14
 
13
15
using namespace yasim;
14
16
 
15
17
// Stubs.  Not needed by a batch program, but required to link.
33
35
// numbers: "aoa lift drag LD" (aoa in degrees, lift and drag in
34
36
// G's).  You can use this in gnuplot like so (assuming the output is
35
37
// in a file named "dat":
36
 
//
37
 
// plot "dat" using 1:2 with lines title 'lift', \ 
38
 
//      "dat" using 1:3 with lines title 'drag', \ 
39
 
//      "dat" using 1:4 with lines title 'LD'
40
 
//
 
38
/*
 
39
 plot "dat" using 1:2 with lines title 'lift', \ 
 
40
      "dat" using 1:3 with lines title 'drag', \ 
 
41
      "dat" using 1:4 with lines title 'LD'
 
42
*/
41
43
void yasim_graph(Airplane* a, float alt, float kts)
42
44
{
43
45
    Model* m = a->getModel();
85
87
        readXML(file, *fdm);
86
88
    } catch (const sg_exception &e) {
87
89
        printf("XML parse error: %s (%s)\n",
88
 
               e.getFormattedMessage().c_str(), e.getOrigin().c_str());
 
90
               e.getFormattedMessage().c_str(), e.getOrigin());
89
91
    }
90
92
 
91
93
    // ... and run