Skip to content

Commit

Permalink
SITL: mount rangefinder 5cm above the ground
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Nov 9, 2023
1 parent cb01e35 commit e5d3095
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/SITL/SIM_Aircraft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

return altitude;
}

Expand Down

0 comments on commit e5d3095

Please sign in to comment.