I read the codes of ArduPlane in the AP_InertialSensor_MPU6000.CPP.I can't understand that how the DLPF filter work?I need your help.
       The sample rate used for plane is RATE_50HZ  and the DLPF filter rate is 10Hz .  I read the code file and found some codes are related to these.    
        Firstly in the function of  " AP_InertialSensor_MPU6000::hardware_init(Sample_rate sample_rate) " I found the codes
     " _set_filter_register(_mpu6000_filter, default_filter)"
 
       Secondly,In the member function of "bool AP_InertialSensor_MPU6000::update( void )",I found the codes
     " if (_last_filter_hz != _mpu6000_filter) {
        if (_spi_sem->take(10)) {
            _set_filter_register(_mpu6000_filter, 0);
            _spi_sem->give();
        }
    }"
 
 
        In my mind, the DLPF  filter work as the formulation:
      Yn=a*Xn+(1-a)*Yn-1
       I could not find the formulation be used in the code?Could anybody help me?Thanks.
     
          
 
     
 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    Zheng,

        That filtering is all done in the MPU6k filter itself.  So you won't find the DLPF in the arducopter or arduplane software.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…