I’m using Mavproxy on a Linux Ubuntu virtualbox on Windows 7. And I’m connecting X Plane to mavproxy. When I try to use the arm throttle command it tells me I need to calibrate the 3d accelerometer, but how to I do the “hold plane level” procedure with x plane?
There’s no function in SITL to calibrate the accelerometer. Instead, the accelerometer offset parameters need to have small values to fool the preflight checks that a calibration has already been done.
There’s a parameters file for SITL in ./Tools/autotest/ArduPlane.parm in the Ardupilot source code. Use that for your parameters and you shouldn’t get the error.
I am running into the same problem too. Its preventing my mission basic python script from running because it gets stuck in waiting to initialize. The odd thing is I am only having this problem when x plane is running…
for example if I only run sim_vehicle.py and send my python script to sim_vehicle everyone is happy.
when I do the steps above but have x plane running i get this prearm 3d calibration problem
I am running everything on ubuntu so I downloaded qgroundcontrol
qground will connect automaticaly via 14550
find the parameters tab in qgroundcontrol
then set the following from the plane.parms file:
This at least got rid of 3d accel call needed and bad AHRS.
Now off to the next problem why my python app is stuck in waiting to initialize…
Okay, so I started digging around in the source, and I found a few things.
First, I had used a set of parameters from a post I found where the offsets where set to zero, and apparently it checks for this because exactly zero offsets are very rare. Then, I had changed the offsets to 0.001, which took care of that problem.
But, I added extra parameters because the SITL has an extra accelerometer that it is not using, and it turns out the code also checks to make sure that unused accelerometers have zero offsets, so the number 0.001 caused a problem. After I got rid of the parameters for the 3rd (unused) accelerometer, and set the offset to 0.001 for the 2 in use, this error went away.