My quad is drifting while landing in auto mode

Hey! @xfacta (Shawn), It flies well after the flight but I see little movement during the flight. I noticed a few things, without updating these paras: PSC_POSXY_P,0.5 : PSC_VELXY_D,0.25 : PSC_VELXY_I,0.5 : PSC_VELXY_P,1.0, the drone takes off well in Althold and flying stable too when I switched to loiter mode but when in next flight I have taken off in loiter mode, it was again shaking badly. So changed I the above-mentioned parameters and did the test flights in both althold and loiter modes and it turned out good in both modes.

Here is the log of taking-off in Alt-hold: https://drive.google.com/file/d/1UQlRNn_hnHG8D-74JmqgxSbWhCWTNuuS/view?usp=sharing

Here is a log of taking-off in Loiter: https://drive.google.com/file/d/1L-q7eDO-ERjp0KpF0BgQwHAhw00bYxD3/view?usp=sharing

Now waiting for your signal to do yaw tuning. What I noticed is it is flying well as It was flying without tuning with default parameters and other things only you can tell me. Thanks again for all the help and recommendations. You are great!

yeah, that’s true! but I just need to measure the peak current requirement of my drone by flying it in extreme conditions, this will help me to design the power board system for the drone (as they are designed based on the peak current & continuous current). So is there any way to measure the current drawn in the flight without directly connecting the battery to the power brick?

Thanks

If your sure the current will be higher than the standard power brick can handle then get a Mauch current (and voltage) sensor and BEC

1 Like

Yes! the continuous current would be more than 30 Apms and this power brick is suitable for 30 Amps current so I prefer not to connect the battery directly to the brick.

Is there a way I can limit the max./cont. current drawn? like putting a failsafe that if the continuous current requirement is more than 30 amps then it will land or RTL. In this way, I can check and test it.

And sir, Have you got any chance to look at the above logs? please suggest to me any changes to be made and if is it safe to fly for the mission.

Thanks for all the help.

There is MOT_BAT_CURR_MAX but that limit (in whole amps like 40) needs to be well above what you would normally use for most flight conditions, otherwise it will affect stability, payload carrying or wind resistance.
It works by arducopter limiting the motor outputs (PWM in old terms) when total current goes above that limit for a set amount of seconds, MOT_BAT_CURR_TC

Normally you’d only rely on this when you’ve got some headroom to play with. If you use 30amps to hover and the power brick is only capable of 30 amps continuous then it’s already under stress before any peaks of 60 or 80 amps.

Yeah! thanks for the info @xfacta (Shawn), I think If I put the limit for 60 Ams and my continuous power requirement would be around 30Amps then it will work right?

And I have done one small mission test flight and here are my observations:

  1. EKF innovations are good, just sometimes the magnetometer shows a little high but still everything is considerable I guess.

  1. Attitude graph is also good, the desired and actual roll & pitch are overlapping well because of the successful roll and pitch tunning (I guess).

  1. Roll & Pitch other estimators are also estimating well enough.

  1. Yaw estimation shows a little weird because I have not done the yaw tunning yet (I guess!)

  2. Magnetic Innovation also shows fluctuation but I don’t know whether they are under the acceptable range or not.

  3. Vibrations are a little high, I don’t know the reason but I compared to the earlier flight logs, vibrations are almost doubled, and pitch vibration is high.

  4. Both barometers measure the same altitude but different temperatures, any explanation for this?

  5. There is a significant difference between the yaw predicted by the compass and other estimators.

  6. Here I am having a doubt, I have checked the earlier flight logs when UAV used to land at the cm level accuracy and now it is landing around at a few meters accuracy but in both the logs, It shows the GPS horizontal accuracy more than 1. What could be the issue?

  7. It seems there is a noise in the gyroscope observation, I don’t know whether it is in acceptable range or not.

This is my observation sir, here is the flight log of the same flight: https://drive.google.com/file/d/1tHSJjG4CL3mYn6ZMrcuaJwFypmTbprIt/view?usp=sharing

Really looking forward to your response and suggestion. Thanks again! there is so much to learn from you.

Attitude control looks good.
Did you try the Calibrate Level/Level Horizon?
You should be able to run Yaw Autotune without problems, in fact probably best to run all 3 axis.
If you like a snappy yaw response you might want to double the ATC_ACCEL_Y_MAX value that Autotune gives you.

Adjust these:
INS_HNTCH_FREQ,50
INS_HNTCH_BW,25
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0
This should finalise the HNOTCH settings

Set these to fine tune the compasses, courtesy of MAVExplorer magfit utility, this will save you from doing the Compass/Motor calibration and more
COMPASS_USE,0
COMPASS_MOTCT 2
COMPASS_OFS2_X -1
COMPASS_OFS2_Y -190
COMPASS_OFS2_Z -33
COMPASS_DIA2_X 0.987
COMPASS_DIA2_Y 1.002
COMPASS_DIA2_Z 0.867
COMPASS_ODI2_X -0.020
COMPASS_ODI2_Y -0.003
COMPASS_ODI2_Z 0.032
COMPASS_MOT2_X 10.000
COMPASS_MOT2_Y -10.000
COMPASS_MOT2_Z -10.000
COMPASS_SCALE2 1.00

I dont see any other major issues.
The only way to improve GPS landing position/accuracy is to experiment with the constellations, or buy a more expensive GPS unit with quality external antenna, or go RTK.
There’s always going to be some drift or differences on different days/weeks/months.

Caution! Battery rant below :slight_smile:
Any reason not to set BATT_FS_CRT_ACT,1 ?
I know it can be a personal preference, but batteries can go bad, all sorts of things happen… If the craft is already doing RTL for low voltage, what are the chances of continuing (or starting RTL if the battery suddenly goes bad) when the voltage drops the the critical level?
This would be OK if you go conservative and set the Low voltage and Critical voltages higher than usual, say if you had a very high capacity battery pack. Then there might be a chance of completing a RTL with critical voltage - depends on the use case and how far the return to home is. Arguably in that case you still want the critical voltage at a “normal” level and it invokes Land.
Let the Low voltage level invoke RTL and put a normal end to a flight. The Critical voltage level is there for when planning was poor (battery age, mission too long?) or something unexpected happened (there’s that bad battery again!) and just Landing without crashing would be good.
Rally Points come into it too, particularly for long missions and long flight times.

I also meant to say, if using the CAN connected Here3 then set this
BRD_BOOT_DELAY,3000
to allow the Here3 to boot up OK before the flight controller. This ensures reliable startup so you dont get a missing GPS and compass sometimes.

Yeah! I tried to calibrate the Level Horizon but I guess it still shows some difference. This time I will remove the flight controller and calibrate the level separately. I think this may be the reason that during a straight flight, the drone is not flying level.

Here in the HUD, you can see the drone is a little roll towards the left while flying straight. One more thing what is the parameter “load” in the quick window? (last row)

Yeah! How can I miss that. Thanks for sharing it.

I tried to change the GPS_GNSS_MODE to different values and did a little hover flight but as you told me to check the GPA Delta (Update rate), I found not much change in that for different GPS_GNSS_MODE values.

Here is the test flight log for your reference: 2022-10-13 08-19-40_gnss_test.bin - Google Drive

No specific reason but I have been flying the drone with 21v as a critical battery voltage and It works well because I generally fly the drone within a radius of 1km. So when the battery failsafe hits, the drone will come quickly and land with a voltage of around 20.5v which can go down to 19.8v (the cutoff voltage is 19.2v for this battery). I know I have not updated this but I thought once everything (tunning & all) is over, I will update this.

And one thing I noticed in the drone is that while landing it lands very fast compared to earlier flights. I know I can change the landing speed parameters but what would you say? Is this landing speed good & safe?

Dont remove the FC - the calibrate level is all about the “prop disc”, not how level the FC is.
If you did it and the motors were all level across their tops left/right/back/forwards/diagonals (and you packed under the landing gear) then that’s how it should be.
I was just asking to see if you did it, I didn’t notice any big issue in logs.

The land speed and land speed high can be set separately.
Set the land speed high for the fastest descent rate that is still stable.
Set the (slow) land speed for something that wont damage the aircraft or payload, but not so low that the landing is not registered.

Just do some test descents in Stabilise mode to work out what you fastest stable descent rate is.

Sometimes testing is where you need the battery voltages set correctly the most. Many people dont set this up at all saying “I’ll do it later once I’ve worked out everything else” when in actual fact this contributes greatly to tuning and fault finding. Not to mention safety!
Later it’s less likely to matter once you know more about how long your battery normally lasts, and you get over doing the Autotunes and “moon shot” demonstrations.

1 Like

I calibrated the level after putting the assembled drone on the flat-level surface and made sure that all motors were level but is there any better way? I mean how would I make sure that every motor is all level, there will always be some error because I can’t measure the level of the diagonal motor properly as the Centre is occupied by other electronic things. I simply measured the height of every motor from the bottom and check the side motor levels.

I would like to hear your way of checking the level of the motor. What way do you calibrate the drone?

Okay! thanks for the info. but why specifically in stabilize mode? Can I check with the land mode? and does the drone go for the fastest decent rate during the failsafe or there is something else that decides what decent rate (fast or slow) should the drone land?

Yeah! that’s true, sorry I did not update this before. I will update it now. My lipo battery cell’s low voltage is 3.2v and high voltage is 4.2v. What would you suggest to update? I have flown the drone till 20.2v before. So shall I set the battery failsafe battery to 21V and the critical battery to 20.4v (BATT_FS_CRT_ACT=1)?

Looking forward to your suggestion.

Thanks for all the help and for making me understand things. I hope to become an expert like you :slight_smile:

I use a lightweight spirit level I made with some angle aluminium and then glued on a string level.
Putting the drone on a surface that’s potentially not level doesnt work, and there can be slight differences in the landing gear heights too.
I put the level across the tops of the motors or props as best as practical in as many directions as practical, and pack under the landing gear to get it as level as possible. Then it doesnt matter what surface it’s on.

1 Like

These are the standard values for a 6S lipo
BATT_ARM_VOLT,22.10
BATT_CRT_VOLT,21.00
BATT_LOW_VOLT,21.60
MOT_BAT_VOLT_MAX,25.20
MOT_BAT_VOLT_MIN,19.80

1 Like