Why duplicated parameter exists?

Hello everyone
I realise that in “Docs » Advanced Configuration » Complete Parameter List” http://ardupilot.org/copter/docs/parameters.html

There are two ATC_RAT_RLL_FILT, two ATC_RAT_PIT_FILT and two ATC_RAT_yaw_FILT setting items. And the range of the parameters are different. Why ?

Thanks a lot

This is an artifact of how the list is automatically generated, as the script grabs both the trad-heli and multicopter params. If you know how to fix it, would be awesome!
In the actual firmware the duplication doesn’t occur.

Where is the script that generates the parameters documentation?

Replying to myself…looks like Tools/autotest/param_metadata/param_parse.py, but when I run that, the generated Parameters.rst doesn’t have the duplicate entries.

https://github.com/ArduPilot/ardupilot/blob/master/Tools/scripts/build_parameters.sh

The other problem is that identically named parameters appear to have different sets of valid values between the different vehicle types. E.g., ATC_RAT_RLL_FILT in AC_AttitudeControl_Multi has a range of 1-100, but in AC_AttitudeControl_Heli has a range of 1-20. Not clear how to handle this situation.

And there in lies the problem :slight_smile:

I think we might have to restructure how the list is rendered into the page, and have the reader select ‘heli’ or ‘multi’.

That’s still going to be tricky, the way the parsing currently works. E.g., we have, in ArduCopter/Parameters.cpp:

// @Group: ATC_
// @Path: ../libraries/AC_AttitudeControl/AC_AttitudeControl.cpp,../libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp,../libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp

We would need some way of indicating “this file is for vehicle subtype heli and this file is for vehicle subtype multi”. Prefix tags on the paths? Like:

@Path: ../libraries/AC_AttitudeControl/AC_AttitudeControl.cpp,multi:../libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp,heli:../libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp

Then we could display the documentation like this:


ATC_RAT_RLL_FILT: Roll axis rate controller input frequency in Hz

Roll axis rate controller input frequency in Hz

Multi

  • Range: 1 100

  • Increment: 1

  • Units: Hz

Heli

  • Range: 1 20

  • Increment: 1

  • Units: Hz

1 Like

that would be really useful: unfortunately I don’t have the skills to do it!
I’m pretty sure that there is an open issue for this in github. Will try to find it and link this thread to it.

I have submitted a simpler solution that gives the duplicates a slightly different heading and reference. It is by no means perfect, but it does fix the broken links and allow the different variants to be differentiated. Could easily be reverted if someone comes up with a better solution.

2 Likes