bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
fixed_wing_lqr_mpc Namespace Reference

Classes

struct  Track
struct  FixedWingControls
 What the pilot or the autopilot sets. More...
class  FixedWingDynamics
 The 6-DOF flight dynamics of a fixed wing aircraft, with its landing gear on a flat ground at down = 0. More...
struct  FixedWingParameters
 The aircraft: its mass, its geometry, its aerodynamic coefficients, its propeller and motor, and its landing gear. aerosonde() gives the small UAV of Beard and McLain. More...

Typedefs

using index_t
 The type Eigen indexes and sizes matrices and vectors with.
using real_t
 real_t
using uint_t
 uint_t
using Matrix
 The matrices of the linear models and the controllers.
using Vector
 The vectors of the linear models and the controllers: states, inputs.

Functions

Vector controls_vector (const FixedWingControls &c)
FixedWingControls to_controls (const Vector &u)
Vector deviation (const FixedWingDynamics &aircraft, const bitsim::dynamics::FixedWingTrim &trim, real_t heading_ref, real_t altitude_ref)
void record_track (Track &track, const FixedWingDynamics &a)
cv::Mat draw (const std::vector< Track > &tracks, uint_t k, real_t sample_period)
void record (const std::vector< Track > &tracks, const std::string &directory, real_t sample_period)

Variables

const real_t PI = 3.14159265358979323846
const real_t DEG = PI / 180.0
const real_t STEP = 0.01
const real_t CONTROL_PERIOD = 0.05
const real_t AIRSPEED = 25.0
const real_t ALTITUDE = 100.0
const real_t TURN_AT = 5.0
const real_t CLIMB_AT = 30.0
const real_t DURATION = 60.0
const uint_t HORIZON = 60
const real_t MAX_BANK = 25.0 * DEG
const real_t MAX_PITCH = 15.0 * DEG
const real_t PENALTY = 2.0e4
const real_t RECORD_RATE = 10.0
const std::array< int, 10 > STATES
const std::array< cv::Scalar, 3 > COLOURS

Typedef Documentation

◆ index_t

The type Eigen indexes and sizes matrices and vectors with.

◆ Matrix

The matrices of the linear models and the controllers.

◆ real_t

◆ uint_t

◆ Vector

The vectors of the linear models and the controllers: states, inputs.

Function Documentation

◆ controls_vector()

Vector fixed_wing_lqr_mpc::controls_vector ( const FixedWingControls & c)

◆ deviation()

Vector fixed_wing_lqr_mpc::deviation ( const FixedWingDynamics & aircraft,
const bitsim::dynamics::FixedWingTrim & trim,
real_t heading_ref,
real_t altitude_ref )

◆ draw()

cv::Mat fixed_wing_lqr_mpc::draw ( const std::vector< Track > & tracks,
uint_t k,
real_t sample_period )

◆ record()

void fixed_wing_lqr_mpc::record ( const std::vector< Track > & tracks,
const std::string & directory,
real_t sample_period )

◆ record_track()

void fixed_wing_lqr_mpc::record_track ( Track & track,
const FixedWingDynamics & a )

◆ to_controls()

FixedWingControls fixed_wing_lqr_mpc::to_controls ( const Vector & u)

Variable Documentation

◆ AIRSPEED

const real_t fixed_wing_lqr_mpc::AIRSPEED = 25.0

◆ ALTITUDE

const real_t fixed_wing_lqr_mpc::ALTITUDE = 100.0

◆ CLIMB_AT

const real_t fixed_wing_lqr_mpc::CLIMB_AT = 30.0

◆ COLOURS

const std::array<cv::Scalar, 3> fixed_wing_lqr_mpc::COLOURS
Initial value:
{cv::Scalar(60, 60, 220), cv::Scalar(200, 120, 30),
cv::Scalar(40, 150, 40)}

◆ CONTROL_PERIOD

const real_t fixed_wing_lqr_mpc::CONTROL_PERIOD = 0.05

◆ DEG

const real_t fixed_wing_lqr_mpc::DEG = PI / 180.0

◆ DURATION

const real_t fixed_wing_lqr_mpc::DURATION = 60.0

◆ HORIZON

const uint_t fixed_wing_lqr_mpc::HORIZON = 60

◆ MAX_BANK

const real_t fixed_wing_lqr_mpc::MAX_BANK = 25.0 * DEG

◆ MAX_PITCH

const real_t fixed_wing_lqr_mpc::MAX_PITCH = 15.0 * DEG

◆ PENALTY

const real_t fixed_wing_lqr_mpc::PENALTY = 2.0e4

◆ PI

const real_t fixed_wing_lqr_mpc::PI = 3.14159265358979323846

◆ RECORD_RATE

const real_t fixed_wing_lqr_mpc::RECORD_RATE = 10.0

◆ STATES

const std::array<int, 10> fixed_wing_lqr_mpc::STATES
Initial value:
{fw::PD, fw::U, fw::V, fw::W, fw::PHI,
fw::THETA, fw::PSI, fw::P, fw::Q, fw::R}

◆ STEP

const real_t fixed_wing_lqr_mpc::STEP = 0.01

◆ TURN_AT

const real_t fixed_wing_lqr_mpc::TURN_AT = 5.0