mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
This commit is contained in:
@@ -204,12 +204,12 @@ function display_adaptation()
|
||||
|
||||
subplot(2,3,1);
|
||||
plot2d(fdm_time, adp_y(1,:), 3);
|
||||
plot2d(fdm_time, fdm_Ct0/fdm_mass*ctl_u(CTL_UT,:), 2);
|
||||
// plot2d(fdm_time, fdm_Ct0/fdm_mass*ctl_u(CTL_UT,:), 2);
|
||||
legends(["y1", "ut"],[3 2], with_box=%f, opt="ul");
|
||||
xtitle('apd_y1');
|
||||
|
||||
subplot(2,3,2);
|
||||
plot2d(fdm_time, fdm_Ct0/fdm_mass*ones(1,length(time)),3);
|
||||
// plot2d(fdm_time, fdm_Ct0/fdm_mass*ones(1,length(time)),3);
|
||||
plot2d(fdm_time, adp_est(ADP_EST_A,:), 2);
|
||||
xtitle('adp_est A');
|
||||
|
||||
@@ -220,12 +220,12 @@ function display_adaptation()
|
||||
|
||||
subplot(2,3,4);
|
||||
plot2d(fdm_time, adp_y(2,:), 3);
|
||||
plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*adp_ud_f, 2);
|
||||
// plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*adp_ud_f, 2);
|
||||
legends(["y2", "udf"],[3 2], with_box=%f, opt="ul");
|
||||
xtitle('ud_f');
|
||||
|
||||
subplot(2,3,5);
|
||||
plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*ones(1, length(time)),3);
|
||||
// plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*ones(1, length(time)),3);
|
||||
plot2d(fdm_time, adp_est(ADP_EST_B,:), 2);
|
||||
xtitle('adp_est B');
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ FDM_MOTOR_LEFT = 2;
|
||||
FDM_MOTOR_NB = 2;
|
||||
|
||||
fdm_g = 9.81;
|
||||
fdm_mass = 0.25;
|
||||
fdm_mass = 0.5;
|
||||
fdm_inertia = 0.0078;
|
||||
fdm_la = 0.25; // arm length
|
||||
|
||||
fdm_Ct0 = 4. * fdm_mass * fdm_g / 2; // thrust coefficient
|
||||
fdm_V0 = 1e9; //
|
||||
//fdm_Ct0 = 4. * fdm_mass * fdm_g / 2; // thrust coefficient
|
||||
//fdm_V0 = 1e9; //
|
||||
fdm_Cd = 1e-9; // drag coefficient
|
||||
|
||||
fdm_min_thrust = 0.05; // 5%
|
||||
|
||||
@@ -28,8 +28,8 @@ if 1
|
||||
max_speed = [ 5 2.5];
|
||||
max_accel = [ 9.81*tan(rad_of_deg(30)) 0.5*9.81];
|
||||
b0 = [-5 0];
|
||||
b1 = [ 5 -5];
|
||||
b2 = [ 0 -5];
|
||||
b1 = [ 5 0];
|
||||
b2 = [ 0 0];
|
||||
[fo_traj1] = sbb_gen_traj(time1, dyn, max_speed, max_accel, b0, b1);
|
||||
b1 = [fo_traj1(1,1,$) fo_traj1(2,1,$)];
|
||||
[fo_traj2] = sbb_gen_traj(time2, dyn, max_speed, max_accel, b1, b2);
|
||||
@@ -41,9 +41,11 @@ end
|
||||
|
||||
fdm_init(time, df_state_of_fo(fo_traj(:,:,1)), [0.25 0.25]');
|
||||
|
||||
global fdm_perturb;
|
||||
k=find(time > 5 & time < 5.05);
|
||||
fdm_perturb(FDM_AX,k) = 10*ones(1,length(k));
|
||||
if 0
|
||||
global fdm_perturb;
|
||||
k=find(time > 5 & time < 5.05);
|
||||
fdm_perturb(FDM_AX,k) = 10*ones(1,length(k));
|
||||
end
|
||||
|
||||
ctl_init(time);
|
||||
adp_init(time, [19.5 157]', []);
|
||||
|
||||
Reference in New Issue
Block a user