dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
pathfillet.h
Go to the documentation of this file.
1 
12 /*
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  * for more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, see <http://www.gnu.org/licenses/>
25  */
26 #ifndef PATHFILLET_H
27 #define PATHFILLET_H
28 
29 #include <ipathalgorithm.h>
30 
31 class PATHPLANNER_EXPORT PathFillet : public IPathAlgorithm
32 {
33  Q_OBJECT
34 
35 public:
36  explicit PathFillet(QObject *parent = nullptr);
37 
44  virtual bool verifyPath(FlightDataModel *model, QString &err);
45 
51  virtual bool processPath(FlightDataModel *model);
52 
58  virtual bool configure(QWidget *callingUi = nullptr);
59 
60 private:
62  double fillet_radius;
63 
65  FlightDataModel *new_model;
66 
67 private:
68  enum arc_center_results { CENTER_FOUND, COINCIDENT_POINTS, INSUFFICIENT_RADIUS };
69 
70  // Private functions
71 
73  void setNewWaypoint(int index, float *pos, float velocity, float curvature);
74 
75  int addNonCircleToSwitchingLoci(float position[3], float finalVelocity, float radius,
76  int index);
77 
79  float VectorMagnitude(float *);
80 
82  double VectorMagnitude(double *);
83 
85  float circular_modulus_rad(float err);
86 
88  enum arc_center_results find_arc_center(float start_point[2], float end_point[2], float radius,
89  float center[2], bool clockwise, bool minor);
90 
92  float measure_arc_rad(float oldPosition_NE[2], float newPosition_NE[2], float arcCenter_NE[2]);
93 
95  float angle_between_2d_vectors(float a[2], float b[2]);
96 };
97 
98 #endif // PATHFILLET_H
virtual bool configure(QWidget *callingUi=nullptr)=0
virtual bool processPath(FlightDataModel *model)=0
end a
Definition: OPPlots.m:98
virtual bool verifyPath(FlightDataModel *model, QString &err)=0