(2019-07-29, 10:29 PM)sideluxe Wrote: Sometimes it works like a charm as seen in the little video, but it is not stable.
- Sometimes the pilot starts to leave course and does nothing or much to less correction to go back to desired heading
You can increase the P or PR gains for this case, but increasing the D gain is needed to avoid overshooting the correction.
Quote: - Course keeping is not tight enough, correction starts mainly after after ten deg off
Increasing the gains will change this. Also decreasing servo.period to 0.3 or 0.2 can help. You also might try reducing servo.min_speed to less than 1.0 so it can move sooner at slower speeds.
You also might try running the autopilot at 25hz instead of 10hz which should improve reaction speed.
Quote: - The compass direction is not always correct, cali seems to be fine, but after setting the offset the course differs about 20 - 30 deg when moving to another direction.
Only after setting the offset? Is the compass near anything magnetic ? 20-30 degree error is a lot. Normal calibration is within 10 degrees, usually better.
This can affect autopilot performance if the compass is not well calibrated. Can you run the pypilot_calibration script? pypilot/ui/autopilot_calibration.py It should fit the sphere to the points well, and it's easy to see if the calibration is good or not.
Also, maybe you need to calibrate the accelerometers.
Quote: - Making changes in the desired heading when the AP is engaged does nothing. No reaction at all, even if I change 50 deg port p or stb
This is handled by the FF (feed forward) gain. Is it non zero? Can you increase it?
Quote: - When engaging the AP does move the control arm about 5cm and does not compensate this back
Every time? Does it always move in the same direction? I have not heard of this, maybe the motor controller you are using somehow?
Quote:I tried to play with gains a lot, mainly D, P and DD , but a total satisfaction is not reached yet.
There are a few other gains as well, but I would try tuning other parameters.