The optical-flow calibration rejected its result
What ArduPilot says:
- … scalar…:N.N too low (<N.N)
- … scalar…:N.N too high (>N.N)
- … scalar…:N.N fit:N.N too high (>N.N)
- … no better scalar…:N.N (fit:N.N > orig:N.N)
- FlowCal: failed to start
- … failed because of zero flow rate
Also explained here: 1 more
- … failed because no samples
The samples were collected, but the result was not accepted, and FLOW_FXSCALER and FLOW_FYSCALER stay as they were. “too low (<0.2)” or “too high (>4.0)”: the correction factor it found is outside 0.2 to 4.0, far more than a lens can explain. “fit … too high (>0.5)”: the samples disagree with each other. “no better scalar”: the best factor fits worse than the present setting. The x or y after “scalar” is the axis that failed.
What to do, most likely first
The sensor is mounted turned relative to the aircraft, so its axes or signs do not match.
CheckA factor that is negative or near zero (“too low”) means the flow moves the wrong way or on the other axis. In a log, compare OF.flowX with OF.bodyX while rolling: they should move together.
FixSet
FLOW_ORIENT_YAWto the sensor's rotation (in centidegrees: 9000 for 90° clockwise) and calibrate again.The rocking was too gentle, or mixed with yaw, so the samples are poor.
FixRock briskly in roll only, then in pitch only, without turning, until both axes reach 100%.
The sensor sees the ground badly: poor light, a plain or glossy floor, or too close to it.
FixCalibrate outdoors in daylight over grass or gravel, at the height the sensor's manual gives.
“FlowCal: failed to start”: the flight controller had no free memory for the calibrator.
FixReboot and try again; if it repeats, switch off features you do not use (scripting, extra logging).
In “fit … too high” the first number is not the factor that was just found: the code prints the previous value there. Read only the fit.
Parameters to look at
| Parameter | What it is |
|---|---|
FLOW_ORIENT_YAW | Flow sensor yaw alignment |
FLOW_FXSCALER | X axis optical flow scale factor correction |
FLOW_FYSCALER | Y axis optical flow scale factor correction |
FLOW_TYPE | Optical flow sensor type |
The code that sends it
… scalar…:N.N too low (<N.N)
libraries/AP_OpticalFlow/AP_OpticalFlow_Calibrator.cpp AP_OpticalFlow_Calibrator::calc_scalars() · Open in ArduPilot Copter-4.7.1
… scalar…:N.N too high (>N.N)
libraries/AP_OpticalFlow/AP_OpticalFlow_Calibrator.cpp AP_OpticalFlow_Calibrator::calc_scalars() · Open in ArduPilot Copter-4.7.1
… scalar…:N.N fit:N.N too high (>N.N)
libraries/AP_OpticalFlow/AP_OpticalFlow_Calibrator.cpp AP_OpticalFlow_Calibrator::calc_scalars() · Open in ArduPilot Copter-4.7.1
… no better scalar…:N.N (fit:N.N > orig:N.N)
libraries/AP_OpticalFlow/AP_OpticalFlow_Calibrator.cpp AP_OpticalFlow_Calibrator::calc_scalars() · Open in ArduPilot Copter-4.7.1
And 3 more messages, sent from the same places.