paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Hidden bug


From: antoine drouin
Subject: Re: [Paparazzi-devel] Hidden bug
Date: Thu, 6 Feb 2014 22:44:53 +0100


On Thu, Feb 6, 2014 at 10:36 PM, antoine drouin <address@hidden> wrote:

On Thu, Feb 6, 2014 at 10:31 PM, antoine drouin <address@hidden> wrote:
You're welcome. Also if you want the natural pulsations and damping parameters to mean... what the usually mean, i would advise multiplying the error quaternion by 4.omega.xi rather than by 2.omega.xi

sorry, brainfart, i meant, multiply the error quaternion by 4.omega^2 rather than by 2.omega^2

ok, i guess i need sleep :) i meant by 2.omega^2 rather than by omega^2

so... that:
  struct FloatRates tmp1, tmp2;
  RATES_EWMULT(tmp1, stabilization.ref.m_two_xi_omega, stabilization.ref.rvel); 
  RATES_EWMULT(tmp2, stabilization.ref.m_two_omega_squared, *(struct FloatRates*)(&err_quat.qx)); 
  RATES_SUM(stabilization.ref.raccel, tmp1, tmp2);
or that
    def update(self, setpoint, dt):
        self.quat = pa.quat_integrate(self.quat, self.vel, dt)                                      # integrate attitude
        self.vel += dt*self.accel                                                                             # integrate rotational velocity
        err_quat = pa.quat_wrap_shortest(pa.quat_inv_comp(setpoint, self.quat))      # compute angular accelerations
        self.accel = -2.*self.xi*self.omega*self.vel\
                          -2.*self.omega*self.omega*err_quat[1:]
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]