Copter-3.5-rc3 released for beta testing

@rmackay9 in an effort to gather some data on the EKF performance, I conducted 3 short test flights with different settings for the EKF IMU Mask. Between each parameter change, I did a complete reboot (disconnect battery and reconnect). It was a pretty windy day and the copter was doing OK holding its place but was twitching quite a bit.

Test 1: EK2_IMU_MASK = 1, EK3_IMU_MASK = 2
Initial observation is that NLon starts off good (right around 20), but halfway through the flight jumps to over 140.

Test 2: EK2_IMU_MASK = 2, EK3_IMU_MASK = 1
Right after activating position hold, NLon climbs to 100-110 and stays there for the duration of the flight.

Test 3: EK2_IMU_MASK = 3, EK3_IMU_MASK = 3
NLon slowly climbs up to 600-650 where it remains for the rest of the flight

Here’s a link to the log files from each flight: EKF Testing Logs

I guess I should also test the NLon performance when switching off one or the other EKF but I ran out of time today. Maybe a test for tomorrow. Let me know if there’s anything more I can do to help test.

EDIT: One last note is that nothing has changed with regards to my setup other than flashing RC3 and changing my pwm gimbal control to leverage one of the Aux pins on the Pixhawk rather than just through my RX.

@johnnyruz,

thanks for the testing. I confirmed with @priseborough that with the EK2_IMU_MASK and EK3_IMU_MASK set to “3” we will actually be running 4 EKFs so it makes sense the performance is as bad as you saw.

It seems like the EKF3 does have some negative impact on performance.

One last test you might try if you have time is to set EK2_ENABLE to zero, EK3_IMU_MASK to 3. That means it’s all EKF3 (not EKF2 being used). This is slightly risky as there is absolutely no fall back to EKF2 if something goes wrong with EKF3. It’ll probably be fine but no problems if you’d rather not do that test for now.

Following this discussion I also had a look at NLon where I had set EK2_IMU_MASK and EK3_IMU_MASK to “3”. The result is the same on a Pixracer quad and a AUAV-X2 hexa:

I have already tested from the beginning of 3.5. with only EK3_enable, EK3_IMU_MASK to 3. Quad+ 700, AUAV-X2, oneshot, Ultra-ESC, Tiger U3 at 4s, Jeti sBus,
About ten flights with good performance. NLon between 200 - 250, MaxT 4,2

What is the maximum NLon value, which is regarded normal.

actually I don’t know more than here already written
http://discuss.ardupilot.org/t/autotune-mishap-with-ac3-5-rc-2/15926/9

Some tests from today with only one EKF running on all IMUs:

EKF		NLon 	Firmware	Board		Copter
2 only 	40-70 	3.5rc2		AUAV-X2		Hexa
2 only	45-75	3.5rc3		Dropix		Hexa
3 only	130-160	3.5rc3		PixRacer	Quad

Flew a couple tests yesterday with some issues that I worked out, on the full good flight with just EKF 3 enabled my NLon bounced between 60 - 100.

At first I had just set the EKF2_ENABLE parameter to 0 with the EKF3_ENABLE set to 1 and EKF3_IMU_MASK set to 3. Upon startup it would not pass pre-arm checks. I continuously got a “gyros still settling” message. I then found the AHRS_EKF_TYPE parameter and changed it from 2 to 3. As soon as I did that, the copter indicated it was ready to arm.

I was connected via wireless telemetry when I updated the AHRS parameter, so after the copter indicated it was ready to fly, I armed and took off without rebooting. It flew absolutely fine at first but then in fast forward flight in position hold, I started receiving “Bad Horiz Pos” errors and it would slowly descend or suddenly climb as if it was having a hard time determining altitude. I was able to bring it back and land safely.

After swapping the battery with the same parameters set, I was able to fly successfully in Stabilize, PosHold, Loiter, and execute an Auto Mission without any errors, however I did see the “gyros still settling” message for about 20 seconds until, I assume, the EKF3 fully initialized.

My question would be is the AHRS_EKF_TYPE parameter value of 3, combined with the EKF2_ENABLE = 0 and EKF3_ENABLE = 1, and EKF3_IMU_MASK = 3 the correct setup to test with EKF3 only?

according Wiki complete parameter list
EK3_ENABLE: Enable EKF3
Note: This parameter is for advanced users
This enables EKF3. Enabling EKF3 only makes the maths run, it does not mean it will be used for flight control. To use it for flight control set AHRS_EKF_TYPE=3. A reboot or restart will need to be performed after changing the value of EK3_ENABLE for it to take effect.

AHRS_EKF_TYPE: Use NavEKF Kalman filter for attitude and position estimation

Note: This parameter is for advanced users
This controls which NavEKF Kalman filter version is used for attitude and position estimation

when I changed EKF there was a massage in MP like reboot required
never tried what happen without reboot

I’m happy with EKF3 exept sometimes in poshold or Loiter he want to drift very fast. Never tried how far. switched back to stab then loiter again and it holds position.

so it’s the correct setting to use EKF3 in your question

Thank you @Cipta, must have missed that when I was reviewing the documentation.

I was curious about difference ekf2 - 3 so I did a Test with AUAV-X2, one GPS, one ext-Compass
EKF2

EKF3

and ekf3 strange poshold maybe its because the close roof of steel? Its only sometimes and I don’t know if its related to ekf3

@Cipta
Was this with both EKF2 and EKF3 enabled? I.e. you changed AHRS_EKF_TYPE but did not set EK3_ENABLE = 0 when testing EKF2 and vice versa?
I am asking because NLon is similar in both tests.

always just one ekf enable with imu mask 3
wanted compare ekf2 to ekf3
so I wonder why your AUAV-X2 having lower NLon with ekf2
do you use 2 compass? gps?

Yes, that’s correct.

@Cipta
From my tests it seems that we have decreasing number of NLon like this:
EKF2 enabled + EKF3 enabled
EKF3 only
EKF2 only

But this is obviously not comparable to all systems.
On the ones I have tested I only have one GPS, no LIDAR etc. Just the basic system.
However, there is one difference between my EKF3 only test copter and the EKF2 only test: Oneshot 125. But I doubt this is the cause since enabling EKF2+3 without Oneshot gives a much higher NLon on the other copters.

Well this hasn’t happened in many moons (as in years).

First I installed 3.4.6 from previous version, but didn’t fly. Instead jumped to 3.5-rc3. Now it will not arm. The ESC’s don’t seem to be sounding off correctly and GPS isn’t locking (no green light). The radio is connected and working properly.

There is no safety switch, so I made sure that was disabled in pre-arm check.

Strange, and because I haven’t messed much with parameters for so long, the memory ain’t as good as it used to be so am at a bit of a loss as to what to do.

I had to redo may compass calibration when I went to 3.5.

Mike

Thanks, I should have known to do that.

I had to pick frame type. A few other parameters weren’t correct. Works fine now.

I’m having trouble to activate Maxbotix I2C sonar in this version.
It dose not even initialized (there is no sound from the sensor).
Works on 3.4.6.
I saw that in this branch (3.5) the rangefinder code is changed and there is no primary, just orientation.
Maybe it something to do with it?