mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-10 01:44:00 -04:00
AP_OpticalFlow: Add noise to simulated sensor
This commit is contained in:
parent
8ac8c7285b
commit
9883b8757f
@ -91,8 +91,8 @@ void AP_OpticalFlow_SITL::update(void)
|
||||
// optical rates relative to X and Y sensor axes assuming no misalignment or scale
|
||||
// factor error. Note - these are instantaneous values. The sensor sums these values across the interval from the last
|
||||
// poll to provide a delta angle across the interface
|
||||
state.flowRate.x = -relVelSensor.y/range + gyro.x;
|
||||
state.flowRate.y = relVelSensor.x/range + gyro.y;
|
||||
state.flowRate.x = -relVelSensor.y/range + gyro.x + _sitl->flow_noise * rand_float();
|
||||
state.flowRate.y = relVelSensor.x/range + gyro.y + _sitl->flow_noise * rand_float();
|
||||
|
||||
// The flow sensors body rates are assumed to be the same as the vehicle body rates (ie no misalignment)
|
||||
// Note - these are instantaneous values. The sensor sums these values across the interval from the last
|
||||
|
Loading…
Reference in New Issue
Block a user