|
From: | Flavio Justino |
Subject: | Re: [Paparazzi-devel] PPRZ Complementary Filter |
Date: | Tue, 29 Dec 2015 18:27:21 +0000 |
Hi Flavio,I would like to know the following points, if it's possible:
- How the ahrs_align works and how lp_gyro, lp_accel and lp_mag are
calculated (is it the average of the sum of all the samples measured until
that moment?)Basically, yes... but it doesn't take all values, but just the ones during the period where the simple heuristic (using z-accel) says it's not moving...
- Where is the gyro information of ahrs_propagate put together with accel
info to generate the so called C.F? I can notice ahrs_propagate integrates
the gyro and that ahrs_update_accel uses accel measurements, but where is
the line of code that puts all of them together for roll and pitch
estimations?The accel update stores a measurement, which is used in the propagation to compute a residual and correct the attitude.
- Why is it made a rotation from IMU to BODY always after ahrs_init,
propagates, etc? Can't it be used always the estimations in IMU and only
make the final rotation to BODY after all calculations?That basically what is done. The attitude output is only written in propagate and then the body to imu correction is applied.However note that the euler version does not fully support large IMU to body rotatons, see https://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Complementary_Euler_.28fixed_point.29- Finally, I assume that the functions go in this order: Init, Align,
Propagate, update_accel, update_mag. Is that correct? If yes, what is the
name of the variable containing the final att estimations that are uploaded
to the estimator and sent to telemetry?Init first of course, then it is aligned when the aligner is done lowpassing the values.Propagate is the "main" function that integrates the gyros and applies the corrections,
but depending on the frequency that your accel and mag provide new measurements they might not come after every propagate...Especially the mag has a lower freq usually...Output (in v5.4) is in ahrs_impl.ltp_to_imu_euler, but that is rotated to body frame first before it's sent to the state interface:
https://github.com/paparazzi/paparazzi/blob/v5.4/sw/airborne/subsystems/ahrs/ahrs_int_cmpl_euler.c#L319Cheers, Felix
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
[Prev in Thread] | Current Thread | [Next in Thread] |