[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [6383] cleanup trailing whitespaces in nav files
From: |
Felix Ruess |
Subject: |
[paparazzi-commits] [6383] cleanup trailing whitespaces in nav files |
Date: |
Mon, 08 Nov 2010 20:01:25 +0000 |
Revision: 6383
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6383
Author: flixr
Date: 2010-11-08 20:01:25 +0000 (Mon, 08 Nov 2010)
Log Message:
-----------
cleanup trailing whitespaces in nav files
Modified Paths:
--------------
paparazzi-software/trunk/sw/airborne/nav.h
paparazzi-software/trunk/sw/airborne/nav_cube.c
paparazzi-software/trunk/sw/airborne/nav_cube.h
paparazzi-software/trunk/sw/airborne/nav_line.c
paparazzi-software/trunk/sw/airborne/nav_line.h
paparazzi-software/trunk/sw/airborne/nav_survey_rectangle.c
Modified: paparazzi-software/trunk/sw/airborne/nav.h
===================================================================
--- paparazzi-software/trunk/sw/airborne/nav.h 2010-11-08 13:15:21 UTC (rev
6382)
+++ paparazzi-software/trunk/sw/airborne/nav.h 2010-11-08 20:01:25 UTC (rev
6383)
@@ -1,6 +1,6 @@
/*
* $Id$
- *
+ *
* Copyright (C) 2003-2009 ENAC, Pascal Brisset, Antoine Drouin
*
* This file is part of paparazzi.
@@ -18,13 +18,13 @@
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Boston, MA 02111-1307, USA.
*
*/
/** \file nav.h
* \brief Navigation library
- *
+ *
* This collection of macros and functions is used by the C code generated
* from the XML flight plan
*/
@@ -181,5 +181,5 @@
#define nav_SetNavRadius(x) { if (x==1) nav_radius = DEFAULT_CIRCLE_RADIUS;
else if (x==-1) nav_radius = -DEFAULT_CIRCLE_RADIUS; else nav_radius = x; }
-#define NavKillThrottle() { kill_throttle = 1; }
+#define NavKillThrottle() { kill_throttle = 1; }
#endif /* NAV_H */
Modified: paparazzi-software/trunk/sw/airborne/nav_cube.c
===================================================================
--- paparazzi-software/trunk/sw/airborne/nav_cube.c 2010-11-08 13:15:21 UTC
(rev 6382)
+++ paparazzi-software/trunk/sw/airborne/nav_cube.c 2010-11-08 20:01:25 UTC
(rev 6383)
@@ -1,6 +1,6 @@
/*
* $Id: nav_cube.c 3600 2009-07-01 20:05:12Z hecto $
- *
+ *
* Copyright (C) 2010 Martin Mueller
*
* This file is part of paparazzi.
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Boston, MA 02111-1307, USA.
*
*/
@@ -53,7 +53,7 @@
/* sanity checks */
if (cube_nsect_x <= 0) cube_nsect_x = 1;
if (cube_nsect_z <= 0) cube_nsect_z = 1;
- if ((cube_sect <= 0) ||
+ if ((cube_sect <= 0) ||
(cube_sect > (cube_nsect_x*cube_nsect_z))) cube_sect = 1;
/* total number of lines/layers to fly */
@@ -128,11 +128,11 @@
cube_nline_x--;
cube_nline_z--;
- return FALSE;
+ return FALSE;
}
bool_t nav_cube(int8_t j, int8_t i,
- uint8_t dest_b, uint8_t dest_e,
+ uint8_t dest_b, uint8_t dest_e,
uint8_t src_b, uint8_t src_e) {
if (i > cube_nline_x) return FALSE;
@@ -150,6 +150,5 @@
/* always keep at least security altitude */
if (waypoints[dest_e].a < (ground_alt+SECURITY_HEIGHT)) waypoints[dest_e].a
= ground_alt+SECURITY_HEIGHT;
- return FALSE;
+ return FALSE;
}
-
Modified: paparazzi-software/trunk/sw/airborne/nav_cube.h
===================================================================
--- paparazzi-software/trunk/sw/airborne/nav_cube.h 2010-11-08 13:15:21 UTC
(rev 6382)
+++ paparazzi-software/trunk/sw/airborne/nav_cube.h 2010-11-08 20:01:25 UTC
(rev 6383)
@@ -1,6 +1,6 @@
/*
* $Id: nav_cube.h 1936 2007-10-23 12:12:38Z hecto $
- *
+ *
* Copyright (C) 2010 Martin Mueller
*
* This file is part of paparazzi.
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Boston, MA 02111-1307, USA.
*
*/
@@ -32,7 +32,7 @@
extern bool_t nav_cube_init(uint8_t turb, uint8_t tb, uint8_t te);
bool_t nav_cube(int8_t j, int8_t i,
- uint8_t dest_b, uint8_t dest_e,
+ uint8_t dest_b, uint8_t dest_e,
uint8_t src_b, uint8_t src_e);
extern int32_t cube_alpha; /* angle of flight direction to north,
clockwise */
@@ -95,7 +95,7 @@
| (grid_z) |
---------> - |
- | (size_z)
- ---------> | (offs_z) |
+ ---------> | (offs_z) |
o [alt] - |
---------> -
@@ -110,10 +110,10 @@
| 1 | ^
| | |
s------- |
-
- ---->
+ ---->
+
back view, 3x2 sectors:
------- ------- -------
@@ -125,11 +125,10 @@
| 1 | 2 | 3 | ^
| | | | |
s-------s-------s------- | (nsect_z)
-
- ----> ----> ---->
+
+ ----> ----> ---->
(nsect_x)
*/
#endif /* NAV_CUBE_H */
-
Modified: paparazzi-software/trunk/sw/airborne/nav_line.c
===================================================================
--- paparazzi-software/trunk/sw/airborne/nav_line.c 2010-11-08 13:15:21 UTC
(rev 6382)
+++ paparazzi-software/trunk/sw/airborne/nav_line.c 2010-11-08 20:01:25 UTC
(rev 6383)
@@ -1,6 +1,6 @@
/*
* $Id$
- *
+ *
* Copyright (C) 2007 Anton Kochevar, ENAC
*
* This file is part of paparazzi.
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Boston, MA 02111-1307, USA.
*
*/
@@ -55,37 +55,37 @@
/* The half circle centers and the other leg */
struct point l2_c1 = { waypoints[l1].x + radius * u_y,
- waypoints[l1].y + radius * -u_x,
- alt };
+ waypoints[l1].y + radius * -u_x,
+ alt };
struct point l2_c2 = { waypoints[l1].x + 1.732*radius * u_x,
- waypoints[l1].y + 1.732*radius * u_y,
- alt };
+ waypoints[l1].y + 1.732*radius * u_y,
+ alt };
struct point l2_c3 = { waypoints[l1].x + radius * -u_y,
- waypoints[l1].y + radius * u_x,
- alt };
-
+ waypoints[l1].y + radius * u_x,
+ alt };
+
struct point l1_c1 = { waypoints[l2].x + radius * -u_y,
- waypoints[l2].y + radius * u_x,
- alt };
+ waypoints[l2].y + radius * u_x,
+ alt };
struct point l1_c2 = { waypoints[l2].x +1.732*radius * -u_x,
- waypoints[l2].y + 1.732*radius * -u_y,
- alt };
+ waypoints[l2].y + 1.732*radius * -u_y,
+ alt };
struct point l1_c3 = { waypoints[l2].x + radius * u_y,
- waypoints[l2].y + radius * -u_x,
- alt };
+ waypoints[l2].y + radius * -u_x,
+ alt };
float qdr_out_2_1 = M_PI/3. - atan2(u_y, u_x);
-
+
float qdr_out_2_2 = -M_PI/3. - atan2(u_y, u_x);
float qdr_out_2_3 = M_PI - atan2(u_y, u_x);
/* Vertical target */
NavVerticalAutoThrottleMode(0); /* No pitch */
NavVerticalAltitudeMode(WaypointAlt(l1), 0.);
-
+
switch (line_status) {
case LR12: /* From wp l2 to wp l1 */
NavSegment(l2, l1);
- if (NavApproachingFrom(l1, l2, CARROT)) {
+ if (NavApproachingFrom(l1, l2, CARROT)) {
line_status = LQC21;
nav_init_stage();
}
@@ -113,7 +113,7 @@
break;
case LR21: /* From wp l1 to wp l2 */
NavSegment(l1, l2);
- if (NavApproachingFrom(l2, l1, CARROT)) {
+ if (NavApproachingFrom(l2, l1, CARROT)) {
line_status = LQC12;
nav_init_stage();
}
Modified: paparazzi-software/trunk/sw/airborne/nav_line.h
===================================================================
--- paparazzi-software/trunk/sw/airborne/nav_line.h 2010-11-08 13:15:21 UTC
(rev 6382)
+++ paparazzi-software/trunk/sw/airborne/nav_line.h 2010-11-08 20:01:25 UTC
(rev 6383)
@@ -1,6 +1,6 @@
/*
* $Id$
- *
+ *
* Copyright (C) 2007 Anton Kochevar, ENAC
*
* This file is part of paparazzi.
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Boston, MA 02111-1307, USA.
*
*/
Modified: paparazzi-software/trunk/sw/airborne/nav_survey_rectangle.c
===================================================================
--- paparazzi-software/trunk/sw/airborne/nav_survey_rectangle.c 2010-11-08
13:15:21 UTC (rev 6382)
+++ paparazzi-software/trunk/sw/airborne/nav_survey_rectangle.c 2010-11-08
20:01:25 UTC (rev 6383)
@@ -27,7 +27,7 @@
nav_survey_south = Min(waypoints[wp1].y, waypoints[wp2].y);
nav_survey_north = Max(waypoints[wp1].y, waypoints[wp2].y);
survey_orientation = so;
-
+
if (survey_orientation == NS) {
survey_from.x = survey_to.x = Min(Max(estimator_x,
nav_survey_west+grid/2.), nav_survey_east-grid/2.);
if (estimator_y > nav_survey_north || (estimator_y > nav_survey_south &&
estimator_hspeed_dir > M_PI/2. && estimator_hspeed_dir < 3*M_PI/2)) {
@@ -81,62 +81,62 @@
if (! survey_uturn) { /* S-N, N-S, W-E or E-W straight route */
if ((estimator_y < nav_survey_north && SurveyGoingNorth()) ||
(estimator_y > nav_survey_south && SurveyGoingSouth()) ||
- (estimator_x < nav_survey_east && SurveyGoingEast()) ||
+ (estimator_x < nav_survey_east && SurveyGoingEast()) ||
(estimator_x > nav_survey_west && SurveyGoingWest())) {
/* Continue ... */
nav_route_xy(survey_from.x, survey_from.y, survey_to.x, survey_to.y);
} else {
if (survey_orientation == NS) {
- /* North or South limit reached, prepare U-turn and next leg */
- float x0 = survey_from.x; /* Current longitude */
- if (x0+nav_survey_shift < nav_survey_west || x0+nav_survey_shift >
nav_survey_east) {
- x0 += nav_survey_shift / 2;
- nav_survey_shift = -nav_survey_shift;
- }
-
- x0 = x0 + nav_survey_shift; /* Longitude of next leg */
- survey_from.x = survey_to.x = x0;
-
- /* Swap South and North extremities */
- float tmp = survey_from.y;
- survey_from.y = survey_to.y;
- survey_to.y = tmp;
-
- /** Do half a circle around WP 0 */
- waypoints[0].x = x0 - nav_survey_shift/2.;
- waypoints[0].y = survey_from.y;
-
+ /* North or South limit reached, prepare U-turn and next leg */
+ float x0 = survey_from.x; /* Current longitude */
+ if (x0+nav_survey_shift < nav_survey_west || x0+nav_survey_shift >
nav_survey_east) {
+ x0 += nav_survey_shift / 2;
+ nav_survey_shift = -nav_survey_shift;
+ }
+
+ x0 = x0 + nav_survey_shift; /* Longitude of next leg */
+ survey_from.x = survey_to.x = x0;
+
+ /* Swap South and North extremities */
+ float tmp = survey_from.y;
+ survey_from.y = survey_to.y;
+ survey_to.y = tmp;
+
+ /** Do half a circle around WP 0 */
+ waypoints[0].x = x0 - nav_survey_shift/2.;
+ waypoints[0].y = survey_from.y;
+
/* Computes the right direction for the circle */
- survey_radius = nav_survey_shift / 2.;
- if (SurveyGoingNorth()) {
- survey_radius = -survey_radius;
- }
+ survey_radius = nav_survey_shift / 2.;
+ if (SurveyGoingNorth()) {
+ survey_radius = -survey_radius;
+ }
} else { /* (survey_orientation == WE) */
- /* East or West limit reached, prepare U-turn and next leg */
- /* There is a y0 declared in math.h (for ARM) !!! */
- float my_y0 = survey_from.y; /* Current latitude */
- if (my_y0+nav_survey_shift < nav_survey_south || my_y0+nav_survey_shift
> nav_survey_north) {
- my_y0 += nav_survey_shift / 2;
- nav_survey_shift = -nav_survey_shift;
- }
-
- my_y0 = my_y0 + nav_survey_shift; /* Longitude of next leg */
- survey_from.y = survey_to.y = my_y0;
-
- /* Swap West and East extremities */
- float tmp = survey_from.x;
- survey_from.x = survey_to.x;
- survey_to.x = tmp;
-
- /** Do half a circle around WP 0 */
- waypoints[0].x = survey_from.x;
- waypoints[0].y = my_y0 - nav_survey_shift/2.;
-
+ /* East or West limit reached, prepare U-turn and next leg */
+ /* There is a y0 declared in math.h (for ARM) !!! */
+ float my_y0 = survey_from.y; /* Current latitude */
+ if (my_y0+nav_survey_shift < nav_survey_south || my_y0+nav_survey_shift >
nav_survey_north) {
+ my_y0 += nav_survey_shift / 2;
+ nav_survey_shift = -nav_survey_shift;
+ }
+
+ my_y0 = my_y0 + nav_survey_shift; /* Longitude of next leg */
+ survey_from.y = survey_to.y = my_y0;
+
+ /* Swap West and East extremities */
+ float tmp = survey_from.x;
+ survey_from.x = survey_to.x;
+ survey_to.x = tmp;
+
+ /** Do half a circle around WP 0 */
+ waypoints[0].x = survey_from.x;
+ waypoints[0].y = my_y0 - nav_survey_shift/2.;
+
/* Computes the right direction for the circle */
- survey_radius = nav_survey_shift / 2.;
- if (SurveyGoingWest()) {
- survey_radius = -survey_radius;
- }
+ survey_radius = nav_survey_shift / 2.;
+ if (SurveyGoingWest()) {
+ survey_radius = -survey_radius;
+ }
}
nav_in_segment = FALSE;
@@ -145,9 +145,9 @@
}
} else { /* U-turn */
if ((SurveyGoingNorth() && NavCourseCloseTo(0)) ||
- (SurveyGoingSouth() && NavCourseCloseTo(180)) ||
- (SurveyGoingEast() && NavCourseCloseTo(90)) ||
- (SurveyGoingWest() && NavCourseCloseTo(270))) {
+ (SurveyGoingSouth() && NavCourseCloseTo(180)) ||
+ (SurveyGoingEast() && NavCourseCloseTo(90)) ||
+ (SurveyGoingWest() && NavCourseCloseTo(270))) {
/* U-turn finished, back on a segment */
survey_uturn = FALSE;
nav_in_circle = FALSE;
@@ -159,4 +159,3 @@
NavVerticalAutoThrottleMode(0.); /* No pitch */
NavVerticalAltitudeMode(WaypointAlt(wp1), 0.); /* No preclimb */
}
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [6383] cleanup trailing whitespaces in nav files,
Felix Ruess <=