Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
photogrammetry_calculator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Christophe De Wagter
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  */
22 
75 #ifndef PHOTOGRAMMETRY_CALCULATOR_H
76 #define PHOTOGRAMMETRY_CALCULATOR_H
77 
78 #include "std.h"
79 #include "paparazzi.h"
80 
83 
84 
85 // Flightplan Variables
86 extern float photogrammetry_sweep_angle;
87 extern int photogrammetry_sidestep;
89 extern int photogrammetry_height;
90 
91 extern int photogrammetry_height_min;
92 extern int photogrammetry_height_max;
93 extern int photogrammetry_radius_min;
94 
95 
96 // Photogrammetry Goals
97 extern int photogrammetry_sidelap;
98 extern int photogrammetry_overlap;
99 extern int photogrammetry_resolution;
100 
104 
105 // Update Flightplan on Camera Change
106 #define photogrammetry_calculator_UpdateSideLap(X) { \
107  photogrammetry_sidelap = X; \
108  photogrammetry_calculator_update_camera2flightplan(); \
109  }
110 
111 #define photogrammetry_calculator_UpdateOverLap(X) { \
112  photogrammetry_overlap = X; \
113  photogrammetry_calculator_update_camera2flightplan(); \
114  }
115 
116 #define photogrammetry_calculator_UpdateResolution(X) { \
117  photogrammetry_resolution = X; \
118  photogrammetry_calculator_update_camera2flightplan(); \
119  }
120 
121 // Update Camera on Flightplan Change
122 #define photogrammetry_calculator_UpdateHeight(X) { \
123  photogrammetry_height = X; \
124  photogrammetry_calculator_update_flightplan2camera(); \
125  }
126 
127 #define photogrammetry_calculator_UpdateSideStep(X) { \
128  photogrammetry_sidestep = X; \
129  photogrammetry_calculator_update_flightplan2camera(); \
130  }
131 
132 #define photogrammetry_calculator_UpdateTriggerStep(X) { \
133  photogrammetry_triggerstep = X; \
134  photogrammetry_calculator_update_flightplan2camera(); \
135  }
136 
137 
138 // Flightplan Routine Wrappers
139 #define PhotogrammetryCalculatorPolygonSurveyOsam(_WP, _COUNT) { \
140  WaypointAlt(_WP) = photogrammetry_height + GROUND_ALT; \
141  int _ang = 90 - DegOfRad(photogrammetry_sweep_angle); \
142  while (_ang > 90) _ang -= 180; while (_ang < -90) _ang += 180; \
143  nav_survey_poly_osam_setup((_WP), (_COUNT), 2*photogrammetry_sidestep, _ang); \
144  }
145 
146 #define PhotogrammetryCalculatorPolygonSurvey(_WP, _COUNT) { \
147  nav_survey_polygon_setup((_WP), (_COUNT), DegOfRad(photogrammetry_sweep_angle), \
148  photogrammetry_sidestep, photogrammetry_triggerstep, \
149  photogrammetry_radius_min, photogrammetry_height + GROUND_ALT); \
150  }
151 
152 #endif
Advanced polygon survey for fixedwings from Uni Stuttgart.
int photogrammetry_height_max
int photogrammetry_sidestep
float photogrammetry_sweep_angle
int photogrammetry_radius_min
int photogrammetry_height
int photogrammetry_height_min
void photogrammetry_calculator_update_camera2flightplan(void)
void init_photogrammetry_calculator(void)
int photogrammetry_resolution
void photogrammetry_calculator_update_flightplan2camera(void)
int photogrammetry_triggerstep
int photogrammetry_sidelap
int photogrammetry_overlap