mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-23 02:06:33 +00:00
Initial version. Can fly simple mission defined in JSON file.
Please check README.md how to install dependencies and run the application.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "az_action_point.h"
|
||||
#include "az_coordinate.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
const double INVALID_HEIGHT = -100000;
|
||||
|
||||
enum AzGeofenceType { AZ_GEOFENCE_TYPE_NONE = 0, AZ_GEOFENCE_TYPE_INCLUSION = 1, AZ_GEOFENCE_TYPE_EXCLUSION = 2 };
|
||||
|
||||
class AzGeofence
|
||||
{
|
||||
public:
|
||||
vector<AzCoordinate> coordinates;
|
||||
AzGeofenceType type;
|
||||
};
|
||||
|
||||
class AzMission
|
||||
{
|
||||
public:
|
||||
AzMission(string filename);
|
||||
|
||||
const vector<AzGeofence> &getGeofences(void) const;
|
||||
|
||||
const vector<AzActionPoint> &getActionPoints(void) const;
|
||||
|
||||
int getOperationalHeight(void) const;
|
||||
|
||||
AzCoordinate getReturnPoint(void) const;
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os, const AzMission &obj);
|
||||
|
||||
private:
|
||||
void parse(void);
|
||||
|
||||
string mFilename;
|
||||
vector<AzGeofence> mGeofences;
|
||||
vector<AzActionPoint> mActionPoints;
|
||||
int mOperationalHeight;
|
||||
AzCoordinate mReturnPoint;
|
||||
};
|
||||
Reference in New Issue
Block a user