MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / get_delta_angle

Method get_delta_angle

libraries/AP_WheelEncoder/AP_WheelEncoder.cpp:278–289  ·  view source on GitHub ↗

get total delta angle (in radians) measured by the wheel encoder

Source from the content-addressed store, hash-verified

276
277// get total delta angle (in radians) measured by the wheel encoder
278float AP_WheelEncoder::get_delta_angle(uint8_t instance) const
279{
280 // for invalid instances return zero
281 if (instance >= WHEELENCODER_MAX_INSTANCES) {
282 return 0.0f;
283 }
284 // protect against divide by zero
285 if (_counts_per_revolution[instance] == 0) {
286 return 0.0f;
287 }
288 return M_2PI * state[instance].distance_count / _counts_per_revolution[instance];
289}
290
291// get the total distance traveled in meters
292float AP_WheelEncoder::get_distance(uint8_t instance) const

Callers 8

readDeltaAngleMethod · 0.45
readVehicleDeltaAngleMethod · 0.45
readDeltaAngleMethod · 0.45
matrix_updateMethod · 0.45
update_wheel_encoderMethod · 0.45
log_dataMethod · 0.45
log_dataMethod · 0.45
can_imu_updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected