POS value (lat/lon) drifting a lot, and crazy synthetic airspeed values

@VRquaeler the small changes in AHRS trim were done by me. In the first flight the plane seemed to nose down a little more than was ideal for cruising in FWBA, so I trimmed it up about 1 degree iirc, and tweaked the roll trim too.

I didn’t change the yaw alignment. The plane was pretty much motionless during the initialization stage. It launches from a dolly so it wasn’t even being moved around like it would be for a hand launch.

One unusual thing about this build is that the flight controller is mounted on the wall of the electronics area, instead of on the floor like I would usually do. The AHRS_ORIENTATION parameter is set to 22 which is “Yaw90Roll270”. This gave the correct responses in the HUD and for the control surfaces, and managed two flights with no strange behavior, but looking at it now I can’t picture how “Yaw90Roll270” fits with the mounting I have, unless these movements are backward to what I was thinking. That is to say, if I took the FC from the default orientation and rolled it 270 first, and then yawed it 90 it would match the mounted position. I couldn’t find any docs about how we’re supposed to interpret these descriptions.

Looking at the OSD footage from the good and bad flights, I notice that shortly after launch when I see the “EKF3 IMU0 yaw aligned” message, the heading jumps by only 3 degrees in the good flight, and in the bad flight it jumps by about 70 degrees. In the bad flight it returns to the same value it had before takeoff.

Here are clips of the pre-launch section for each flight.

Good flight:

Bad flight:

For reference, the concrete airstrip runs at about 70 degrees, so my direction of launch is about 65 degrees.

In both cases, the heading starts off near the default heading of north (eg. 356 degrees) after powerup and doesn’t change much until the plane is armed, at which point it shows “DCM active”, the heading jumps to about 260 and starts to slowly drift a little. I think this is probably normal right?
As soon as the takeoff roll starts, the heading jumps to the correct value of about 66 degrees, and continues to look correct for a while after lifting off.
After about 15 seconds the message “EKF3 IMU0 yaw aligned” appears and the heading changes again. In the good flight it jumps from 10 degrees to 7 degrees. In the bad flight it jumps from 64 to 356. In the other “not quite as bad” bad flight it jumped from 46 to 99 degrees.

In the good flight, the plane happened to be heading very close to north at the time of the first EKF alignment, so even if the value it jumped to was poorly calculated, it would still have been close to the correct value just by lucky chance. Maybe that helped make the good flight a success.

2 Likes

Hi Chris,

Have done very similar things ion the past. In general it’s not the issue as long as the changes are small, like in your case.

Just asking. I have flown with vertical oriented FC’s too. Regarding the log files this is not the issue. The accelero meter calibration values look OK.

Assuming the plane is your new “Twin Hopper” it’s unlikely to move the plane unintended.

Very good catch, I guess we come closer to the root cause.
A bad yaw alignment is sufficient to explain all the EKF madness.

By accident I discovered the yaw orientation of the plane while initializing can make a BIG difference. A plane without compass start to believe pointing to North after the initializing.
For planes (non VTOL fixed wing planes) without a compass I put them down pointing North before booting up. In general I get way more reliable flights keeping this procedure.

The other alternative is to add a compass.

For me the living in the Netherlands it’s often windy and the flight performance improvement especially in cross wind conditions was worth all the effort to have a healthy compass.

The compass has to be put in a place with lowest possible interference of power wires, magnets etc. The compass has to be calibrated properly.

Flying with a compass is still NO guaranty against all the DCM/EKF switching, especially in case of a bad (calibrated) compass.

To avoid the weird moments a compass check is part of the preflight checks. The yaw alignment of the plane and the Mag Field has to be within a expected and physical plausible range. On Mission Planner I have added this on the “Quick tab” see pic below.

There are other alternatives like flying with DCM only. Today I would not recommend this anymore.

PS: Keep going with your creative video’s. I got a lot of inspiration and new ideas watching your channel. Thank you!!!

Not sure if its related or not but I had a crash which destroyed my plane where I lost control and my YAW jumps to crazy value after "“EKF3 IMU0 yaw aligned” message.

Here is my thread: EKF3 Yaw alignment on V4.4 dev brought my plane down

I switched back to Plane 3.9.8 and had 4 trouble-free flights so far. So I think I will just stick with that, it does everything I need.

1 Like