mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-10 06:59:54 +08:00
Update opticflow_calculator.c
This fixes that division by previous_frame_offset is now no longer ignored. Now if a user applies a longer horizon, the value is calculated as it should be.
This commit is contained in:
@@ -534,8 +534,8 @@ void calc_edgeflow_tot(struct opticflow_t *opticflow, struct opticflow_state_t *
|
||||
edgeflow.flow_x = -1 * edgeflow.flow_x;
|
||||
edgeflow.flow_y = -1 * edgeflow.flow_y;
|
||||
|
||||
result->flow_x = (int16_t)edgeflow.flow_x / previous_frame_offset[0];
|
||||
result->flow_y = (int16_t)edgeflow.flow_y / previous_frame_offset[1];
|
||||
edgeflow.flow_x = (int16_t)edgeflow.flow_x / previous_frame_offset[0];
|
||||
edgeflow.flow_y = (int16_t)edgeflow.flow_y / previous_frame_offset[1];
|
||||
|
||||
result->flow_x = (int16_t)edgeflow.flow_x / RES;
|
||||
result->flow_y = (int16_t)edgeflow.flow_y / RES;
|
||||
|
||||
Reference in New Issue
Block a user