|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Reference generation for horizontal guidance. More...
#include "inttypes.h"#include "math/pprz_algebra.h"#include "math/pprz_algebra_int.h"#include "math/pprz_algebra_float.h"#include "generated/airframe.h"Go to the source code of this file.
Data Structures | |
| struct | GuidanceHRef |
Macros | |
| #define | GUIDANCE_H_REF_MAX_SPEED 5. |
| Default speed saturation. | |
| #define | GUIDANCE_H_REF_MAX_ACCEL 5.66 |
| Accel saturation. | |
| #define | GH_POS_REF_FRAC 37 |
| fixedpoint representation: Q26.37 will give a range of 67e3 km and a resolution of 1.5e-11 m. | |
Functions | |
| void | gh_ref_init (void) |
| void | gh_set_ref (struct Int32Vect2 pos, struct FloatVect2 speed, struct FloatVect2 accel) |
| void | gh_update_ref_from_pos_sp (struct Int32Vect2 pos_sp) |
| void | gh_update_ref_from_speed_sp (struct FloatVect2 speed_sp) |
| void | gh_update_ref_from_accel_sp (struct FloatVect2 accel_sp) |
| float | gh_set_max_speed (float max_speed) |
| Set a new maximum speed for waypoint navigation. | |
| float | gh_set_tau (float tau) |
| float | gh_set_omega (float omega) |
| float | gh_set_zeta (float zeta) |
Variables | |
| float | gh_max_speed |
| Current maximum speed for waypoint navigation. | |
| struct GuidanceHRef | gh_ref |
Reference generation for horizontal guidance.
Definition in file guidance_h_ref.h.
| struct GuidanceHRef |
Definition at line 60 of file guidance_h_ref.h.
| Data Fields | ||
|---|---|---|
| struct FloatVect2 | accel |
Reference model acceleration. in meters/sec2 (output) |
| float | dt | Integration timestep. |
| float | inv_tau | |
| float | max_speed |
Current maximum speed for waypoint navigation. Defaults to GUIDANCE_H_REF_MAX_SPEED |
| float | omega | second order model natural frequency |
| float | omega_2 | |
| struct Int64Vect2 | pos |
Reference model position. in meters with fixedpoint representation: Q37.26 |
| struct FloatVect2 | speed |
Reference model speed. in meters/sec accuracy 0.0000076 , range 16384m/s |
| float | tau | first order time constant |
| float | zeta | second order model damping |
| float | zeta_omega | |
| #define GH_POS_REF_FRAC 37 |
fixedpoint representation: Q26.37 will give a range of 67e3 km and a resolution of 1.5e-11 m.
At a rate of 500Hz, a ref speed of 7.3e-9 m/s could still update the position.
Definition at line 58 of file guidance_h_ref.h.
Referenced by gh_set_ref(), gh_update_ref_from_accel_sp(), gh_update_ref_from_pos_sp(), gh_update_ref_from_speed_sp(), and guidance_h_update_reference().
| #define GUIDANCE_H_REF_MAX_ACCEL 5.66 |
| #define GUIDANCE_H_REF_MAX_SPEED 5. |
Default speed saturation.
Definition at line 39 of file guidance_h_ref.h.
Referenced by gh_ref_init(), and read_rc_setpoint_speed_i().
|
extern |
Definition at line 51 of file guidance_h_ref.c.
References gh_ref, gh_set_max_speed(), gh_set_tau(), GUIDANCE_H_REF_MAX_SPEED, GUIDANCE_H_REF_OMEGA, GUIDANCE_H_REF_TAU, and GUIDANCE_H_REF_ZETA.
Referenced by guidance_h_init().
|
extern |
Set a new maximum speed for waypoint navigation.
| max_speed | speed saturation in m/s |
Definition at line 63 of file guidance_h_ref.c.
References gh_ref, GuidanceHRef::max_speed, and Min.
Referenced by gh_ref_init(), and guidance_h_SetMaxSpeed().
|
extern |
Definition at line 78 of file guidance_h_ref.c.
References gh_ref, and GuidanceHRef::omega.
Referenced by guidance_h_SetOmega().
|
extern |
Definition at line 95 of file guidance_h_ref.c.
References GH_POS_REF_FRAC, gh_ref, INT32_POS_FRAC, VECT2_COPY, Int32Vect2::x, Int64Vect2::x, Int32Vect2::y, and Int64Vect2::y.
Referenced by guidance_h_update_reference(), and reset_guidance_reference_from_current_position().
|
extern |
Definition at line 70 of file guidance_h_ref.c.
References gh_ref, and GuidanceHRef::tau.
Referenced by gh_ref_init(), and guidance_h_SetTau().
|
extern |
Definition at line 87 of file guidance_h_ref.c.
References gh_ref, and GuidanceHRef::zeta.
Referenced by guidance_h_SetZeta().
|
extern |
Definition at line 170 of file guidance_h_ref.c.
References GH_POS_REF_FRAC, gh_ref, gh_saturate_accel(), LBFP_OF_REAL, VECT2_ADD, VECT2_COPY, VECT2_SMUL, FloatVect2::x, Int64Vect2::x, FloatVect2::y, and Int64Vect2::y.
Referenced by guidance_h_update_reference().
|
extern |
Definition at line 105 of file guidance_h_ref.c.
References GH_POS_REF_FRAC, gh_ref, gh_saturate_accel(), gh_saturate_speed(), INT32_POS_FRAC, LBFP_OF_REAL, POS_FLOAT_OF_BFP, VECT2_ADD, VECT2_COPY, VECT2_DIFF, VECT2_SMUL, FloatVect2::x, Int32Vect2::x, Int64Vect2::x, FloatVect2::y, Int32Vect2::y, and Int64Vect2::y.
Referenced by guidance_h_update_reference().
|
extern |
Definition at line 143 of file guidance_h_ref.c.
References GH_POS_REF_FRAC, gh_ref, gh_saturate_accel(), LBFP_OF_REAL, speed_sp, VECT2_ADD, VECT2_COPY, VECT2_DIFF, VECT2_SMUL, FloatVect2::x, Int64Vect2::x, FloatVect2::y, and Int64Vect2::y.
Referenced by guidance_h_update_reference().
|
extern |
Current maximum speed for waypoint navigation.
Defaults to GUIDANCE_H_REF_MAX_SPEED
|
extern |
Definition at line 30 of file guidance_h_ref.c.
Referenced by gh_ref_init(), gh_saturate_speed(), gh_set_max_speed(), gh_set_omega(), gh_set_ref(), gh_set_tau(), gh_set_zeta(), gh_update_ref_from_accel_sp(), gh_update_ref_from_pos_sp(), gh_update_ref_from_speed_sp(), and guidance_h_update_reference().