2 ******************************************************************************
4 * @file xplanesimulator10.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
7 * @see The GNU Public License (GPL) Version 3
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef XPLANESIMULATOR10_H
29 #define XPLANESIMULATOR10_H
32 #include <QDataStream>
33 #include <simulator.h>
35 class XplaneSimulator10
: public Simulator
{
38 XplaneSimulator10(const SimulatorSettings
& params
);
42 void setupUdpPorts(const QString
& host
, int inPort
, int outPort
);
45 void transmitUpdate();
48 enum XplaneOutputData
// ***WARNING***: Elements in this enum are in a precise order, do
49 { // not change. Cf. http://www.nuclearprojects.com/xplane/info.shtml (outdated version 9 info)
50 // These fields have been updated for X-Plane version 10.x
56 /* 5 */ AtmosphereWeather
,
57 /* 6 */ AtmosphereAircraft
,
58 /* 7 */ SystemPressures
,
66 /* 15 */ AngularMoments
,
67 /* 16 */ AngularVelocities
,
68 /* 17 */ PitchRollHeading
,
71 /* 20 */ LatitudeLongitude
,
72 /* 21 */ LocVelDistTraveled
,
73 /* 22 */ AllPlanesLat
,
74 /* 23 */ AllPlanesLon
,
75 /* 24 */ AllPlanesAlt
,
76 /* 25 */ ThrottleCommand
80 void processUpdate(const QByteArray
& data
);
83 class XplaneSimulatorCreator10
: public SimulatorCreator
{
85 XplaneSimulatorCreator10(const QString
& classId
, const QString
& description
)
86 : SimulatorCreator(classId
, description
)
89 Simulator
*createSimulator(const SimulatorSettings
& params
)
91 return new XplaneSimulator10(params
);
95 #endif // XPLANESIMULATOR10_H