Alt-hold issue, but loiter ok

Could someone please tell me which sensors alt-hold uses that is different to loiter (aside from GPS) to help me troubleshoot why my loiter is rock solid but alt-hold is a mess.

My baro looks like it is working great compared to the gps alt & my accZ is within range (but only just).

TIA

Hi drizi,

Alt hold uses the baro exclusively for altitude determination.

Loiter also uses baro for altitude determination not sure if it also mixes in GPS but I don’t think so.

I think baro is used exclusively unless you have Sonar and then it switches in / out at appropriate altitude depending on SONAR model.

Best Regards,

Gary

Thanks Gary,

My baralt seems to be following the GPS alt quite well I thought ? Attached is a screencap of the log data.

Also just to note, im using the 3dr apm case (with the pink foam over the bar)

http://i.imgur.com/uf4oWH4.jpg

Hi drizi,

The log tells the story.

Baro actually seems to be working fine, but accel Z is not good, way too much vibration in the Z-axis.

Inadequate vibration damping or something hitting the flight controller. :open_mouth:

Interesting because X and Y look fine at plus and minus one which on the log scale equals approximately one tenth G, but the vertical Z axis is definitely not OK at plus and minus five which equals one half G.

And that can screw up all the modes that use Alt Hold.

Looking at your log I am pretty sure that what you need to fix is the Z axis vibration and get it down to less than + and - 2 on our log scale.

(9.8 on our log scale equals 1 G). :slight_smile:

Best Regards,

Gary

Gary thank you again for taking the time to help me out :slight_smile:

edit: I’m using moon gel and a rubber band to hold it down. Maybe that is making my accZ bad. Does anyone have any suggestions on how to secure the APM down when sitting on moon gel ?

Hi Drizi,

I personally favor Kyosho Zeal Gel which is stronger and comes with a high stick adhesive on both sides.

But Moon Gel can be OK so long as it doesn’t get too hot. (Melts in high heat).

But you are probably retaining the board too tight with the rubber band.

This actually kind of needs to be tuned and my guess is that if you decrease the rubber band retention your Z vibrations will decrease.

Of course if you go too far the board will move around and that isn’t good either so it is a matter of finding the best balance.

It is also important to leave some slack in the wires going to your flight controller so they don’t defeat the antivibration methods.

I just put in a PX4 with four 3/4" squares of Kyosho Zeal and no additional restraint and I have sub 1/10G vibration in all 3 axes.

Take a look at the antivibration wiki page I wrote for hints: copter.ardupilot.com/wiki/vibration-damping/

Best Regards,

Gary