Thanks a lot for the suggestions.
Yes, the instability happened during RTL while the copter was descending, I thought this happened due to wind.
I will try to run Autotune (just waiting for the windless environment), and will update this
I did the autotune. I run the Autotune two times and I think the copter now is doing fine.
I tested the Loiter mode and also the RTL went a bit more smooth.
You can find the log (only for the recent autotune) and short videos of loiter mode flight in the below link. Thank you so much for all the help. Please let me know If you think there is still room for improvements.
Later, We will add some payloads (~4 kg) to the copter. Do I need to do the Autotune again, or is it fine If I just change the below parameter as the Wiki page suggests?
For aircraft designed to carry large directly mounted payloads, the maximum values of ATC_ACCEL_P_MAX, ATC_ACCEL_R_MAX and ATC_ACCEL_Y_MAX should be reduced based on the minimum and maximum takeoff weight (TOW):
That looks good now. You might want to run a Yaw autotune - I’m unsure of it’s status at the moment since there’s no yaw at all in that log.
You should do a flight with some
yaw on the spot
circles
figure 8
and we can refine the compass settings - which was part of the original question.
Later when you add the payload only the ACCEL values need adjustment as per that info you linked to. Sometimes it can be appropriate to lower ATC_ANG_PIT_P and ATC_ANG_RLL_P a fraction, but you definitely wouldnt run autotune again with the payload on.
After that, I tested a simple auto mission which I think went well.
I also tried to test this drone’s flight time, which was supposed to be about 55 mins with no payload. But I forgot to adjust the battery parameters and the fail-safe triggered about 48% (BATT_LOW_MAH,12500). However, when I checked the battery capacity manually with one of these (see image below) it showed 30% capacity left. I am kind of confused about what to rely on now.
For compass calibration, when I run the MagFit with the different sections of the flight I get slightly different parameters as an output. Are there any specific rules to choose the flight? In the Log Analysis Seminar, they were specifically looking for circles to calibrate the compass but I have no idea why. I would appreciate it if you briefly explain how should I run the MagFit.
I doubt that capacity checker is very accurate, unless it takes about ten minutes to check the battery, or is it attached during flight??
I believe it just plugs into balance leads and instantly gives you a readout - which will be highly inaccurate in terms of capacity and percentage remaining. It’s voltage reading may be accurate.
Search the Ardupilot forum and also RC Groups about calculating remaining percentage - basically you cant unless you’ve got a “smart” device attached to the battery to monitor it’s usage long term (multiple charge/discharge cycles) and report the capacity.
The problem is the discharge curve is not a straight line, so for most of the discharge we dont know whether the battery is at 90% or 30% just by looking at the voltage (which is all that device does).
To use the mAh failsafes you would need to monitor your battery capacity long term and adjust those settings as it changes - it is OK to use capacity failsafes provided you know the battery capacity for certain and you always start with the battery fully charged.
If you want to use capacity (and you should still use voltage too) then make sure your current measurement is very accurate. I’ve copied in the procedure down below.
Your voltage measurement should also be accurate → actually measure the battery voltage and adjust the sensor BATT_VOLT_MULT
Back to the compass where the whole story started
You can set these
I did some tests, actually I added a dummy payload and a rangefinder and did further flights. I kind of realized that the copter’s heading oscillates +/- 5 degrees while hovering in loiter mode (please see below figure), and the altitude also change a bit while hovering. Does this sound normal or do I need to run autotune for yaw as well?