pheidlauf / AeroBenchVV

Simulation and analysis tools for autonomous F-16 maneuvers as a V&V benchmark
GNU General Public License v3.0
63 stars 22 forks source link

p_s accel rate limit pass/fail condition has unit mismatch #6

Closed stanleybak closed 6 years ago

stanleybak commented 6 years ago

The rate limit check for ps_accel is as follows:

if(max_ps_accel > flightLimits.psMaxAccelDeg)

However, max_ps_accel is computed in radians / s / s... not degrees:

max_ps_accel = max(abs(ps_accels)); % rad/s/s

It's also unclear to me why the first element of ps_accels is assigned to 1... shouldn't this be zero? Otherwise, 1 rad / s / s is 57 degrees /s /s... so the computed minimum acceleration will never be below this.

ps_accels(1) = 1;
for i = 2:length(ps_hist)
    ps_accels(i) = (ps_hist(i) - ps_hist(i-1))/(time(i) - time(i-1));
end
pheidlauf commented 6 years ago

Fixed!