Commit 777147de authored by pixhawk's avatar pixhawk

expanded waypoint view

parent 8e18fc7e
......@@ -32,15 +32,17 @@ This file is part of the PIXHAWK project
#include "Waypoint.h"
Waypoint::Waypoint(quint16 id, float x, float y, float z, float yaw, bool autocontinue, bool current)
Waypoint::Waypoint(quint16 _id, float _x, float _y, float _z, float _yaw, bool _autocontinue, bool _current, float _orbit, int _holdTime)
: id(_id),
x(_x),
y(_y),
z(_z),
yaw(_yaw),
autocontinue(_autocontinue),
current(_current),
orbit(_orbit),
holdTime(_holdTime)
{
this->id = id;
this->x = x;
this->y = y;
this->z = z;
this->yaw = yaw;
this->autocontinue = autocontinue;
this->current = current;
}
Waypoint::~Waypoint()
......@@ -83,6 +85,16 @@ void Waypoint::setCurrent(bool current)
this->current = current;
}
void Waypoint::setOrbit(float orbit)
{
this->orbit = orbit;
}
void Waypoint::setHoldTime(int holdTime)
{
this->holdTime = holdTime;
}
void Waypoint::setX(double x)
{
this->x = x;
......@@ -102,3 +114,8 @@ void Waypoint::setYaw(double yaw)
{
this->yaw = yaw;
}
void Waypoint::setOrbit(double orbit)
{
this->orbit = orbit;
}
......@@ -41,7 +41,7 @@ class Waypoint : public QObject
Q_OBJECT
public:
Waypoint(quint16 id = 0, float x = 0.0f, float y = 0.0f, float z = 0.0f, float yaw = 0.0f, bool autocontinue = false, bool current = false);
Waypoint(quint16 id = 0, float x = 0.0f, float y = 0.0f, float z = 0.0f, float yaw = 0.0f, bool autocontinue = false, bool current = false, float orbit = 0.1f, int holdTime = 2000);
~Waypoint();
quint16 getId() const { return id; }
......@@ -51,6 +51,8 @@ public:
float getYaw() const { return yaw; }
bool getAutoContinue() const { return autocontinue; }
bool getCurrent() const { return current; }
float getOrbit() const { return orbit; }
float getHoldTime() const { return holdTime; }
private:
quint16 id;
......@@ -60,6 +62,8 @@ private:
float yaw;
bool autocontinue;
bool current;
float orbit;
int holdTime;
public slots:
void setId(quint16 id);
......@@ -69,12 +73,15 @@ public slots:
void setYaw(float yaw);
void setAutocontinue(bool autoContinue);
void setCurrent(bool current);
void setOrbit(float orbit);
void setHoldTime(int holdTime);
//for QDoubleSpin
void setX(double x);
void setY(double y);
void setZ(double z);
void setYaw(double yaw);
void setOrbit(double orbit);
};
#endif // WAYPOINT_H
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>595</width>
<width>763</width>
<height>40</height>
</rect>
</property>
......@@ -155,7 +155,7 @@ QProgressBar::chunk#thrustBar {
<property name="title">
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,5,0,0,0,0,0,0,0,0">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0,0,0,0,0,0,0,0,0">
<property name="spacing">
<number>2</number>
</property>
......@@ -216,13 +216,13 @@ QProgressBar::chunk#thrustBar {
<string>Position X coordinate</string>
</property>
<property name="suffix">
<string>m</string>
<string> m</string>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
<double>-1000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
<double>1000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
......@@ -235,13 +235,13 @@ QProgressBar::chunk#thrustBar {
<string>Position Y coordinate</string>
</property>
<property name="suffix">
<string>m</string>
<string> m</string>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
<double>-1000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
<double>1000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
......@@ -257,10 +257,10 @@ QProgressBar::chunk#thrustBar {
<string>Position Z coordinate</string>
</property>
<property name="suffix">
<string>m</string>
<string> m</string>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
<double>-1000.000000000000000</double>
</property>
<property name="maximum">
<double>0.000000000000000</double>
......@@ -284,6 +284,47 @@ QProgressBar::chunk#thrustBar {
<property name="maximum">
<number>359</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="orbitSpinBox">
<property name="toolTip">
<string>Orbit radius</string>
</property>
<property name="suffix">
<string> m</string>
</property>
<property name="minimum">
<double>0.050000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="holdTimeSpinBox">
<property name="statusTip">
<string>Time in milliseconds that the MAV has to stay inside the orbit before advancing</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="maximum">
<number>60000</number>
</property>
<property name="singleStep">
<number>500</number>
</property>
<property name="value">
<number>2000</number>
</property>
</widget>
</item>
<item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment