Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
nav.c
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
29 #define NAV_C
30 
31 #include <math.h>
32 
33 #include "subsystems/nav.h"
34 #include "subsystems/gps.h"
35 #include "estimator.h"
39 #include "inter_mcu.h"
41 
42 #define RCLost() bit_is_set(fbw_state->status, RADIO_REALLY_LOST)
43 
45 
46 float last_x, last_y;
47 
49 static uint8_t last_wp __attribute__ ((unused));
50 
51 float rc_pitch;
53 
55 float nav_circle_radians; /* Cumulated */
56 float nav_circle_trigo_qdr; /* Angle from center to mobile */
58 
59 
61 static float nav_leg_progress;
62 
64 static float nav_leg_length;
65 
71 float circle_bank = 0;
72 
75 
77 #ifndef NAV_GLIDE_PITCH_TRIM
78 #define NAV_GLIDE_PITCH_TRIM 0.
79 #endif
80 
81 
82 
84 
85 /* Used in nav_survey_rectangle. Defined here for downlink and uplink */
89 
91 
92 void nav_init_stage( void ) {
94  stage_time = 0;
95  nav_circle_radians = 0;
96  nav_in_circle = FALSE;
97  nav_in_segment = FALSE;
98  nav_shift = 0;
99  nav_pitch = 0.;
100 }
101 
102 #define PowerVoltage() (vsupply/10.)
103 #define RcRoll(travel) (fbw_state->channels[RADIO_ROLL]* (float)travel /(float)MAX_PPRZ)
104 
105 #define MIN_DX ((int16_t)(MAX_PPRZ * 0.05))
106 
107 
109 void nav_circle_XY(float x, float y, float radius) {
110  float last_trigo_qdr = nav_circle_trigo_qdr;
111  nav_circle_trigo_qdr = atan2(estimator_y - y, estimator_x - x);
112 
113  if (nav_in_circle) {
114  float trigo_diff = nav_circle_trigo_qdr - last_trigo_qdr;
115  NormRadAngle(trigo_diff);
116  nav_circle_radians += trigo_diff;
117  }
118 
119  float dist2_center = DistanceSquare(estimator_x, estimator_y, x, y);
120  float dist_carrot = CARROT*NOMINAL_AIRSPEED;
121  float sign_radius = radius > 0 ? 1 : -1;
122 
123  radius += -nav_shift;
124 
125  float abs_radius = fabs(radius);
126 
128  circle_bank =
129  (dist2_center > Square(abs_radius + dist_carrot)
130  || dist2_center < Square(abs_radius - dist_carrot)) ?
131  0 :
133 
134  float carrot_angle = dist_carrot / abs_radius;
135  carrot_angle = Min(carrot_angle, M_PI/4);
136  carrot_angle = Max(carrot_angle, M_PI/16);
137  float alpha_carrot = nav_circle_trigo_qdr - sign_radius * carrot_angle;
138  horizontal_mode = HORIZONTAL_MODE_CIRCLE;
139  float radius_carrot = abs_radius;
140  if (nav_mode == NAV_MODE_COURSE)
141  radius_carrot += (abs_radius / cos(carrot_angle) - abs_radius);
142  fly_to_xy(x+cos(alpha_carrot)*radius_carrot,
143  y+sin(alpha_carrot)*radius_carrot);
144  nav_in_circle = TRUE;
145  nav_circle_x = x;
146  nav_circle_y = y;
147  nav_circle_radius = radius;
148 }
149 
150 
151 #define NavGlide(_last_wp, _wp) { \
152  float start_alt = waypoints[_last_wp].a; \
153  float diff_alt = waypoints[_wp].a - start_alt; \
154  float alt = start_alt + nav_leg_progress * diff_alt; \
155  float pre_climb = estimator_hspeed_mod * diff_alt / nav_leg_length; \
156  NavVerticalAltitudeMode(alt, pre_climb); \
157 }
158 
159 
160 
161 
162 #define MAX_DIST_CARROT 250.
163 #define MIN_HEIGHT_CARROT 50.
164 #define MAX_HEIGHT_CARROT 150.
165 
166 #define Goto3D(radius) { \
167  if (pprz_mode == PPRZ_MODE_AUTO2) { \
168  int16_t yaw = fbw_state->channels[RADIO_YAW]; \
169  if (yaw > MIN_DX || yaw < -MIN_DX) { \
170  carrot_x += FLOAT_OF_PPRZ(yaw, 0, -20.); \
171  carrot_x = Min(carrot_x, MAX_DIST_CARROT); \
172  carrot_x = Max(carrot_x, -MAX_DIST_CARROT); \
173  } \
174  int16_t pitch = fbw_state->channels[RADIO_PITCH]; \
175  if (pitch > MIN_DX || pitch < -MIN_DX) { \
176  carrot_y += FLOAT_OF_PPRZ(pitch, 0, -20.); \
177  carrot_y = Min(carrot_y, MAX_DIST_CARROT); \
178  carrot_y = Max(carrot_y, -MAX_DIST_CARROT); \
179  } \
180  v_ctl_mode = V_CTL_MODE_AUTO_ALT; \
181  int16_t roll = fbw_state->channels[RADIO_ROLL]; \
182  if (roll > MIN_DX || roll < -MIN_DX) { \
183  nav_altitude += FLOAT_OF_PPRZ(roll, 0, -1.0); \
184  nav_altitude = Max(nav_altitude, MIN_HEIGHT_CARROT+ground_alt); \
185  nav_altitude = Min(nav_altitude, MAX_HEIGHT_CARROT+ground_alt); \
186  } \
187  } \
188  nav_circle_XY(carrot_x, carrot_y, radius); \
189 }
190 
191 
192 #define NavFollow(_ac_id, _distance, _height) \
193  nav_follow(_ac_id, _distance, _height);
194 
195 
196 static unit_t unit __attribute__ ((unused));
197 
198 static inline void nav_follow(uint8_t _ac_id, float _distance, float _height);
199 
200 #ifdef NAV_GROUND_SPEED_PGAIN
201 
203 static void nav_ground_speed_loop( void ) {
204  if (MINIMUM_AIRSPEED < nav_ground_speed_setpoint
205  && nav_ground_speed_setpoint < MAXIMUM_AIRSPEED) {
206  float err = nav_ground_speed_setpoint - estimator_hspeed_mod;
207  v_ctl_auto_throttle_cruise_throttle += nav_ground_speed_pgain*err;
208  Bound(v_ctl_auto_throttle_cruise_throttle, V_CTL_AUTO_THROTTLE_MIN_CRUISE_THROTTLE, V_CTL_AUTO_THROTTLE_MAX_CRUISE_THROTTLE);
209  } else {
210  /* Reset cruise throttle to nominal value */
211  v_ctl_auto_throttle_cruise_throttle = V_CTL_AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE;
212  }
213 }
214 #endif
215 
216 static float baseleg_out_qdr;
217 static inline bool_t nav_compute_baseleg(uint8_t wp_af, uint8_t wp_td, uint8_t wp_baseleg, float radius ) {
218  nav_radius = radius;
219 
220  float x_0 = waypoints[wp_td].x - waypoints[wp_af].x;
221  float y_0 = waypoints[wp_td].y - waypoints[wp_af].y;
222 
223  /* Unit vector from AF to TD */
224  float d = sqrt(x_0*x_0+y_0*y_0);
225  float x_1 = x_0 / d;
226  float y_1 = y_0 / d;
227 
228  waypoints[wp_baseleg].x = waypoints[wp_af].x + y_1 * nav_radius;
229  waypoints[wp_baseleg].y = waypoints[wp_af].y - x_1 * nav_radius;
230  waypoints[wp_baseleg].a = waypoints[wp_af].a;
231  baseleg_out_qdr = M_PI - atan2(-y_1, -x_1);
232  if (nav_radius < 0)
233  baseleg_out_qdr += M_PI;
234 
235  return FALSE;
236 }
237 
238 
239 /* For a landing UPWIND.
240  Computes Top Of Descent waypoint from Touch Down and Approach Fix
241  waypoints, using glide airspeed, glide vertical speed and wind */
242 static inline bool_t compute_TOD(uint8_t _af, uint8_t _td, uint8_t _tod, float glide_airspeed, float glide_vspeed) {
243  float td_af_x = WaypointX(_af) - WaypointX(_td);
244  float td_af_y = WaypointY(_af) - WaypointY(_td);
245  float td_af = sqrt( td_af_x*td_af_x + td_af_y*td_af_y);
246  float td_tod = (WaypointAlt(_af) - WaypointAlt(_td)) / glide_vspeed * (glide_airspeed - sqrt(wind_east*wind_east + wind_north*wind_north));
247  WaypointX(_tod) = WaypointX(_td) + td_af_x / td_af * td_tod;
248  WaypointY(_tod) = WaypointY(_td) + td_af_y / td_af * td_tod;
249  WaypointAlt(_tod) = WaypointAlt(_af);
250  return FALSE;
251 }
252 
253 
254 #include "generated/flight_plan.h"
255 
256 
257 #ifndef LINE_START_FUNCTION
258 #define LINE_START_FUNCTION {}
259 #endif
260 #ifndef LINE_STOP_FUNCTION
261 #define LINE_STOP_FUNCTION {}
262 #endif
263 
264 
265 
266 static inline void nav_follow(uint8_t _ac_id, float _distance, float _height) {
267  struct ac_info_ * ac = get_ac_info(_ac_id);
269  NavVerticalAltitudeMode(Max(ac->alt + _height, ground_alt+SECURITY_HEIGHT), 0.);
270  float alpha = M_PI/2 - ac->course;
271  float ca = cos(alpha), sa = sin(alpha);
272  float x = ac->east - _distance*ca;
273  float y = ac->north - _distance*sa;
274  fly_to_xy(x, y);
275 #ifdef NAV_FOLLOW_PGAIN
276  float s = (estimator_x-x)*ca+(estimator_y-y)*sa;
277  nav_ground_speed_setpoint = ac->gspeed + NAV_FOLLOW_PGAIN*s;
278  nav_ground_speed_loop();
279 #endif
280 }
281 
282 float nav_altitude = GROUND_ALT + MIN_HEIGHT_CARROT;
285 float nav_pitch; /* Rad */
286 float fp_pitch; /* deg */
287 
288 
295 bool_t nav_approaching_xy(float x, float y, float from_x, float from_y, float approaching_time) {
297  float pw_x = x - estimator_x;
299  float pw_y = y - estimator_y;
300 
301  dist2_to_wp = pw_x*pw_x + pw_y *pw_y;
302  float min_dist = approaching_time * estimator_hspeed_mod;
303  if (dist2_to_wp < min_dist*min_dist)
304  return TRUE;
305 
306  float scal_prod = (x - from_x) * pw_x + (y - from_y) * pw_y;
307 
308  return (scal_prod < 0.);
309 }
310 
311 
315 //static inline void fly_to_xy(float x, float y) {
316 void fly_to_xy(float x, float y) {
317  desired_x = x;
318  desired_y = y;
319  if (nav_mode == NAV_MODE_COURSE) {
321  if (h_ctl_course_setpoint < 0.)
322  h_ctl_course_setpoint += 2 * M_PI;
324  } else {
325  float diff = atan2(x - estimator_x, y - estimator_y) - estimator_hspeed_dir;
326  NormRadAngle(diff);
327  BoundAbs(diff,M_PI/2.);
328  float s = sin(diff);
329  h_ctl_roll_setpoint = atan(2 * estimator_hspeed_mod*estimator_hspeed_mod * s * h_ctl_course_pgain / (CARROT * NOMINAL_AIRSPEED * 9.81) );
332  }
333 }
334 
338 void nav_route_xy(float last_wp_x, float last_wp_y, float wp_x, float wp_y) {
339  float leg_x = wp_x - last_wp_x;
340  float leg_y = wp_y - last_wp_y;
341  float leg2 = Max(leg_x * leg_x + leg_y * leg_y, 1.);
342  nav_leg_progress = ((estimator_x - last_wp_x) * leg_x + (estimator_y - last_wp_y) * leg_y) / leg2;
343  nav_leg_length = sqrt(leg2);
344 
346  float carrot = CARROT * NOMINAL_AIRSPEED;
347 
348  nav_leg_progress += Max(carrot / nav_leg_length, 0.);
349  nav_in_segment = TRUE;
350  nav_segment_x_1 = last_wp_x;
351  nav_segment_y_1 = last_wp_y;
352  nav_segment_x_2 = wp_x;
353  nav_segment_y_2 = wp_y;
354  horizontal_mode = HORIZONTAL_MODE_ROUTE;
355 
356  fly_to_xy(last_wp_x + nav_leg_progress*leg_x +nav_shift*leg_y/nav_leg_length, last_wp_y + nav_leg_progress*leg_y-nav_shift*leg_x/nav_leg_length);
357 }
358 
360 
361 #ifndef FAILSAFE_HOME_RADIUS
362 #define FAILSAFE_HOME_RADIUS DEFAULT_CIRCLE_RADIUS
363 #endif
364 
365 static void nav_set_altitude(void) {
366  static float last_nav_altitude;
367  if (fabs(nav_altitude - last_nav_altitude) > 1.) {
368  flight_altitude = nav_altitude;
369  last_nav_altitude = nav_altitude;
370  }
372 }
373 
375 void nav_home(void) {
378  nav_pitch = 0.;
380  nav_altitude = ground_alt+SECURITY_HEIGHT;
384 }
385 
390 void nav_periodic_task(void) {
391  nav_survey_active = FALSE;
392 
394  dist2_to_wp = 0.;
395 
396  auto_nav(); /* From flight_plan.h */
397 
398  h_ctl_course_pre_bank = nav_in_circle ? circle_bank : 0;
399 
400 #ifdef AGR_CLIMB
403 #endif
404 
406 }
407 
408 
412 void nav_init(void) {
413  nav_block = 0;
414  nav_stage = 0;
415  ground_alt = GROUND_ALT;
416  nav_glide_pitch_trim = NAV_GLIDE_PITCH_TRIM;
417  nav_radius = DEFAULT_CIRCLE_RADIUS;
418  nav_survey_shift = 2*DEFAULT_CIRCLE_RADIUS;
419  nav_mode = NAV_MODE_COURSE;
420 
421 #ifdef NAV_GROUND_SPEED_PGAIN
422  nav_ground_speed_pgain = ABS(NAV_GROUND_SPEED_PGAIN);
423  nav_ground_speed_setpoint = NOMINAL_AIRSPEED;
424 #endif
425 }
426 
433 void nav_without_gps(void) {
436 
437 #ifdef SECTION_FAILSAFE
438  h_ctl_roll_setpoint = FAILSAFE_DEFAULT_ROLL;
439  nav_pitch = FAILSAFE_DEFAULT_PITCH;
440  nav_throttle_setpoint = TRIM_UPPRZ((FAILSAFE_DEFAULT_THROTTLE)*MAX_PPRZ);
441 #else
443  nav_pitch = 0;
444  nav_throttle_setpoint = TRIM_UPPRZ((V_CTL_AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE)*MAX_PPRZ);
445 #endif
446 }
447 
448 
449 /**************** 8 Navigation **********************************************/
450 
451 
452 enum eight_status { R1T, RT2, C2, R2T, RT1, C1 };
453 
455 void nav_eight_init( void ) {
456  eight_status = C1;
457 }
458 
467 void nav_eight(uint8_t target, uint8_t c1, float radius) {
468  float aradius = fabs(radius);
469  float alt = waypoints[target].a;
470  waypoints[c1].a = alt;
471 
472  float target_c1_x = waypoints[c1].x - waypoints[target].x;
473  float target_c1_y = waypoints[c1].y - waypoints[target].y;
474  float d = sqrt(target_c1_x*target_c1_x+target_c1_y*target_c1_y);
475  d = Max(d, 1.); /* To prevent a division by zero */
476 
477  /* Unit vector from target to c1 */
478  float u_x = target_c1_x / d;
479  float u_y = target_c1_y / d;
480 
481  /* Move [c1] closer if needed */
482  if (d > 2 * aradius) {
483  d = 2*aradius;
484  waypoints[c1].x = waypoints[target].x + d*u_x;
485  waypoints[c1].y = waypoints[target].y + d*u_y;
486  }
487 
488  /* The other center */
489  struct point c2 = {
490  waypoints[target].x - d*u_x,
491  waypoints[target].y - d*u_y,
492  alt };
493 
494  struct point c1_in = {
495  waypoints[c1].x + radius * -u_y,
496  waypoints[c1].y + radius * u_x,
497  alt };
498  struct point c1_out = {
499  waypoints[c1].x - radius * -u_y,
500  waypoints[c1].y - radius * u_x,
501  alt };
502 
503  struct point c2_in = {
504  c2.x + radius * -u_y,
505  c2.y + radius * u_x,
506  alt };
507  struct point c2_out = {
508  c2.x - radius * -u_y,
509  c2.y - radius * u_x,
510  alt };
511 
512  float qdr_out = M_PI - atan2(u_y, u_x);
513  if (radius < 0)
514  qdr_out += M_PI;
515 
516  switch (eight_status) {
517  case C1 :
518  NavCircleWaypoint(c1, radius);
519  if (NavQdrCloseTo(DegOfRad(qdr_out)-10)) {
520  eight_status = R1T;
521  InitStage();
522  }
523  return;
524 
525  case R1T:
526  nav_route_xy(c1_out.x, c1_out.y, c2_in.x, c2_in.y);
527  if (nav_approaching_xy(waypoints[target].x, waypoints[target].y, c1_out.x, c1_out.y, 0)) {
528  eight_status = RT2;
529  InitStage();
530  }
531  return;
532 
533  case RT2:
534  nav_route_xy(c1_out.x, c1_out.y, c2_in.x, c2_in.y);
535  if (nav_approaching_xy(c2_in.x, c2_in.y, c1_out.x, c1_out.y, CARROT)) {
536  eight_status = C2;
537  InitStage();
538  }
539  return;
540 
541  case C2 :
542  nav_circle_XY(c2.x, c2.y, -radius);
543  if (NavQdrCloseTo(DegOfRad(qdr_out)+10)) {
544  eight_status = R2T;
545  InitStage();
546  }
547  return;
548 
549  case R2T:
550  nav_route_xy(c2_out.x, c2_out.y, c1_in.x, c1_in.y);
551  if (nav_approaching_xy(waypoints[target].x, waypoints[target].y, c2_out.x, c2_out.y, 0)) {
552  eight_status = RT1;
553  InitStage();
554  }
555  return;
556 
557  case RT1:
558  nav_route_xy(c2_out.x, c2_out.y, c1_in.x, c1_in.y);
559  if (nav_approaching_xy(c1_in.x, c1_in.y, c2_out.x, c2_out.y, CARROT)) {
560  eight_status = C1;
561  InitStage();
562  }
563  return;
564 
565  default:/* Should not occur !!! Doing nothing */
566  return;
567  } /* switch */
568 }
569 
570 /************** Oval Navigation **********************************************/
571 
582 
583 void nav_oval_init( void ) {
584  oval_status = OC2;
585  nav_oval_count = 0;
586 }
587 
588 void nav_oval(uint8_t p1, uint8_t p2, float radius) {
589  radius = - radius; /* Historical error ? */
590 
591  float alt = waypoints[p1].a;
592  waypoints[p2].a = alt;
593 
594  float p2_p1_x = waypoints[p1].x - waypoints[p2].x;
595  float p2_p1_y = waypoints[p1].y - waypoints[p2].y;
596  float d = sqrt(p2_p1_x*p2_p1_x+p2_p1_y*p2_p1_y);
597 
598  /* Unit vector from p1 to p2 */
599  float u_x = p2_p1_x / d;
600  float u_y = p2_p1_y / d;
601 
602  /* The half circle centers and the other leg */
603  struct point p1_center = { waypoints[p1].x + radius * -u_y,
604  waypoints[p1].y + radius * u_x,
605  alt };
606  struct point p1_out = { waypoints[p1].x + 2*radius * -u_y,
607  waypoints[p1].y + 2*radius * u_x,
608  alt };
609 
610  struct point p2_in = { waypoints[p2].x + 2*radius * -u_y,
611  waypoints[p2].y + 2*radius * u_x,
612  alt };
613  struct point p2_center = { waypoints[p2].x + radius * -u_y,
614  waypoints[p2].y + radius * u_x,
615  alt };
616 
617  float qdr_out_2 = M_PI - atan2(u_y, u_x);
618  float qdr_out_1 = qdr_out_2 + M_PI;
619  if (radius < 0) {
620  qdr_out_2 += M_PI;
621  qdr_out_1 += M_PI;
622  }
623  float qdr_anticipation = (radius > 0 ? -15 : 15);
624 
625  switch (oval_status) {
626  case OC1 :
627  nav_circle_XY(p1_center.x,p1_center.y, -radius);
628  if (NavQdrCloseTo(DegOfRad(qdr_out_1)-qdr_anticipation)) {
629  oval_status = OR12;
630  InitStage();
632  }
633  return;
634 
635  case OR12:
636  nav_route_xy(p1_out.x, p1_out.y, p2_in.x, p2_in.y);
637  if (nav_approaching_xy(p2_in.x, p2_in.y, p1_out.x, p1_out.y, CARROT)) {
638  oval_status = OC2;
639  nav_oval_count++;
640  InitStage();
642  }
643  return;
644 
645  case OC2 :
646  nav_circle_XY(p2_center.x, p2_center.y, -radius);
647  if (NavQdrCloseTo(DegOfRad(qdr_out_2)-qdr_anticipation)) {
648  oval_status = OR21;
649  InitStage();
651  }
652  return;
653 
654  case OR21:
655  nav_route_xy(waypoints[p2].x, waypoints[p2].y, waypoints[p1].x, waypoints[p1].y);
656  if (nav_approaching_xy(waypoints[p1].x, waypoints[p1].y, waypoints[p2].x, waypoints[p2].y, CARROT)) {
657  oval_status = OC1;
658  InitStage();
660  }
661  return;
662 
663  default: /* Should not occur !!! Doing nothing */
664  return;
665  }
666 }
float estimator_hspeed_mod
module of horizontal ground speed in m/s
Definition: estimator.c:64
#define Min(x, y)
float h_ctl_course_setpoint
fixed wing horizontal adaptive control
int16_t pprz_t
Definition: paparazzi.h:6
float north
Definition: traffic_info.h:38
static float radius
Definition: chemotaxis.c:15
float x
Definition: hf_float.h:53
uint8_t lateral_mode
Definition: main_ap.c:112
float estimator_y
north position in meters
Definition: estimator.c:43
#define InitStage()
uint8_t nav_block
float dist2_to_home
Definition: common_nav.c:31
struct ac_info_ * get_ac_info(uint8_t id)
Definition: traffic_info.c:44
float estimator_hspeed_dir
direction of horizontal ground speed in rad (CW/North)
Definition: estimator.c:65
float east
Definition: traffic_info.h:37
#define FALSE
Definition: imu_chimu.h:141
uint8_t v_ctl_auto_throttle_submode
Definition: guidance_v.c:48
float alt
Definition: traffic_info.h:40
#define TRIM_UPPRZ(pprz)
Definition: paparazzi.h:14
#define Max(x, y)
#define V_CTL_MODE_AUTO_THROTTLE
Definition: guidance_v.h:36
Vertical control for fixed wing vehicles.
float wind_east
Definition: estimator.c:68
Device independent GPS code (interface)
static uint16_t c1
Definition: baro_MS5534A.c:197
#define V_CTL_MODE_AUTO_CLIMB
Definition: guidance_v.h:37
float course
Definition: traffic_info.h:39
float estimator_x
east position in meters
Definition: estimator.c:42
uint16_t stage_time
In s.
#define V_CTL_MODE_AUTO_ALT
Definition: guidance_v.h:38
float h_ctl_roll_max_setpoint
#define TRUE
Definition: imu_chimu.h:144
uint8_t nav_stage
float v_ctl_altitude_setpoint
in meters above MSL
Definition: guidance_v.c:38
float v_ctl_auto_throttle_cruise_throttle
Definition: guidance_v.c:55
float h_ctl_course_pre_bank
unsigned char uint8_t
Definition: types.h:14
float y
Definition: hf_float.h:57
float h_ctl_roll_setpoint
float h_ctl_course_pgain
float y
Definition: common_nav.h:38
#define V_CTL_AUTO_THROTTLE_STANDARD
Definition: guidance_v.h:57
State estimation, fusioning sensors.
float dist2_to_wp
Definition: common_nav.c:32
float wind_north
Definition: estimator.c:68
#define LATERAL_MODE_ROLL
Definition: autopilot.h:62
uint8_t v_ctl_mode
Definition: guidance_v.c:35
#define MAX_PPRZ
Definition: paparazzi.h:8
#define LATERAL_MODE_COURSE
Definition: autopilot.h:63
float gspeed
Definition: traffic_info.h:41
float x
Definition: common_nav.h:37
Informations relative to the other aircrafts.