-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
analog_battery: add option for filter #23987
base: main
Are you sure you want to change the base?
Conversation
What about tuning the existing filters already in Battery (AnalogBattery inherits) instead? PX4-Autopilot/src/lib/battery/battery.cpp Lines 56 to 59 in cdc6fc4
|
cdc6fc4
to
a0196ae
Compare
I would do this with an actual AlphaFilter. PX4-Autopilot/src/lib/battery/battery.h Line 168 in cdc6fc4
I can help you do it quickly if it's not clear. |
a0196ae
to
8bd9e34
Compare
With the Alpha filter. https://review.px4.io/plot_app?log=31640ae9-2d42-49f3-bc9e-4a72b844fc05 |
I can probably use a much shorter filter window. |
8bd9e34
to
0c53dac
Compare
0c53dac
to
1484982
Compare
@dagar any more input? |
1484982
to
42f705b
Compare
42f705b
to
3dfb36e
Compare
Updated with the new per update dt. |
This adds the option to filter the adc output of voltage and current.
When pulling voltage from the on board voltage divider and current from an ESC current shunt, the noise can be very high.
https://review.px4.io/plot_app?log=96629307-87c9-4f68-a112-b49e2abe34ac#Nav-Power
Raw voltage vs moving average of 10.
Raw current vs on board battery lib average current. And ESC reported current from the same shunt vs moving average of 25.