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

Fix ArduPilot starting alt locations #23674

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

... simulation was starting off underground; this was causing an integer wrap in our simulated rangefinders, which was unpleasant.

@@ -555,6 +555,9 @@ float Aircraft::rangefinder_range() const
// Add some noise on reading
altitude += sitl->sonar_noise * rand_float();

// this rangefinder is mounted on the simulated frame, 5cm off the ground:
altitude += 0.05;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this jive with RNGFND1_GNDCLEAR?

@peterbarker peterbarker force-pushed the pr/fix-rangefinderdriver-test branch from d490b4e to 726d300 Compare August 9, 2023 22:01
Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing but one of the commits is missing its prefix, "adjust starting location alt"

@peterbarker peterbarker force-pushed the pr/fix-rangefinderdriver-test branch from 726d300 to 132aac0 Compare August 9, 2023 23:58
@peterbarker
Copy link
Contributor Author

Small thing but one of the commits is missing its prefix, "adjust starting location alt"

Fixed.

@magicrub
Copy link
Contributor

is this worth a 4.4.1 backport?

SITL was starting with a negative height-above-ground, which is very confusing
SITL was starting with a negative height-above-ground, which is very confusing
@peterbarker peterbarker force-pushed the pr/fix-rangefinderdriver-test branch from 132aac0 to e5d3095 Compare November 9, 2023 23:43
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

Successfully merging this pull request may close these issues.

4 participants