A calculation produced something that is not a number
What ArduPilot says:
- Internal errors 0x400 (constraining_nan)
- Internal errors 0x20000000 (invalid_arg_or_result)
constraining_nan: the routine that keeps a value between a minimum and a maximum was given “not a number” (NaN), the result of an impossible calculation such as zero divided by zero. It returns the middle of the range instead, and the l: number is the line that asked. invalid_arg_or_result: a maths routine (the path planner, the speed and acceleration shaping, a PID controller, a filter set-up) was given an impossible input, such as a limit of zero or below or a negative time step, or its result was not a number.
What to do, most likely first
A speed, acceleration, jerk or filter parameter is zero or negative where it has to be positive.
CheckParameter Compare & Migrate lists what differs from the defaults: look for zeros among the navigation and position-control values.
FixPut the value back inside the range its description gives, and reboot.
The position and attitude estimate (the EKF) or a sensor gave an impossible value.
CheckIn the log, look just before the ERR line for EKF or sensor messages and for values that jump to huge numbers.
FixFind and fix that first fault; this error is its consequence.
A bug in the firmware.
FixIf neither of the above fits, report the whole line (the l: number matters) with the log.
Do not fly until it is explained: for at least one moment the controller worked with a made-up number.
Where to do it:Setup & Tuning GuideParameter Compare & Migrate