GPS heading slightly off

Right… sorry for any confusion I created @dkemxr… By GPS I meant the GPS module, which houses the external compass as well. If this was mounted backwards, and it was set as the primary and given no mouting rotation, wouldn’t AP think that the FC is facing the same way as the external compass but in reality it isn’t (its opposite) and this is why the roll values are inverted (AP is treating the FC and AHRS as facing one way but it’s actually the opposite.

But now that you mention that the Accelerometer is used to display pitch and roll, like you said it may not be affected. Just curious, how exactly are the accels used to measure oreintation? Is it by using gravity as a reference? Sorry for my ignorance of this fact… I assumed the gyros were used.

When you say GPS error, are you talking about the heading error that you described before? Is the GPS location correct?

The roll is actually correct, I just completely blanked, it was actually correct all along. When I say the GPS is slightly off, the location is correct, however the heading is off by about 30 degrees, and it varies which side is off. Sometimes its 30 degrees too far to the right, and sometimes to the left. However the movement is correct; if I turn the craft to the left, it will indicate that the turned to the left, but the heading is still about 30 degrees off. It moved the correct amount I told it to move though. I hope that’s a little clearer :slight_smile:

The yaw direction has nothing to do with GPS - but with the compass inside of the GPS module and the compasses within your Pixhawk. Can you please send a screenshot of what your compass calibration screen looks like in MP?

Okay, that makes sense, is this what you would like to see?

Should I try re-doing the compass calibration?

Yes, thanks for the picture. Please re-attempt compass calibration (ideally outside away from all metal elements).

Do it outside if you can…

Ok, I will try that, thanks! I had a feeling that would be the best idea to fix it, I wasn’t sure though. I will let y’all know

That fixed it! Thanks so much for your help everyone, it’s spot on! Everything is working now. :smiley:

1 Like

Sounds good, happy flying!

No worries IMU’s are sophisticated devices. Accelerometers measure linear acceleration in an axis Ax,y,z. Gyros measure angular acceleration about an axis Mx,y,z. The easiest to understand example is a Z-axis (normal to earth) Accelerometer. Stationary it will measure 1G from gravity.

1 Like

Awesome, great information, thanks guys!

I will be darned i had the same issue a few days ago. turnd the craft right and the hud was backwards.

1 Like

Oh man, have you been able to fix it?

Also,. I can’t find a forum that this would be better suited for, so I have a question that’s unrelated to Ardupilot. If there is a forum that would be more helpful, could you please link me to one? I’ve tried registering for RCgroups and a few others but they haven’t let me post anything. Anyway here’s my question.

I just got an Eachine Trashcan. Today was my first time flying it, and I had 10 lipos (it takes 2 at a time so it can be a 2s). The problem is that I wasn’t able to use all 10 because the four that came with it became puffy immediately after charging, and the six that I bought separately became puffy after its first flight. I know it’s normal for these small cheap batteries to get puffy fairly quickly, but I was hoping I’d at least be able to get a few flights out of it.

Does anyone have any recommendations for batteries that don’t get puffy very quickly?

These are the battery specs I am currently using, and I’d like to stay somewhere around them.

1s
350 mAh
30/60c
4.35v

Thanks!

@LucasC, Just idle speculation, but could it be a charger issue? What’s the charger you use?

Just a little note, gyros measure angular velocity. Obviously you can obtain acceleration from it.

Corrado

I feel like an idiot right now, I was about to type up the specs of the charger I was using, (it’s a usb charger that does 4 at a time), and I looked closely at it and realized that 2 of the ports are for LiPo 4.20V and the other 2 are for LiHv 4.35V. I am so glad you mentioned the charger, that’s a scary thought! So yeah needless to say I’m going to just use the LiPo ports from now on.

1 Like

Yes, you are right I was in error Corrado. Deg/sec For gyro’s no squared term there!

Oh I am no stranger to that kind of thing :joy: I once debugged the code then circuit of a project for a solid year just to find it was a faulty jumper wire :grin:. No need to feel bad!