ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
fence.h
1
38#ifndef _FENCE_H_
39#define _FENCE_H_
40
41enum FENCE_TYPE {KEEP_IN = 0,KEEP_OUT = 1};
42
43#ifdef __cplusplus
44
45#include <vector>
46#include "Position.h"
47#include "Velocity.h"
48#include "Vect2.h"
49#include "Vect3.h"
50#include "AircraftState.h"
51#include "EuclideanProjection.h"
52#include "ParameterData.h"
53#include "SimplePoly.h"
54#include "PolyPath.h"
55#include "Poly3D.h"
56#include "CDPolycarp.h"
57#include "CDIIPolygon.h"
58#include "PolycarpDetection.h"
59#include "PolycarpResolution.h"
60#include "Plan.h"
61#include "math.h"
62
63using namespace larcfm;
64
65class fence{
66
67private:
68
69 FENCE_TYPE fenceType;
70 int16_t id;
71 uint16_t nVertices;
72 double floor;
73 double ceiling;
74 double BUFF = 0.1;
75 double entryTime;
76 double exitTime;
77 bool violation;
78 bool conflict;
79 bool projectedViolation;
80 EuclideanProjection proj;
81 SimplePoly geoPoly0; // Original polygon in lat,lon
82 SimplePoly geoPoly1; // Expanded/Contracted polygon in lat,lon
83 Poly3D geoPoly3D; // 3D polygon in cartesian coordinates
84 CDPolycarp geoPolyCarp;
85 PolycarpResolution geoPolyResolution;
86 PolycarpDetection geoPolyDetect;
87 CDIIPolygon geoCDIIPolygon;
88 std::vector<Vect2> fenceVertices0; // Cartesian coordinates of vertices of geoPoly0
89 std::vector<Vect2> fenceVertices1; //Cartesian coordinates of vertices of geoPoly1
90 Position recoveryPoint;
91 PolyPath geoPolyPath;
92
93public:
94 fence(){};
95 fence(int ID, FENCE_TYPE ftype, uint16_t nVert, double infloor, double inCeiling);
96 void AddVertex(int index, double lat, double lon,double ResolBUFF);
97 void CheckViolation(AircraftState acState,double elapsedTime,Plan fp);
98 bool CollisionDetection(Position pos, Vect2 v,double startTime, double stopTime);
99 bool CheckWPFeasibility(Position current, Position nextWP);
100 int16_t GetID();
101 uint16_t GetSize();
102 Poly3D* GetPoly3D();
103 Position GetRecoveryPoint();
104 bool GetConflictStatus();
105 bool GetProjectedStatus();
106 bool GetViolationStatus();
107 FENCE_TYPE GetType();
108 void GetEntryExitTime(double& in, double& out);
109 SimplePoly* GetPoly();
110 SimplePoly* GetPolyMod();
111 PolyPath* GetPolyPath();
112 EuclideanProjection* GetProjection();
113 double GetCeiling();
114 void clear(){id = -1;};
115 void Print();
116 std::vector<Vect2>* getCartesianVertices();
117 std::vector<Vect2>* getModCartesianVertices();
118};
119
120#endif
121
122#endif /* _FENCE_H_ */
Definition: AircraftState.h:47
Definition: CDIIPolygon.h:46
Definition: CDPolycarp.h:29
Definition: Plan.h:83
Definition: Poly3D.h:27
Definition: PolyPath.h:60
Definition: PolycarpDetection.h:23
Definition: PolycarpResolution.h:29
Definition: Position.h:40
Definition: SimplePoly.h:44
Definition: Vect2.h:30
Definition: ACCoRDConfig.h:16