← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The optical-flow calibration rejected its result

WarningRangefinder, optical flow, camera, OSD and other devices

What ArduPilot says:

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

  1. 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_YAW to the sensor's rotation (in centidegrees: 9000 for 90° clockwise) and calibrate again.

  2. 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%.

  3. 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.

  4. “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

ParameterWhat it is
FLOW_ORIENT_YAWFlow sensor yaw alignment
FLOW_FXSCALERX axis optical flow scale factor correction
FLOW_FYSCALERY axis optical flow scale factor correction
FLOW_TYPEOptical 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.

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer