dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Planner Pluggin

Abstact algorithm that can be run on a path. More...

Classes

class  PathFillet
 
struct  PathPlanData
 The PathPlanData struct is the internal representation of the waypoints. Notice this is in absolute terms, not NED. More...
 
class  FlightDataModel
 
class  IPathAlgorithm
 

Enumerations

enum  FlightDataModel::PathPlanDataEnum {
  FlightDataModel::LATPOSITION, FlightDataModel::LNGPOSITION, FlightDataModel::ALTITUDE, FlightDataModel::NED_NORTH,
  FlightDataModel::NED_EAST, FlightDataModel::NED_DOWN, FlightDataModel::VELOCITY, FlightDataModel::MODE,
  FlightDataModel::MODE_PARAMS, FlightDataModel::LOCKED, FlightDataModel::WPDESCRIPTION, FlightDataModel::LASTCOLUMN
}
 The column names. More...
 

Functions

 PathFillet::PathFillet (QObject *parent=nullptr)
 
virtual bool PathFillet::verifyPath (FlightDataModel *model, QString &err)
 
virtual bool PathFillet::processPath (FlightDataModel *model)
 
virtual bool PathFillet::configure (QWidget *callingUi=nullptr)
 
 FlightDataModel::FlightDataModel (QObject *parent)
 Initialize an empty flight plan. More...
 
int FlightDataModel::rowCount (const QModelIndex &parent=QModelIndex()) const
 Return the number of waypoints. More...
 
int FlightDataModel::columnCount (const QModelIndex &parent=QModelIndex()) const
 Return the number of fields in the model. More...
 
QVariant FlightDataModel::data (const QModelIndex &index, int role=Qt::DisplayRole) const
 FlightDataModel::data Fetch the data from the model. More...
 
QVariant FlightDataModel::headerData (int section, Qt::Orientation orientation, int role) const
 FlightDataModel::headerData Get the names of the columns. More...
 
void FlightDataModel::fixupValidationErrors ()
 
bool FlightDataModel::setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 FlightDataModel::setData Set the data at a given location. More...
 
Qt::ItemFlags FlightDataModel::flags (const QModelIndex &index) const
 FlightDataModel::flags Tell QT MVC which flags are supported for items. More...
 
bool FlightDataModel::insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
 FlightDataModel::insertRows Create a new waypoint. More...
 
bool FlightDataModel::removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
 FlightDataModel::removeRows Remove waypoints from the model. More...
 
bool FlightDataModel::writeToFile (QString filename)
 FlightDataModel::writeToFile Write the waypoints to an xml file. More...
 
void FlightDataModel::readFromFile (QString fileName)
 FlightDataModel::readFromFile Read into the model from a flight plan xml file. More...
 
bool FlightDataModel::replaceData (FlightDataModel *newModel)
 Replace a model data with another model. More...
 
void FlightDataModel::pauseValidation (bool pausing)
 Prevent validation/correction of data. More...
 
 IPathAlgorithm::IPathAlgorithm (QObject *parent=nullptr)
 
virtual bool IPathAlgorithm::verifyPath (FlightDataModel *model, QString &err)=0
 
virtual bool IPathAlgorithm::processPath (FlightDataModel *model)=0
 
virtual bool IPathAlgorithm::configure (QWidget *callingUi=nullptr)=0
 

Variables

QString PathPlanData::wpDescription
 Description for the waypoint. More...
 
double PathPlanData::latPosition
 Latitude of the waypoint. More...
 
double PathPlanData::lngPosition
 Longitude of the waypoint. More...
 
double PathPlanData::altitude
 Altitude of the waypoint (m above ellipsoid) More...
 
float PathPlanData::velocity
 Velocity associated with this waypoint. More...
 
int PathPlanData::mode
 Navigation mode for this waypoint. More...
 
float PathPlanData::mode_params
 Optional parameters associated with this waypoint. More...
 
bool PathPlanData::locked
 Lock a waypoint. More...
 
static QMap< int, QString > FlightDataModel::modeNames = QMap<int, QString>()
 
double FlightDataModel::NED::North
 
double FlightDataModel::NED::East
 
double FlightDataModel::NED::Down
 

Public Slots

bool ModelUavoProxy::modelToObjects ()
 Cast from the internal representation to the UAVOs. More...
 

Detailed Description

Abstact algorithm that can be run on a path.

global include for the library

The Path Planner plugin.

Used to represent flight paths.

Representation of a flight plan.

Enumeration Type Documentation

The column names.

Enumerator
LATPOSITION 
LNGPOSITION 
ALTITUDE 
NED_NORTH 
NED_EAST 
NED_DOWN 
VELOCITY 
MODE 
MODE_PARAMS 
LOCKED 
WPDESCRIPTION 
LASTCOLUMN 

Definition at line 54 of file flightdatamodel.h.

Function Documentation

int FlightDataModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Return the number of fields in the model.

Definition at line 68 of file flightdatamodel.cpp.

virtual bool IPathAlgorithm::configure ( QWidget *  callingUi = nullptr)
pure virtual

Present a UI to configure options for the algorithm

Parameters
callingUithe QWidget that called this algorithm
Returns
true for success, false for failure

Implemented in PathFillet.

bool PathFillet::configure ( QWidget *  callingUi = nullptr)
virtual

Present a UI to configure options for the algorithm

Parameters
callingUithe QWidget that called this algorithm
Returns
true for success, false for failure

Verify the path is valid to run through this algorithm

Parameters
[in]modelthe flight model to validate
[out]erran error message for the user for invalid paths
Returns
true for valid path, false for invalid

Implements IPathAlgorithm.

Definition at line 49 of file pathfillet.cpp.

QVariant FlightDataModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

FlightDataModel::data Fetch the data from the model.

Parameters
indexSpecifies the row and column to fetch
roleEither use Qt::DisplayRole or Qt::EditRole
Returns
The data as a variant or QVariant::Invalid for a bad role

Definition at line 81 of file flightdatamodel.cpp.

void FlightDataModel::fixupValidationErrors ( )

Definition at line 462 of file flightdatamodel.cpp.

Qt::ItemFlags FlightDataModel::flags ( const QModelIndex &  index) const

FlightDataModel::flags Tell QT MVC which flags are supported for items.

Returns
That the item is selectable, editable and enabled

Definition at line 268 of file flightdatamodel.cpp.

FlightDataModel::FlightDataModel ( QObject *  parent)

Initialize an empty flight plan.

Definition at line 43 of file flightdatamodel.cpp.

QVariant FlightDataModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const

FlightDataModel::headerData Get the names of the columns.

Parameters
section
orientation
role
Returns

Definition at line 138 of file flightdatamodel.cpp.

bool FlightDataModel::insertRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)

FlightDataModel::insertRows Create a new waypoint.

Parameters
rowThe new waypoint id
countHow many to add
Returns

Definition at line 288 of file flightdatamodel.cpp.

IPathAlgorithm::IPathAlgorithm ( QObject *  parent = nullptr)
explicit

Definition at line 27 of file ipathalgorithm.cpp.

PathFillet::PathFillet ( QObject *  parent = nullptr)
explicit

Definition at line 36 of file pathfillet.cpp.

void FlightDataModel::pauseValidation ( bool  pausing)

Prevent validation/correction of data.

Definition at line 453 of file flightdatamodel.cpp.

virtual bool IPathAlgorithm::processPath ( FlightDataModel model)
pure virtual

Process the flight path according to the algorithm

Parameters
modelthe flight model to process and update
Returns
true for success, false for failure

Implemented in PathFillet.

bool PathFillet::processPath ( FlightDataModel model)
virtual

Process the flight path according to the algorithm

Parameters
modelthe flight model to process and update
Returns
true for success, false for failure

It connects waypoints together with straight lines, and fillets, so that the vehicle dynamics, i.e. Dubin's cart constraints, are taken into account. However the "direct with filleting" path planner still assumes that there are no obstacles along the path. The general approach is that before adding a new segment, the path planner looks ahead at the next waypoint, and adds in fillets that align the vehicle with this next waypoint.

Parameters
[in]originalthe flight model to process
[out]newthe resulting flight model
Returns
true for success, false for failure

Implements IPathAlgorithm.

Definition at line 83 of file pathfillet.cpp.

void FlightDataModel::readFromFile ( QString  fileName)

FlightDataModel::readFromFile Read into the model from a flight plan xml file.

Parameters
fileNameThe filename to parse

Definition at line 568 of file flightdatamodel.cpp.

bool FlightDataModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)

FlightDataModel::removeRows Remove waypoints from the model.

Parameters
rowThe starting waypoint
countHow many to remove
Returns
True if succeeded, otherwise false

Definition at line 327 of file flightdatamodel.cpp.

bool FlightDataModel::replaceData ( FlightDataModel newModel)

Replace a model data with another model.

FlightDataModel::replaceData with data from a new model.

Parameters
newModelthe new data to use
Returns
true if successful

Definition at line 816 of file flightdatamodel.cpp.

int FlightDataModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Return the number of waypoints.

Definition at line 62 of file flightdatamodel.cpp.

bool FlightDataModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

FlightDataModel::setData Set the data at a given location.

Parameters
indexSpecifies both the row (waypoint) and column (field0
valueThe new value
roleUsed by the Qt MVC to determine what to do. Should be Qt::EditRole
Returns
True if setting data succeeded, otherwise false

Definition at line 183 of file flightdatamodel.cpp.

virtual bool IPathAlgorithm::verifyPath ( FlightDataModel model,
QString &  err 
)
pure virtual

Verify the path is valid to run through this algorithm

Parameters
[in]modelthe flight model to validate
[out]erran error message for the user for invalid paths
Returns
true for valid path, false for invalid

Implemented in PathFillet.

bool PathFillet::verifyPath ( FlightDataModel model,
QString &  err 
)
virtual

Verify the path is valid to run through this algorithm

Parameters
[in]modelthe flight model to validate
[out]erran error message for the user for invalid paths
Returns
true for valid path, false for invalid

Implements IPathAlgorithm.

Definition at line 63 of file pathfillet.cpp.

bool FlightDataModel::writeToFile ( QString  fileName)

FlightDataModel::writeToFile Write the waypoints to an xml file.

Parameters
fileNameThe filename to write to
Returns

Definition at line 348 of file flightdatamodel.cpp.

Variable Documentation

double PathPlanData::altitude

Altitude of the waypoint (m above ellipsoid)

Definition at line 42 of file flightdatamodel.h.

double FlightDataModel::NED::Down

Definition at line 101 of file flightdatamodel.h.

double FlightDataModel::NED::East

Definition at line 100 of file flightdatamodel.h.

double PathPlanData::latPosition

Latitude of the waypoint.

Definition at line 40 of file flightdatamodel.h.

double PathPlanData::lngPosition

Longitude of the waypoint.

Definition at line 41 of file flightdatamodel.h.

bool PathPlanData::locked

Lock a waypoint.

Definition at line 46 of file flightdatamodel.h.

int PathPlanData::mode

Navigation mode for this waypoint.

Definition at line 44 of file flightdatamodel.h.

float PathPlanData::mode_params

Optional parameters associated with this waypoint.

Definition at line 45 of file flightdatamodel.h.

QMap< int, QString > FlightDataModel::modeNames = QMap<int, QString>()
static

Definition at line 83 of file flightdatamodel.h.

double FlightDataModel::NED::North

Definition at line 99 of file flightdatamodel.h.

float PathPlanData::velocity

Velocity associated with this waypoint.

Definition at line 43 of file flightdatamodel.h.

QString PathPlanData::wpDescription

Description for the waypoint.

Definition at line 39 of file flightdatamodel.h.

Public Slots

bool ModelUavoProxy::modelToObjects ( )
slot

Cast from the internal representation to the UAVOs.

ModelUavoProxy::modelToObjects Cast from the internal representation of a path to the UAV objects required to represent it.

Returns
true if all wp were sent ok

Definition at line 55 of file modeluavoproxy.cpp.