-
Notifications
You must be signed in to change notification settings - Fork 17.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
SITL parameters documentation update #28053
Conversation
4edaa31
to
9a83319
Compare
|
||
// @Param: DRIFT_SPEED | ||
// @DisplayName: Gyro drift speed | ||
// @Description: Gyro drift rate of change in degrees/second/minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these really in minutes?! That's rather odd. Not saying you're wrong, but please make sure its right!
Also, we can put units into separate fields, like this:
// @Description: Gyro drift rate of change in degrees/second/minute | |
// @Description: Gyro drift rate of change | |
// @Units: deg/s/s |
Known units are here: https://github.com/ardupilot/ardupilot/blob/master/Tools/autotest/param_metadata/param.py#L66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed uncommon. I referred to the SITL.h
where the comment states: AP_Float drift_speed; // degrees/second/minute
Also, I see double minutes = fmod(AP_HAL::micros64() / 60.0e6, period); if (minutes < period/2) { return minutes * ToRad(sitl->drift_speed); } return (period - minutes) * ToRad(sitl->drift_speed);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
Sometimes the hard-to-believe things just make you do more work :-)
Tools/autotest/vehicle_test_suite.py
Outdated
"SIM_BAR2_DISABLE", # not listed in SITL.cpp | ||
"SIM_BAR2_DRIFT", # not referenced anywhere | ||
"SIM_BAR2_FREEZE", # not listed in SITL.cpp | ||
"SIM_BAR2_WCF_BAK", # not referenced anywhere |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in this list is used - we have a sanity check for that ;-)
In this case the parameters are coming from in here: https://github.com/ardupilot/ardupilot/blob/pr%2Fstop-using-python-is-python3/libraries/SITL/SITL.cpp#L589
Fixing this requires moving the BaroParm structure to a new file, probably SITL_Baro.cpp . @antholuo did the same thing to document airspeed by creating SITL_Airspeed.cpp, so use that as a model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I can follow the approach in #25005. Do you want that to be a separate PR or included in this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate PR makes sense. Makes these easy to review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
// @Param: DRIFT_SPEED | ||
// @DisplayName: Gyro drift speed | ||
// @Description: Gyro drift rate of change in degrees/second/minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
Sometimes the hard-to-believe things just make you do more work :-)
46763d6
to
7bb6241
Compare
SITL: vehicle_test_suite.py parameters removal from whitelist SITL: Add known unit amp hour SITL: Add known unit Ah Co-authored-by: Peter Barker <[email protected]>
7bb6241
to
d47a00f
Compare
Merged, thanks! |
Partially addressing #22903
Passed Sim helper check and CI check:
Will squash commits once approved.
@peterbarker