bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
fixed_wing_trim.h
Go to the documentation of this file.
1
6
7#ifndef BITSIM_DYNAMICS_FIXED_WING_TRIM_H
8#define BITSIM_DYNAMICS_FIXED_WING_TRIM_H
9
10#include "bitsim/bitsim_types.h"
12
13#include <Eigen/Dense>
14
15#include <complex>
16#include <string>
17#include <vector>
18
19namespace bitsim::dynamics
20{
21
26{
27 FixedWingState state{FixedWingState::Zero()};
31 real_t beta{0.0};
33 bool converged{false};
34};
35
47FixedWingTrim trim_level_flight(const FixedWingParameters &parameters, real_t airspeed,
48 real_t altitude = 100.0, real_t heading = 0.0);
49
59
64
69{
70 std::string name;
71 std::complex<real_t> eigenvalue;
76};
77
82std::vector<FlightMode> flight_modes(const FixedWingLinearModel &model);
83
84} // namespace bitsim::dynamics
85
86#endif // BITSIM_DYNAMICS_FIXED_WING_TRIM_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
Models of how things move: wheeled robots, a bicycle, a quadrotor and a fixed wing aircraft,...
Definition bicycle_vehicle_model_dynamics.cpp:10
FixedWingTrim trim_level_flight(const FixedWingParameters &parameters, real_t airspeed, real_t altitude, real_t heading)
Find the controls for straight and level flight at the given airspeed, with no wind....
Definition fixed_wing_trim.cpp:108
UnalignedMat< real_t, 12, 1 > FixedWingState
The 12 values of the state of a fixed wing aircraft, in this order: the position (north,...
Definition fixed_wing_dynamics.h:19
FixedWingLinearModel linearise(const FixedWingParameters &parameters, const FixedWingTrim &trim)
Linearise the dynamics about a trim, by central differences.
Definition fixed_wing_trim.cpp:194
std::vector< FlightMode > flight_modes(const FixedWingLinearModel &model)
The classical modes: short period and phugoid from the longitudinal states (u, w, q,...
Definition fixed_wing_trim.cpp:218
Eigen::Matrix< T, N, M, Eigen::DontAlign|(N==1 &&M !=1 ? Eigen::RowMajor :Eigen::ColMajor)> UnalignedMat
General fixed size matrix that Eigen does not align. Use it for a fixed size member of a class that i...
Definition bitsim_types.h:74
double real_t
real_t
Definition bitsim_types.h:20
What the pilot or the autopilot sets.
Definition fixed_wing_dynamics.h:47
The motion near a trim, , with the controls in the order elevator, aileron, rudder,...
Definition fixed_wing_trim.h:55
UnalignedMat< real_t, 12, 12 > A
Definition fixed_wing_trim.h:56
UnalignedMat< real_t, 12, 4 > B
Definition fixed_wing_trim.h:57
The aircraft: its mass, its geometry, its aerodynamic coefficients, its propeller and motor,...
Definition fixed_wing_dynamics.h:73
A steady flight: the state and the controls that keep it.
Definition fixed_wing_trim.h:26
real_t airspeed
[m/s]
Definition fixed_wing_trim.h:29
real_t alpha
[rad]
Definition fixed_wing_trim.h:30
bool converged
Definition fixed_wing_trim.h:33
real_t residual
the largest acceleration left [m/s^2 or rad/s^2]
Definition fixed_wing_trim.h:32
FixedWingControls controls
Definition fixed_wing_trim.h:28
FixedWingState state
Definition fixed_wing_trim.h:27
real_t beta
[rad]
Definition fixed_wing_trim.h:31
A mode of the linearised motion.
Definition fixed_wing_trim.h:69
std::string name
Definition fixed_wing_trim.h:70
real_t time_constant
1 / |Re lambda| [s]; negative if the mode grows
Definition fixed_wing_trim.h:75
real_t damping
the damping ratio; for a real mode 1 if it decays
Definition fixed_wing_trim.h:73
real_t natural_frequency
[rad/s]
Definition fixed_wing_trim.h:72
std::complex< real_t > eigenvalue
Definition fixed_wing_trim.h:71
real_t period
of an oscillation [s]; 0 for a real mode
Definition fixed_wing_trim.h:74