Copter-4.2.1 released!

Copter-4.2.1 has been released as the official/stable version and can be installed using MP, QGC or it can be manually downloaded from firmware.ardupilot.org.

The changes vs 4.2.0 are in the ReleaseNotes and copied below.

  1. CAN ESCs bus bandwidth efficiency improvements (see CAN_Dx_UC_ESC_OF parameter)
  2. DShot timing improvements to support more ESC variants
  3. LOITER_TURNS command radius max increased from 255m to 2550m (but only 10m accuracy when over 255)
  4. Luftan EFI measures fuel consumption (see EFI_COEF1, EFI_COEF2)
  5. Bug fixes
    a) CAN ESCs work on boards with no safety switch (e.g. MatekH743)
    b) Inflight Compass calibration checks GSF yaw estimate is good
    c) LOITER_TURNS command’s Turns field limited to 255 (previously would wrap to lower number)
    d) NeoPixel colour fix
    e) Precision Landing maintains yaw during retries

In general these fixes are pretty minor and won’t affect most users so feel free to take your time and upgrade when it is convenient.

All required parameter conversions are done automatically so in general there should be no need to back-up and restore parameters or re-tune the vehicle after this upgrade.

Thanks very much to those who contributed to the beta testing of this release!

9 Likes

ACRO_YAW_P: Acro Yaw P gain no more valid, replaced by
ACRO_Y_RATE: Acro Yaw Rate ?

ACRO_RP_P: Acro Roll and Pitch P gain no more valid, replaced by
ACRO_RP_RATE: Acro Roll and Pitch Rate?

Mission Planner 1.3.77 - 16-03-2022

@Jai.GAY,

Yes, that’s right. We hope the new name and scaling make them easier to understand. This was the line in the release notes re this but it probably doesn’t add much more information.

  • Acro max rate params renamed and improved (see ACRO_RP_RATE, ACRO_Y_RATE, PILOT_Y_RATE, PILOT_Y_EXPO)

but under the 4.2.1 list, it is still listed, unknowingly I thought MP contains a sync issue.

And I look forward to seeing good test results on 4.2.1 on this issue.

@Jai.GAY,

Ah, ok. This happens because we bump into user complaints about missing parameter descriptions during the transition between versions. The best solution we’ve found is to keep around the old parameter descriptions for a few months. The underlying problem is that there’s no tight link between the parameter descriptions that the ground stations use and the firmware that’s on the vehicle.

Re using a range finder for the EKF’s altitude source, normally that’s not a good idea unless the vehicle is in an indoor environment with a flat floor. If that’s the environment then OK… Still, I hope the EKF’s alt source isn’t being set to rangefinder because of confusion thinking that this is required to use optical flow or required for surface tracking or terrain following.

The best could be a hyperlink in 4.2.1 to an older version that still support it, for example.

I have try to follow this indoor flying guide.

How critical is this MOT_PWM_MIN/MAX, most consumer graded ESC/Motor does not specify?

6/10/2022 10:25:52 AM : PreArm: Check MOT_PWM_MIN/MAX
6/10/2022 10:25:27 AM : Frame: QUAD/V
6/10/2022 10:25:27 AM : IMU2: fast sampling enabled 9.0kHz/2.3kHz
6/10/2022 10:25:27 AM : IMU0: fast sampling enabled 8.0kHz/2.0kHz
6/10/2022 10:25:27 AM : RCOut: PWM:1-14
6/10/2022 10:25:27 AM : CubeOrange 00270027 30305114 35333339
6/10/2022 10:25:27 AM : ChibiOS: 93e6e03d
6/10/2022 10:25:27 AM : ArduCopter V4.2.1 (c8b6b674)
6/10/2022 10:25:27 AM : Frame: QUAD/V

no good surprise, indoor flying without GPS installed.

Wondering is it that I have to change EK3_SRC1_VELZ to 0 or 4?

my current EK3 settings:
AHRS_EKF_TYPE,3
EK2_ENABLE,0
EK3_ABIAS_P_NSE,0.003
EK3_ACC_BIAS_LIM,1
EK3_ACC_P_NSE,0.35
EK3_AFFINITY,0
EK3_ALT_M_NSE,2
EK3_BCN_DELAY,50
EK3_BCN_I_GTE,500
EK3_BCN_M_NSE,1
EK3_BETA_MASK,0
EK3_CHECK_SCALE,100
EK3_DRAG_BCOEF_X,0
EK3_DRAG_BCOEF_Y,0
EK3_DRAG_M_NSE,0.5
EK3_DRAG_MCOEF,0
EK3_EAS_I_GATE,400
EK3_EAS_M_NSE,1.4
EK3_ENABLE,1
EK3_ERR_THRESH,0.2
EK3_FLOW_DELAY,10
EK3_FLOW_I_GATE,300
EK3_FLOW_M_NSE,0.25
EK3_FLOW_USE,1
EK3_GBIAS_P_NSE,0.001
EK3_GLITCH_RAD,25
EK3_GND_EFF_DZ,4
EK3_GPS_CHECK,31
EK3_GSF_RST_MAX,2
EK3_GSF_RUN_MASK,3
EK3_GSF_USE_MASK,3
EK3_GYRO_P_NSE,0.015
EK3_HGT_DELAY,60
EK3_HGT_I_GATE,500
EK3_HRT_FILT,2
EK3_IMU_MASK,7
EK3_MAG_CAL,3
EK3_MAG_EF_LIM,50
EK3_MAG_I_GATE,300
EK3_MAG_M_NSE,0.05
EK3_MAG_MASK,0
EK3_MAGB_P_NSE,0.0001
EK3_MAGE_P_NSE,0.001
EK3_MAX_FLOW,2.5
EK3_NOAID_M_NSE,10
EK3_OGN_HGT_MASK,0
EK3_OGNM_TEST_SF,2
EK3_POS_I_GATE,500
EK3_POSNE_M_NSE,0.5
EK3_PRIMARY,0
EK3_RNG_I_GATE,500
EK3_RNG_M_NSE,0.5
EK3_RNG_USE_HGT,63
EK3_RNG_USE_SPD,6
EK3_SRC_OPTIONS,1
EK3_SRC1_POSXY,3
EK3_SRC1_POSZ,2
EK3_SRC1_VELXY,3
EK3_SRC1_VELZ,3
EK3_SRC1_YAW,1
EK3_SRC2_POSXY,0
EK3_SRC2_POSZ,2
EK3_SRC2_VELXY,0
EK3_SRC2_VELZ,0
EK3_SRC2_YAW,0
EK3_SRC3_POSXY,0
EK3_SRC3_POSZ,2
EK3_SRC3_VELXY,0
EK3_SRC3_VELZ,0
EK3_SRC3_YAW,0
EK3_TAU_OUTPUT,25
EK3_TERR_GRAD,0.1
EK3_VEL_I_GATE,500
EK3_VELD_M_NSE,0.5
EK3_VELNE_M_NSE,0.3
EK3_VIS_VERR_MAX,0.9
EK3_VIS_VERR_MIN,0.1
EK3_WENC_VERR,0.1
EK3_WIND_P_NSE,0.2
EK3_WIND_PSCALE,1
EK3_YAW_I_GATE,300
EK3_YAW_M_NSE,0.5

Could this be the solution? I hope so. Will try when I have the bandwidth.

Hi @Jai.GAY,

This vehicle is flying indoors of course? … and the floor is flat with no obstacles? This is the only time that EK3_SRCx_POSZ should be set to 2.

Have you posted a log somewhere? Sorry if I’ve missed it.

I think it would be good to try restoring EK3_SRCx_POSZ to 0 (Baro) to see if that helps.

You could also try increasing RNGFND_FILT to 50 (or set it to zero) and/or set SURFTRAK_MODE to 0 to disable surface tracking. I don’t think it’s a good idea to both have the EKF using the rangefinder as a source and to also be using surface tracking.

RNGFND_FILT,0.5
SURFTRAK_MODE,1
will change to 0 and retry.

The 10 June log.

SURFTRAK_MODE was introduced in 4.2.x, but I experienced it in 4.1.x. Interestingly, our super flat test site caused the problem.

test results and the problem solved, CTUN.DAlt is stable, EK3_x no change.

Next, I would like to try the Optical Flow Sensor Inflight Calibration. If I do not have an external GPS installed, what should I set for the following?

It is concluded that an external GPS is needed for the calibration.

Hey, @rmackay9 I am curious to know, if the primary sensor defined in EK3_SRC1_X goes bad will the EKF switch to the secondary sensor or even the tertiary sensor as defined by EK3_SRC2_X or EK3_SRC3_X? In the documentation of EKF source switching, it is mentioned that switching between the sources has to use an RC switch.

Hi @Shubham_Saboo,

Manual or automatic switching is supported but the automatic switching is only done with lua scripts at the moment. There are three lua scripts so far linked near the bottom of the Setup section on the GPS/Non-GPS transitions wiki page.

Hope that helps…