mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 19:57:12 +08:00
local_position_estimator: Make optical flow data conversions consistent with uORB interface
This commit is contained in:
committed by
Lorenz Meier
parent
ae55c8d87c
commit
92f5211f55
@@ -86,11 +86,11 @@ int BlockLocalPositionEstimator::flowMeasure(Vector<float, n_y_flow> &y)
|
|||||||
//warnx("flow x: %10.4f y: %10.4f gyro_x: %10.4f gyro_y: %10.4f d: %10.4f",
|
//warnx("flow x: %10.4f y: %10.4f gyro_x: %10.4f gyro_y: %10.4f d: %10.4f",
|
||||||
//double(flow_x_rad), double(flow_y_rad), double(gyro_x_rad), double(gyro_y_rad), double(d));
|
//double(flow_x_rad), double(flow_y_rad), double(gyro_x_rad), double(gyro_y_rad), double(d));
|
||||||
|
|
||||||
// compute velocities in camera frame using ground distance
|
// compute velocities in body frame using ground distance
|
||||||
// assume camera frame is body frame
|
// note that the integral rates in the optical_flow uORB topic are RH rotations about body axes
|
||||||
Vector3f delta_b(
|
Vector3f delta_b(
|
||||||
|
+(flow_y_rad - gyro_y_rad)*d,
|
||||||
-(flow_x_rad - gyro_x_rad)*d,
|
-(flow_x_rad - gyro_x_rad)*d,
|
||||||
-(flow_y_rad - gyro_y_rad)*d,
|
|
||||||
0);
|
0);
|
||||||
|
|
||||||
// rotation of flow from body to nav frame
|
// rotation of flow from body to nav frame
|
||||||
|
|||||||
Reference in New Issue
Block a user