diff options
author | Nao Pross <np@0hm.ch> | 2024-03-29 21:28:21 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-03-29 21:31:36 +0100 |
commit | ec711e7fa1dd39727818915c8dc60cdadad8b09a (patch) | |
tree | cb480ff51db8f62400d4292675e2b77828cc7182 /uav_params.m | |
parent | Add MATLAB code (diff) | |
download | uav-ec711e7fa1dd39727818915c8dc60cdadad8b09a.tar.gz uav-ec711e7fa1dd39727818915c8dc60cdadad8b09a.zip |
Whitespace
Diffstat (limited to '')
-rw-r--r-- | uav_params.m | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/uav_params.m b/uav_params.m index fb9121f..dd0c101 100644 --- a/uav_params.m +++ b/uav_params.m @@ -5,11 +5,11 @@ function [params] = uav_params() % Unit of measurements unless specified otherwise are -% Mass in kg -% Lenghts in m -% Time in s -% Frequencies in Hz -% Angular velocities in rad / s +% Mass in kg +% Lenghts in m +% Time in s +% Frequencies in Hz +% Angular velocities in rad / s params = struct(); @@ -17,29 +17,29 @@ params = struct(); % Physical constants params.physics = struct(... - 'Gravity', 9.81, ... - 'AirDensity', 1.204 ... % kg / m^3 + 'Gravity', 9.81, ... + 'AirDensity', 1.204 ... % kg / m^3 ); % ------------------------------------------------------------------------ % Mechanical measurements params.mechanical = struct(... - 'Mass', 4.0, ... - 'DuctRadius', 46e-3, ... - 'DuctHeight', 171e-3, ... - 'FlapZDistance', 98e-3, ... % flap distance along z from center of mass - 'InertiaTensor', 5e-3 * eye(3), ... % TODO, assume diagonal - 'GyroscopicInertiaZ', 0 ... % assume no gyroscopic effects for now + 'Mass', 4.0, ... + 'DuctRadius', 46e-3, ... + 'DuctHeight', 171e-3, ... + 'FlapZDistance', 98e-3, ... % flap distance along z from center of mass + 'InertiaTensor', 5e-3 * eye(3), ... % TODO, assume diagonal + 'GyroscopicInertiaZ', 0 ... % assume no gyroscopic effects for now ); % ------------------------------------------------------------------------ % Actuator limits params.actuators = struct(... - 'TurbineMaxSpeed', 620.7, ... % In Hz - 'ServoAbsMaxAngleDeg', 25, ... % in Degrees - 'MeasurementDelay', 8e-3 ... % delay caused by sensor fusion algorithm + 'TurbineMaxSpeed', 620.7, ... % In Hz + 'ServoAbsMaxAngleDeg', 25, ... % in Degrees + 'MeasurementDelay', 8e-3 ... % delay caused by sensor fusion algorithm ); % ------------------------------------------------------------------------ @@ -53,10 +53,10 @@ F_max = 38.637; % in N (measured) k_T = sqrt(F_max / omega_max); params.aerodynamics = struct(... - 'ThrustOmegaProp', k_T, ... - 'FlapArea', 23e-3 * 10e-3 * 1.5, ... % FIXME factor 150% was chosen at random - 'DragCoefficients', [1, 1] .* 1e-3, ... % TODO - 'LiftCoefficient', 1e-3 ... % TODO + 'ThrustOmegaProp', k_T, ... + 'FlapArea', 23e-3 * 10e-3 * 1.5, ... % FIXME factor 150% was chosen at random + 'DragCoefficients', [1, 1] .* 1e-3, ... % TODO + 'LiftCoefficient', 1e-3 ... % TODO ); % ------------------------------------------------------------------------ @@ -71,11 +71,11 @@ k = params.aerodynamics.ThrustOmegaProp; omega_hover = sqrt(m * g / k); params.linearization = struct(... - 'Position', [0; 0; -3], ... % in inertial frame, z points down - 'Velocity', [0; 0; 0], ... % in inertial frame - 'Angles', [0; 0; 0], ... % in body frame - 'AngularVelocities', [0; 0; 0], ... % in body frame - 'Inputs', [0; 0; 0; 0; omega_hover] ... % Flaps at rest and turbine at X + 'Position', [0; 0; -3], ... % in inertial frame, z points down + 'Velocity', [0; 0; 0], ... % in inertial frame + 'Angles', [0; 0; 0], ... % in body frame + 'AngularVelocities', [0; 0; 0], ... % in body frame + 'Inputs', [0; 0; 0; 0; omega_hover] ... % Flaps at rest and turbine at X ); end
\ No newline at end of file |