Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
OSAMNav.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2012 The Paparazzi Team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
27 #ifndef OSAMNav_H
28 #define OSAMNav_H
29 
30 #include "std.h"
31 
32 
33 struct Point2D {float x; float y;};
34 struct Line {float m;float b;float x;};
35 
36 extern bool_t FlowerNav(void);
37 extern bool_t InitializeFlower(uint8_t CenterWP, uint8_t EdgeWP);
38 
39 extern bool_t InitializeBungeeTakeoff(uint8_t BungeeWP);
40 extern bool_t BungeeTakeoff(void);
41 
42 extern bool_t InitializeSkidLanding(uint8_t AFWP, uint8_t TDWP, float radius);
43 extern bool_t SkidLanding(void);
44 
45 #define PolygonSize 10
46 #define MaxFloat 1000000000
47 #define MinFloat -1000000000
48 
49 extern bool_t InitializePolygonSurvey(uint8_t FirstWP, uint8_t Size, float Sweep, float Orientation);
50 extern bool_t PolygonSurvey(void);
53 
54 extern bool_t InitializeVerticalRaster( void );
55 extern bool_t VerticalRaster(uint8_t wp1, uint8_t wp2, float radius, float AltSweep);
56 
57 extern bool_t FlightLine(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After);
58 extern bool_t FlightLineBlock(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After);
59 
60 void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float transX, float transY);
61 void RotateAndTranslateToWorld(struct Point2D *p, float Zrot, float transX, float transY);
62 
63 void FindInterceptOfTwoLines(float *x, float *y, struct Line L1, struct Line L2);
64 float EvaluateLineForY(float x, struct Line L);
65 float EvaluateLineForX(float y, struct Line L);
66 float DistanceEquation(struct Point2D p1,struct Point2D p2);
67 
68 #endif
float y
Definition: OSAMNav.h:33
unsigned short uint16_t
Definition: types.h:16
bool_t VerticalRaster(uint8_t wp1, uint8_t wp2, float radius, float AltSweep)
Definition: OSAMNav.c:776
bool_t InitializePolygonSurvey(uint8_t FirstWP, uint8_t Size, float Sweep, float Orientation)
Definition: OSAMNav.c:378
bool_t InitializeVerticalRaster(void)
Definition: OSAMNav.c:771
bool_t InitializeBungeeTakeoff(uint8_t BungeeWP)
Definition: OSAMNav.c:206
float EvaluateLineForY(float x, struct Line L)
Definition: OSAMNav.c:1207
Definition: OSAMNav.c:359
float x
Definition: OSAMNav.h:34
bool_t FlightLineBlock(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After)
Definition: OSAMNav.c:1139
static float radius
Definition: chemotaxis.c:15
float x
Definition: OSAMNav.h:33
float b
Definition: OSAMNav.h:34
void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float transX, float transY)
Definition: OSAMNav.c:1177
bool_t FlightLine(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After)
Definition: OSAMNav.c:1032
bool_t PolygonSurvey(void)
Definition: OSAMNav.c:574
void RotateAndTranslateToWorld(struct Point2D *p, float Zrot, float transX, float transY)
Rotates point round z by -Zrot then translates so (0,0) becomes (transX,transY)
Definition: OSAMNav.c:1190
bool_t FlowerNav(void)
Definition: OSAMNav.c:96
Definition: OSAMNav.h:34
float DistanceEquation(struct Point2D p1, struct Point2D p2)
Definition: OSAMNav.c:1217
bool_t InitializeSkidLanding(uint8_t AFWP, uint8_t TDWP, float radius)
Definition: OSAMNav.c:917
void FindInterceptOfTwoLines(float *x, float *y, struct Line L1, struct Line L2)
Definition: OSAMNav.c:1201
uint16_t PolySurveySweepNum
Definition: OSAMNav.c:375
unsigned char uint8_t
Definition: types.h:14
bool_t InitializeFlower(uint8_t CenterWP, uint8_t EdgeWP)
Definition: OSAMNav.c:66
uint16_t PolySurveySweepBackNum
Definition: OSAMNav.c:376
static float p[2][2]
bool_t BungeeTakeoff(void)
Definition: OSAMNav.c:260
float EvaluateLineForX(float y, struct Line L)
Definition: OSAMNav.c:1212
float m
Definition: OSAMNav.h:34
bool_t SkidLanding(void)
Definition: OSAMNav.c:956