Flow Sensor Calibration Mistake?


I am trying to get my quad to loiter using a Px4Flow senor and a teraranger one rangefinder. Following the steps for installing both sensors onto the frame, the quad is unable to hold its position in Loiter mode. I suspect that it could possibly be the calibration of the optical flow sensor.

I have followed the steps for calibration of the px4flow, and I am not able to set my OF.flowX to match OF.bodyX or OF.flowY to match OF.bodyY as perfectly as in the example picture. They match in the general trend but on closer inspection, there will sometimes be spikes that oppose each other.

Also following the guide, I have focused the lens at an object 3m away. will the different focal length affect flow quality if I fly at a height lower than 3m? for example 1.5?

Could someone take a look at my logs to see if OF.flowX/Y matches OF.bodyX/Y sufficiently or if there are ways to improve my calibration, I look forward to listening to your advice!

13 02-Jan-00 9-57-02 AM.bin.log (3.2 MB)

You aren’t using the binary for the flow sensor recommended in the wiki. Here are my results for X and Y:

Vibration of the sensor and having the laser pointing at the part of the image used by the flow algorithm can also degrade quality.