1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Added option to start Flightgear 1.9.1 simulator as a stand alone application, optionally from a networked computer. Also enabled joystick input to control flightgear for complete manual control and debugging purposes. Joystick needs to be connected and armed in the GUI. Tested on WinXP. UDP receive needs more testing on linux.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2177 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
scott 2010-11-29 17:05:53 +00:00 committed by scott
parent bf8b9fd00c
commit a4ba7fcbee
9 changed files with 505 additions and 292 deletions

View File

@ -55,6 +55,8 @@ const float FGSimulator::FPS2CMPS = 30.48;
FGSimulator::FGSimulator(const SimulatorSettings& params) :
Simulator(params)
{
udpCounterFGrecv = 0;
udpCounterGCSsend = 0;
}
FGSimulator::~FGSimulator()
@ -64,7 +66,10 @@ FGSimulator::~FGSimulator()
void FGSimulator::setupUdpPorts(const QString& host, int inPort, int outPort)
{
inSocket->bind(QHostAddress(host), inPort);
if(inSocket->bind(QHostAddress(host), inPort))
emit processOutput("Successfully bound to address " + host + " on port " + QString::number(inPort) + "\n");
else
emit processOutput("Cannot bind to address " + host + " on port " + QString::number(inPort) + "\n");
}
bool FGSimulator::setupProcess()
@ -114,15 +119,28 @@ bool FGSimulator::setupProcess()
"--in-air " +
"--altitude=3000 " +
"--vc=100 " +
"--generic=socket,out,50,localhost," + QString::number(settings.inPort) + ",udp,opfgprotocol");
"--log-level=alert" +
"--generic=socket,out,20," + settings.hostAddress + "," + QString::number(settings.inPort) + ",udp,opfgprotocol");
if(!settings.manual)
{
args.append(" --generic=socket,in,400,localhost," + QString::number(settings.outPort) + ",udp,opfgprotocol");
args.append(" --generic=socket,in,400," + settings.remoteHostAddress + "," + QString::number(settings.outPort) + ",udp,opfgprotocol");
}
// Start FlightGear
QString cmd("\"" + settings.binPath + "\" " + args + "\n");
simProcess->write(cmd.toAscii());
// Start FlightGear - only if checkbox is selected in HITL options page
if (settings.startSim)
{
QString cmd("\"" + settings.binPath + "\" " + args + "\n");
simProcess->write(cmd.toAscii());
}
else
{
emit processOutput("Start Flightgear from the command line with the following arguments: \n\n" + args + "\n\n" +
"You can optionally run Flightgear from a networked computer.\n" +
"Make sure the computer running Flightgear can can ping your local interface adapter. ie." + settings.hostAddress + "\n"
"Remote computer must have the correct OpenPilot protocol installed.");
}
udpCounterGCSsend = 0;
return true;
}
@ -139,21 +157,78 @@ void FGSimulator::processReadyRead()
void FGSimulator::transmitUpdate()
{
// Read ActuatorDesired from autopilot
ActuatorDesired::DataFields actData = actDesired->getData();
float ailerons = actData.Roll;
float elevator = -actData.Pitch;
float rudder = actData.Yaw;
float throttle = actData.Throttle;
ActuatorDesired::DataFields actData;
ManualControlCommand::DataFields manCtrlData = manCtrlCommand->getData();
float ailerons = -1;
float elevator = -1;
float rudder = -1;
float throttle = -1;
if(manCtrlData.FlightMode == ManualControlCommand::FLIGHTMODE_MANUAL)
{
// Read joystick input
if(manCtrlData.Armed == ManualControlCommand::ARMED_TRUE)
{
ailerons = manCtrlData.Roll;
elevator = -manCtrlData.Pitch;
rudder = manCtrlData.Yaw;
throttle = manCtrlData.Throttle;
}
}
else
{
// Read ActuatorDesired from autopilot
actData = actDesired->getData();
ailerons = actData.Roll;
elevator = -actData.Pitch;
rudder = actData.Yaw;
throttle = actData.Throttle;
}
int allowableDifference = 10;
if(udpCounterFGrecv == udpCounterGCSsend)
udpCounterGCSsend = 0;
if(udpCounterGCSsend < allowableDifference ) //FG udp queue is not delayed
{
udpCounterGCSsend++;
// Send update to FlightGear
QString cmd;
cmd = QString("%1,%2,%3,%4\n")
.arg(ailerons)
.arg(elevator)
.arg(rudder)
.arg(throttle);
cmd = QString("%1,%2,%3,%4,%5\n")
.arg(ailerons) //ailerons
.arg(elevator) //elevator
.arg(rudder) //rudder
.arg(throttle) //throttle
.arg(udpCounterGCSsend); //UDP packet counter delay
QByteArray data = cmd.toAscii();
outSocket->writeDatagram(data, QHostAddress(settings.hostAddress), settings.outPort);
if(outSocket->writeDatagram(data, QHostAddress(settings.remoteHostAddress), settings.outPort) == -1)
{
emit processOutput("Error sending UDP packet to FG: " + outSocket->errorString() + "\n");
}
}
else
{
// don't send new packet. Flightgear cannot process UDP fast enough.
// V1.9.1 reads udp packets at set frequency and will get delayed if packets are sent too fast
// V2.0 does not currently work with --generic-protocol
}
if(!settings.manual)
{
actData.Roll = ailerons;
actData.Pitch = elevator;
actData.Yaw = rudder;
actData.Throttle = throttle;
//actData.NumLongUpdates = (float)udpCounterFGrecv;
//actData.UpdateTime = (float)udpCounterGCSsend;
actDesired->setData(actData);
}
}
@ -212,6 +287,10 @@ void FGSimulator::processUpdate(const QByteArray& inp)
// Get VelocityActual Down (cm/s)
float velocityActualNorth = fields[23].toFloat() * FPS2CMPS;
// Get UDP packets received by FG
int n = fields[24].toInt();
udpCounterFGrecv = n;
//run once
HomeLocation::DataFields homeData = posHome->getData();
if(!once)

View File

@ -52,6 +52,9 @@ private:
static const float INHG2KPA;
static const float FPS2CMPS;
int udpCounterGCSsend; //keeps track of udp packets sent to FG
int udpCounterFGrecv; //keeps track of udp packets received by FG
void processUpdate(const QByteArray& data);
};

View File

@ -35,6 +35,7 @@ HITLConfiguration::HITLConfiguration(QString classId, QSettings* qSettings, QObj
settings.dataPath = "";
settings.manual = false;
settings.hostAddress = "127.0.0.1";
settings.remoteHostAddress = "127.0.0.1";
settings.outPort = 0;
settings.inPort = 0;
settings.latitude = "";
@ -47,6 +48,7 @@ HITLConfiguration::HITLConfiguration(QString classId, QSettings* qSettings, QObj
settings.dataPath = qSettings->value("dataPath").toString();
settings.manual = qSettings->value("manual").toBool();
settings.hostAddress = qSettings->value("hostAddress").toString();
settings.remoteHostAddress = qSettings->value("remoteHostAddress").toString();
settings.outPort = qSettings->value("outPort").toInt();
settings.inPort = qSettings->value("inPort").toInt();
settings.latitude = qSettings->value("latitude").toString();
@ -72,6 +74,7 @@ void HITLConfiguration::saveConfig(QSettings* qSettings) const {
qSettings->setValue("dataPath", settings.dataPath);
qSettings->setValue("manual", settings.manual);
qSettings->setValue("hostAddress", settings.hostAddress);
qSettings->setValue("remoteHostAddress", settings.remoteHostAddress);
qSettings->setValue("outPort", settings.outPort);
qSettings->setValue("inPort", settings.inPort);
qSettings->setValue("latitude", settings.latitude);

View File

@ -77,8 +77,10 @@ QWidget *HITLOptionsPage::createPage(QWidget *parent)
m_optionsPage->executablePath->setPath(config->Settings().binPath);
m_optionsPage->dataPath->setPath(config->Settings().dataPath);
m_optionsPage->manualControl->setChecked(config->Settings().manual);
m_optionsPage->startSim->setChecked(config->Settings().startSim);
m_optionsPage->hostAddress->setText(config->Settings().hostAddress);
m_optionsPage->hostAddress->setText(config->Settings().hostAddress);
m_optionsPage->remoteHostAddress->setText(config->Settings().remoteHostAddress);
m_optionsPage->outputPort->setText(QString::number(config->Settings().outPort));
m_optionsPage->inputPort->setText(QString::number(config->Settings().inPort));
m_optionsPage->latitude->setText(config->Settings().latitude);
@ -96,7 +98,9 @@ void HITLOptionsPage::apply()
settings.binPath = m_optionsPage->executablePath->path();
settings.dataPath = m_optionsPage->dataPath->path();
settings.manual = m_optionsPage->manualControl->isChecked();
settings.startSim = m_optionsPage->startSim->isChecked();
settings.hostAddress = m_optionsPage->hostAddress->text();
settings.remoteHostAddress = m_optionsPage->remoteHostAddress->text();
settings.inPort = m_optionsPage->inputPort->text().toInt();
settings.outPort = m_optionsPage->outputPort->text().toInt();

View File

@ -1,173 +1,230 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>HITLOptionsPage</class>
<widget class="QWidget" name="HITLOptionsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>320</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="1" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Choose flight simulator:</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="3">
<widget class="QComboBox" name="chooseFlightSimulator"/>
</item>
<item row="2" column="1" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Latitude in degrees:</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLineEdit" name="latitude"/>
</item>
<item row="5" column="3">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Longitude in degrees:</string>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QLineEdit" name="longitude"/>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Path executable:</string>
</property>
</widget>
</item>
<item row="6" column="2" colspan="3">
<widget class="Utils::PathChooser" name="executablePath" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Data directory:</string>
</property>
</widget>
</item>
<item row="7" column="2" colspan="3">
<widget class="Utils::PathChooser" name="dataPath" native="true"/>
</item>
<item row="8" column="1" colspan="4">
<widget class="QCheckBox" name="manualControl">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Manual aircraft control (can be used when hardware is not available)</string>
</property>
<property name="text">
<string>Manual aircraft control (can be used when hardware is not available)</string>
</property>
</widget>
</item>
<item row="11" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>182</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Host Address:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="hostAddress"/>
</item>
<item row="4" column="4">
<widget class="QLineEdit" name="outputPort"/>
</item>
<item row="4" column="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Output Port:</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="inputPort"/>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Input Port:</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header>utils/pathchooser.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>HITLOptionsPage</class>
<widget class="QWidget" name="HITLOptionsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>577</width>
<height>367</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="1" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Choose flight simulator:</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="3">
<widget class="QComboBox" name="chooseFlightSimulator"/>
</item>
<item row="2" column="1" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="12" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>182</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Local interface address (IP):</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="QLineEdit" name="hostAddress">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>For communication with sim computer via network. Should be IP address of one of the local interfaces. </string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Latitude in degrees:</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Longitude in degrees:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Data directory:</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLineEdit" name="inputPort">
<property name="toolTip">
<string>For receiving data from sim</string>
</property>
</widget>
</item>
<item row="7" column="2" colspan="3">
<widget class="Utils::PathChooser" name="executablePath" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Output Port:</string>
</property>
</widget>
</item>
<item row="8" column="2" colspan="3">
<widget class="Utils::PathChooser" name="dataPath" native="true"/>
</item>
<item row="6" column="4">
<widget class="QLineEdit" name="longitude"/>
</item>
<item row="5" column="4">
<widget class="QLineEdit" name="outputPort">
<property name="toolTip">
<string>For sending data to sim</string>
</property>
</widget>
</item>
<item row="9" column="1" colspan="4">
<widget class="QCheckBox" name="manualControl">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Manual aircraft control (can be used when hardware is not available)</string>
</property>
<property name="text">
<string>Manual aircraft control (can be used when hardware is not available)</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Path executable:</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLineEdit" name="latitude"/>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Input Port:</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QCheckBox" name="startSim">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Check this box to start the simulator on the local computer</string>
</property>
<property name="text">
<string>Start simulator on local machine</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Remote interface address (IP):</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="remoteHostAddress">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Only required if running simulator on remote machine </string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header>utils/pathchooser.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -34,6 +34,13 @@
<format>%f</format>
</chunk>
<chunk>
<name>udpRecvByFGcount</name>
<node>/OP/udp-counter</node>
<type>int</type>
<format>%d</format>
</chunk>
</input>
<output>
@ -209,6 +216,13 @@
<format>%f</format>
</chunk>
<chunk>
<name>udpRecvByFGcount</name>
<node>/OP/udp-counter</node>
<type>int</type>
<format>%d</format>
</chunk>
</output>
</generic>

View File

@ -40,8 +40,8 @@ Simulator::Simulator(const SimulatorSettings& params) :
inSocket(NULL),
outSocket(NULL),
settings(params),
updatePeriod(50),
simTimeout(2000),
updatePeriod(50),
simTimeout(2000),
autopilotConnectionStatus(false),
simConnectionStatus(false),
txTimer(NULL),
@ -50,7 +50,7 @@ Simulator::Simulator(const SimulatorSettings& params) :
{
// move to thread
moveToThread(Core::ICore::instance()->threadManager()->getRealTimeThread());
connect(this, SIGNAL(myStart()), this, SLOT(onStart()),Qt::QueuedConnection);
connect(this, SIGNAL(myStart()), this, SLOT(onStart()),Qt::QueuedConnection);
emit myStart();
}
@ -116,6 +116,7 @@ void Simulator::onStart()
ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance();
UAVObjectManager* objManager = pm->getObject<UAVObjectManager>();
actDesired = ActuatorDesired::GetInstance(objManager);
manCtrlCommand = ManualControlCommand::GetInstance(objManager);
posHome = HomeLocation::GetInstance(objManager);
velActual = VelocityActual::GetInstance(objManager);
posActual = PositionActual::GetInstance(objManager);
@ -140,19 +141,21 @@ void Simulator::onStart()
outSocket = new QUdpSocket();
setupUdpPorts(settings.hostAddress,settings.inPort,settings.outPort);
emit processOutput("\nHost: " + settings.hostAddress + "\n" + \
"inputPort: " + QString::number(settings.inPort) + "\n" + \
"outpurPort: " + QString::number(settings.outPort) + "\n");
emit processOutput("\nLocal interface: " + settings.hostAddress + "\n" + \
"Remote interface: " + settings.remoteHostAddress + "\n" + \
"inputPort: " + QString::number(settings.inPort) + "\n" + \
"outputPort: " + QString::number(settings.outPort) + "\n");
qxtLog->info("\nHost: " + settings.hostAddress + "\n" + \
"inputPort: " + QString::number(settings.inPort) + "\n" + \
"outpurPort: " + QString::number(settings.outPort) + "\n");
qxtLog->info("\nLocal interface: " + settings.hostAddress + "\n" + \
"Remote interface: " + settings.remoteHostAddress + "\n" + \
"inputPort: " + QString::number(settings.inPort) + "\n" + \
"outputPort: " + QString::number(settings.outPort) + "\n");
// if(!inSocket->waitForConnected(5000))
// processOutput(QString("Can't connect to %1 on %2 port!").arg(settings.hostAddress).arg(settings.inPort));
//outSocket->connectToHost(settings.hostAddress,settings.outPort); // FG
//if(!outSocket->waitForConnected(5000))
// processOutput(QString("Can't connect to %1 on %2 port!").arg(settings.hostAddress).arg(settings.outPort));
// if(!inSocket->waitForConnected(5000))
// emit processOutput(QString("Can't connect to %1 on %2 port!").arg(settings.hostAddress).arg(settings.inPort));
// outSocket->connectToHost(settings.hostAddress,settings.outPort); // FG
// if(!outSocket->waitForConnected(5000))
// emit processOutput(QString("Can't connect to %1 on %2 port!").arg(settings.hostAddress).arg(settings.outPort));
connect(inSocket, SIGNAL(readyRead()), this, SLOT(receiveUpdate()),Qt::DirectConnection);
@ -173,6 +176,7 @@ void Simulator::onStart()
time->start();
current.T=0;
current.i=0;
}
void Simulator::receiveUpdate()

View File

@ -36,6 +36,7 @@
#include "uavtalk/telemetrymanager.h"
#include "uavobjects/uavobjectmanager.h"
#include "uavobjects/actuatordesired.h"
#include "uavobjects/manualcontrolcommand.h"
// #include "uavobjects/altitudeactual.h"
#include "uavobjects/positionactual.h"
#include "uavobjects/velocityactual.h"
@ -96,9 +97,11 @@ typedef struct _CONNECTION
QString binPath;
QString dataPath;
QString hostAddress;
QString remoteHostAddress;
int outPort;
int inPort;
bool manual;
bool startSim;
QString latitude;
QString longitude;
} SimulatorSettings;
@ -159,6 +162,7 @@ protected:
QUdpSocket* outSocket;
ActuatorDesired* actDesired;
ManualControlCommand* manCtrlCommand;
BaroAltitude* altActual;
AttitudeActual* attActual;
VelocityActual* velActual;

View File

@ -1,8 +1,8 @@
/********************************************************************************
** Form generated from reading UI file 'hitloptionspage.ui'
**
** Created: Wed 25. Aug 11:43:47 2010
** by: Qt User Interface Compiler version 4.6.2
** Created: Wed Nov 24 20:23:33 2010
** by: Qt User Interface Compiler version 4.7.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@ -34,28 +34,31 @@ public:
QLabel *label_3;
QComboBox *chooseFlightSimulator;
QFrame *line;
QLabel *label_7;
QLineEdit *latitude;
QLabel *label_8;
QLineEdit *longitude;
QLabel *label;
Utils::PathChooser *executablePath;
QLabel *label_2;
Utils::PathChooser *dataPath;
QCheckBox *manualControl;
QSpacerItem *verticalSpacer;
QLabel *label_6;
QLineEdit *hostAddress;
QLineEdit *outputPort;
QLabel *label_4;
QLabel *label_7;
QLabel *label_8;
QLabel *label_2;
QLineEdit *inputPort;
Utils::PathChooser *executablePath;
QLabel *label_4;
Utils::PathChooser *dataPath;
QLineEdit *longitude;
QLineEdit *outputPort;
QCheckBox *manualControl;
QLabel *label;
QLineEdit *latitude;
QLabel *label_5;
QCheckBox *startSim;
QLabel *label_9;
QLineEdit *remoteHostAddress;
void setupUi(QWidget *HITLOptionsPage)
{
if (HITLOptionsPage->objectName().isEmpty())
HITLOptionsPage->setObjectName(QString::fromUtf8("HITLOptionsPage"));
HITLOptionsPage->resize(400, 320);
HITLOptionsPage->resize(577, 367);
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
@ -81,68 +84,9 @@ public:
gridLayout->addWidget(line, 2, 1, 1, 4);
label_7 = new QLabel(HITLOptionsPage);
label_7->setObjectName(QString::fromUtf8("label_7"));
gridLayout->addWidget(label_7, 5, 1, 1, 1);
latitude = new QLineEdit(HITLOptionsPage);
latitude->setObjectName(QString::fromUtf8("latitude"));
gridLayout->addWidget(latitude, 5, 2, 1, 1);
label_8 = new QLabel(HITLOptionsPage);
label_8->setObjectName(QString::fromUtf8("label_8"));
gridLayout->addWidget(label_8, 5, 3, 1, 1);
longitude = new QLineEdit(HITLOptionsPage);
longitude->setObjectName(QString::fromUtf8("longitude"));
gridLayout->addWidget(longitude, 5, 4, 1, 1);
label = new QLabel(HITLOptionsPage);
label->setObjectName(QString::fromUtf8("label"));
QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy1);
gridLayout->addWidget(label, 6, 1, 1, 1);
executablePath = new Utils::PathChooser(HITLOptionsPage);
executablePath->setObjectName(QString::fromUtf8("executablePath"));
QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy2.setHorizontalStretch(1);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(executablePath->sizePolicy().hasHeightForWidth());
executablePath->setSizePolicy(sizePolicy2);
gridLayout->addWidget(executablePath, 6, 2, 1, 3);
label_2 = new QLabel(HITLOptionsPage);
label_2->setObjectName(QString::fromUtf8("label_2"));
sizePolicy1.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
label_2->setSizePolicy(sizePolicy1);
gridLayout->addWidget(label_2, 7, 1, 1, 1);
dataPath = new Utils::PathChooser(HITLOptionsPage);
dataPath->setObjectName(QString::fromUtf8("dataPath"));
gridLayout->addWidget(dataPath, 7, 2, 1, 3);
manualControl = new QCheckBox(HITLOptionsPage);
manualControl->setObjectName(QString::fromUtf8("manualControl"));
sizePolicy1.setHeightForWidth(manualControl->sizePolicy().hasHeightForWidth());
manualControl->setSizePolicy(sizePolicy1);
gridLayout->addWidget(manualControl, 8, 1, 1, 4);
verticalSpacer = new QSpacerItem(20, 182, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(verticalSpacer, 11, 2, 1, 1);
gridLayout->addItem(verticalSpacer, 12, 2, 1, 1);
label_6 = new QLabel(HITLOptionsPage);
label_6->setObjectName(QString::fromUtf8("label_6"));
@ -151,28 +95,112 @@ public:
hostAddress = new QLineEdit(HITLOptionsPage);
hostAddress->setObjectName(QString::fromUtf8("hostAddress"));
QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(hostAddress->sizePolicy().hasHeightForWidth());
hostAddress->setSizePolicy(sizePolicy1);
gridLayout->addWidget(hostAddress, 3, 2, 1, 1);
gridLayout->addWidget(hostAddress, 3, 2, 1, 2);
outputPort = new QLineEdit(HITLOptionsPage);
outputPort->setObjectName(QString::fromUtf8("outputPort"));
label_7 = new QLabel(HITLOptionsPage);
label_7->setObjectName(QString::fromUtf8("label_7"));
gridLayout->addWidget(outputPort, 4, 4, 1, 1);
gridLayout->addWidget(label_7, 6, 1, 1, 1);
label_4 = new QLabel(HITLOptionsPage);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_8 = new QLabel(HITLOptionsPage);
label_8->setObjectName(QString::fromUtf8("label_8"));
gridLayout->addWidget(label_4, 4, 3, 1, 1);
gridLayout->addWidget(label_8, 6, 3, 1, 1);
label_2 = new QLabel(HITLOptionsPage);
label_2->setObjectName(QString::fromUtf8("label_2"));
QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
label_2->setSizePolicy(sizePolicy2);
gridLayout->addWidget(label_2, 8, 1, 1, 1);
inputPort = new QLineEdit(HITLOptionsPage);
inputPort->setObjectName(QString::fromUtf8("inputPort"));
gridLayout->addWidget(inputPort, 4, 2, 1, 1);
gridLayout->addWidget(inputPort, 5, 2, 1, 1);
executablePath = new Utils::PathChooser(HITLOptionsPage);
executablePath->setObjectName(QString::fromUtf8("executablePath"));
QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy3.setHorizontalStretch(1);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(executablePath->sizePolicy().hasHeightForWidth());
executablePath->setSizePolicy(sizePolicy3);
gridLayout->addWidget(executablePath, 7, 2, 1, 3);
label_4 = new QLabel(HITLOptionsPage);
label_4->setObjectName(QString::fromUtf8("label_4"));
gridLayout->addWidget(label_4, 5, 3, 1, 1);
dataPath = new Utils::PathChooser(HITLOptionsPage);
dataPath->setObjectName(QString::fromUtf8("dataPath"));
gridLayout->addWidget(dataPath, 8, 2, 1, 3);
longitude = new QLineEdit(HITLOptionsPage);
longitude->setObjectName(QString::fromUtf8("longitude"));
gridLayout->addWidget(longitude, 6, 4, 1, 1);
outputPort = new QLineEdit(HITLOptionsPage);
outputPort->setObjectName(QString::fromUtf8("outputPort"));
gridLayout->addWidget(outputPort, 5, 4, 1, 1);
manualControl = new QCheckBox(HITLOptionsPage);
manualControl->setObjectName(QString::fromUtf8("manualControl"));
sizePolicy2.setHeightForWidth(manualControl->sizePolicy().hasHeightForWidth());
manualControl->setSizePolicy(sizePolicy2);
gridLayout->addWidget(manualControl, 9, 1, 1, 4);
label = new QLabel(HITLOptionsPage);
label->setObjectName(QString::fromUtf8("label"));
sizePolicy2.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy2);
gridLayout->addWidget(label, 7, 1, 1, 1);
latitude = new QLineEdit(HITLOptionsPage);
latitude->setObjectName(QString::fromUtf8("latitude"));
gridLayout->addWidget(latitude, 6, 2, 1, 1);
label_5 = new QLabel(HITLOptionsPage);
label_5->setObjectName(QString::fromUtf8("label_5"));
gridLayout->addWidget(label_5, 4, 1, 1, 1);
gridLayout->addWidget(label_5, 5, 1, 1, 1);
startSim = new QCheckBox(HITLOptionsPage);
startSim->setObjectName(QString::fromUtf8("startSim"));
startSim->setEnabled(true);
sizePolicy2.setHeightForWidth(startSim->sizePolicy().hasHeightForWidth());
startSim->setSizePolicy(sizePolicy2);
gridLayout->addWidget(startSim, 10, 1, 1, 1);
label_9 = new QLabel(HITLOptionsPage);
label_9->setObjectName(QString::fromUtf8("label_9"));
gridLayout->addWidget(label_9, 4, 1, 1, 1);
remoteHostAddress = new QLineEdit(HITLOptionsPage);
remoteHostAddress->setObjectName(QString::fromUtf8("remoteHostAddress"));
sizePolicy1.setHeightForWidth(remoteHostAddress->sizePolicy().hasHeightForWidth());
remoteHostAddress->setSizePolicy(sizePolicy1);
gridLayout->addWidget(remoteHostAddress, 4, 2, 1, 1);
retranslateUi(HITLOptionsPage);
@ -184,17 +212,34 @@ public:
{
HITLOptionsPage->setWindowTitle(QApplication::translate("HITLOptionsPage", "Form", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("HITLOptionsPage", "Choose flight simulator:", 0, QApplication::UnicodeUTF8));
label_6->setText(QApplication::translate("HITLOptionsPage", "Local interface address (IP):", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
hostAddress->setToolTip(QApplication::translate("HITLOptionsPage", "For communication with sim computer via network. Should be IP address of one of the local interfaces. ", 0, QApplication::UnicodeUTF8));
#endif // QT_NO_TOOLTIP
label_7->setText(QApplication::translate("HITLOptionsPage", "Latitude in degrees:", 0, QApplication::UnicodeUTF8));
label_8->setText(QApplication::translate("HITLOptionsPage", "Longitude in degrees:", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("HITLOptionsPage", "Path executable:", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("HITLOptionsPage", "Data directory:", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
inputPort->setToolTip(QApplication::translate("HITLOptionsPage", "For receiving data from sim", 0, QApplication::UnicodeUTF8));
#endif // QT_NO_TOOLTIP
label_4->setText(QApplication::translate("HITLOptionsPage", "Output Port:", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
outputPort->setToolTip(QApplication::translate("HITLOptionsPage", "For sending data to sim", 0, QApplication::UnicodeUTF8));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_TOOLTIP
manualControl->setToolTip(QApplication::translate("HITLOptionsPage", "Manual aircraft control (can be used when hardware is not available)", 0, QApplication::UnicodeUTF8));
#endif // QT_NO_TOOLTIP
manualControl->setText(QApplication::translate("HITLOptionsPage", "Manual aircraft control (can be used when hardware is not available)", 0, QApplication::UnicodeUTF8));
label_6->setText(QApplication::translate("HITLOptionsPage", "Host Address:", 0, QApplication::UnicodeUTF8));
label_4->setText(QApplication::translate("HITLOptionsPage", "Output Port:", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("HITLOptionsPage", "Path executable:", 0, QApplication::UnicodeUTF8));
label_5->setText(QApplication::translate("HITLOptionsPage", "Input Port:", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
startSim->setToolTip(QApplication::translate("HITLOptionsPage", "Check this box to start the simulator on the local computer", 0, QApplication::UnicodeUTF8));
#endif // QT_NO_TOOLTIP
startSim->setText(QApplication::translate("HITLOptionsPage", "Start simulator on local machine", 0, QApplication::UnicodeUTF8));
label_9->setText(QApplication::translate("HITLOptionsPage", "Remote interface address (IP):", 0, QApplication::UnicodeUTF8));
#ifndef QT_NO_TOOLTIP
remoteHostAddress->setToolTip(QApplication::translate("HITLOptionsPage", "Only required if running simulator on remote machine ", 0, QApplication::UnicodeUTF8));
#endif // QT_NO_TOOLTIP
} // retranslateUi
};