Skip to content
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

Checking valid ranges of parameters #2260

Open
KimHyungSub opened this issue Jul 22, 2021 · 3 comments
Open

Checking valid ranges of parameters #2260

KimHyungSub opened this issue Jul 22, 2021 · 3 comments

Comments

@KimHyungSub
Copy link

  • Seen in version (release version or githash):
    Current master (adbada4)

Issue details:

Dear all,

While I tested some configuration parameters, I noticed that dRonin GCS does not enforces the valid ranges of parameters (e.g., VelocityKp, VelocityKi, AccKp, AccKi, etc.). Is there any place get the valid ranges of the parameters? Also, It would be awesome if the GCS enforces the parameters to have values within the valid ranges like what other flight control software already did :) Thanks!

@tracernz
Copy link
Member

It's been a few years so I'm very rusty, but... The UAVObjects are defined in XML. Each field can have a limits attribute that specifies the acceptable limits, and I think the UAV Object Browser will either stop, or highlight the value if you try to go outside the limits. Unfortunately the limits for the AltititudeHoldSettings UAV object were never specified by anyone: https://github.com/d-ronin/dRonin/blob/next/shared/uavobjectdefinition/altitudeholdsettings.xml. You can see an example of limits in https://github.com/d-ronin/dRonin/blob/next/shared/uavobjectdefinition/stabilizationsettings.xml#L16. The format for limits is somewhat documented in the GCS source code: https://github.com/d-ronin/dRonin/blob/next/ground/gcs/src/plugins/uavobjects/uavobjectfield.cpp#L136-L141

As for the limit values... they are PID gains, so there is no obvious limit.

@KimHyungSub
Copy link
Author

KimHyungSub commented Jul 22, 2021

@tracernz Thanks for the feedback.
I just checked the xml files. This is nice!
Yes, I agree that limiting PID gains is not obvious.
I mean that it will be great if assigning abnormal values (e.g., -999999999) can be prohibited by both users and the GCS. FYI, This was my bad. But, I unintentionally assigned such a strange value to a parameter and spent much time to figure out what was the problem.
If I want to limit the parameter myself, do you think specifying valid ranges on the XML files is the best way?

@tracernz
Copy link
Member

You could make the limits "BI-bigger" than 0 e.g. limits="%BI:0", for each of the gains in https://github.com/d-ronin/dRonin/blob/next/shared/uavobjectdefinition/altitudeholdsettings.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants