diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-10-31 11:42:46 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-10-31 11:42:46 +0100 |
commit | 739c407cfd14d065b104977924875b3ee40d5e25 (patch) | |
tree | f8cdb5728a2d43638b820a0bfe787542c1448bdf /src/examples | |
parent | 078e81a5cb6a0558eea9e589595889d1aad0cbe7 (diff) | |
download | px4-firmware-739c407cfd14d065b104977924875b3ee40d5e25.tar.gz px4-firmware-739c407cfd14d065b104977924875b3ee40d5e25.tar.bz2 px4-firmware-739c407cfd14d065b104977924875b3ee40d5e25.zip |
Fix flow example
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/flow_position_estimator/flow_position_estimator_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/flow_position_estimator/flow_position_estimator_main.c b/src/examples/flow_position_estimator/flow_position_estimator_main.c index c775428ef..0b8c01f79 100644 --- a/src/examples/flow_position_estimator/flow_position_estimator_main.c +++ b/src/examples/flow_position_estimator/flow_position_estimator_main.c @@ -308,8 +308,8 @@ int flow_position_estimator_thread_main(int argc, char *argv[]) if (vehicle_liftoff || params.debug) { /* copy flow */ - flow_speed[0] = flow.flow_comp_x_m; - flow_speed[1] = flow.flow_comp_y_m; + flow_speed[0] = flow.pixel_flow_x_integral / (flow.integration_timespan / 1e6f) * flow.ground_distance_m; + flow_speed[1] = flow.pixel_flow_y_integral / (flow.integration_timespan / 1e6f) * flow.ground_distance_m; flow_speed[2] = 0.0f; /* convert to bodyframe velocity */ |