CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/simulink/arducopter/sid_controller_validation_cfg.m
Views: 1799
1
% Configuration script for the control model validation
2
% Determines simulated and measured signals that are compared to validate
3
% the control model
4
%
5
% Fabian Bredemeier - IAV GmbH
6
% License: GPL v3
7
8
switch simMode
9
case 1 % Rate Controller
10
val_out_sig_names = {'RATE.ROut', 'RATE.POut', 'RATE.YOut'}; % Names of signals in the Ardupilot dataflash logs
11
val_out_sig_sim = {'rollRateCtrlOut', 'pitchRateCtrlOut', 'yawRateCtrlOut'}; % Names of the simulated signals
12
val_out_sig_meas = {'rollRateTotMeas', 'pitchRateTotMeas', 'yawRateTotMeas'}; % Names of the measured signals
13
val_in_sig_names = {'RATE.RDes', 'RATE.PDes', 'RATE.YDes'};
14
val_in_sig = {'<rollRateTar>', '<pitchRateTar>', '<yawRateTar>'};
15
case 2 % Attitude controller
16
val_out_sig_names = {'RATE.RDes','RATE.PDes', 'RATE.YDes'};
17
val_out_sig_sim = {'rollRateTar', 'pitchRateTar', 'yawRateTar'};
18
val_out_sig_meas = {'rollRateTarMeas','pitchRateTarMeas', 'yawRateTarMeas'};
19
val_in_sig_names = {'RCIN.C1', 'RCIN.C2', 'RCIN.C4'};
20
val_in_sig = {'rcinRoll', 'rcinPitch', 'rcinYaw'};
21
case 3 % z position controller
22
val_out_sig_names = {'CTUN.ThI', 'PSCD.TAD', 'PSCD.TVD'};
23
val_out_sig_sim = {'thrOut', 'zAccTar', 'zVelTar'};
24
val_out_sig_meas = {'thrInMeas', 'zAccTarMeas', 'zVelTarMeas'};
25
val_in_sig_names = {'PSCD.TAD', 'PSCD.TVD', 'PSCD.TPD'};
26
val_in_sig = {'zAccTar', 'zVelTar', 'zPosTar'};
27
end
28