What is BAT_EMERGEN_THR used for?

I see parameters for BAT_LOW_THR and BAT_CRIT_THR (shown in QGC and at https://pixhawk.org/firmware/parameters). I plan to use these for low battery warning and auto-RTL respectively.

However, I’ve stumbled across another parameter called BAT_EMERGEN_THR here:

What is BAT_EMERGN_THR used for? If it is used, are there potential circumstances where it might trigger in flight causing motor or system shutdown? If so, can I disable it? If no, then happy days.

It’s similar to the critical threshold, but will only land immediately (as opposed to optional RTL). You could set it to 0 (or any value the percentage estimate will never reach) to disable.

BAT_EMERGEN_THR does not show up in QGC as an editable parameter for me. I HAVE seen it show up once when using the search tool in QGC for something else, this is what caused me to make this post originally, however, I cannot find it again in QGC.

Meanwhile,I guess we should set this parameter in our config.txt file on the SDcard? Is there harm in setting it to a negative number? It is conceivable our battery could report 0% but still have a little juice left to make it back.

For what it is worth: BAT_EMERGEN_THR is not listed at https://pixhawk.org/firmware/parameters

Adding to my reply above. Someone helped me look through the code and this is what we decipher for the “COM_LOW_BAT_ACT” setting. It looks like if we set COM_LOW_BAT_ACT =1 then we will get another warning at BAT_EMERGEN_THR instead of auto-land. This seem like our desired behavior. Are we reading this right?

COM_LOW_BAT_ACT = 0

  • BATTERY_WARNING_LOW condition: “LOW BATTERY, RETURN TO LAND ADVISED” warning.
  • BATTERY_WARNING_CRITICAL condition: “CRITICAL BATTERY, RETURN TO LAUNCH ADVISED!” warning.
  • BATTERY_WARNING_EMERGENCY condition: “DANGEROUS BATTERY LEVEL, LANDING ADVISED!” warning.

COM_LOW_BAT_ACT = 1

  • BATTERY_WARNING_LOW condition: “LOW BATTERY, RETURN TO LAND ADVISED” warning.
  • BATTERY_WARNING_CRITICAL condition: “CRITICAL BATTERY, RETURNING TO LAND” warning and AUTO_RTL attempted.
  • BATTERY_WARNING_EMERGENCY condition: “DANGEROUS BATTERY LEVEL, LANDING ADVISED!” warning.

COM_LOW_BAT_ACT = 2

  • BATTERY_WARNING_LOW condition: “LOW BATTERY, RETURN TO LAND ADVISED” warning.
  • BATTERY_WARNING_CRITICAL condition: “CRITICAL BATTERY, LANDING AT CURRENT POSITION” and AUTO_LAND attempted.
  • BATTERY_WARNING_EMERGENCY condition: “DANGEROUS BATTERY LEVEL, LANDING IMMEDIATELY” and AUTO_LAND attempted.

COM_LOW_BAT_ACT = 3

  • BATTERY_WARNING_LOW condition: “LOW BATTERY, RETURN TO LAND ADVISED” warning.
  • BATTERY_WARNING_CRITICAL condition: “CRITICAL BATTERY, RETURNING TO LAND” warning and AUTO_RTL attempted.
  • BATTERY_WARNING_EMERGENCY condition: “DANGEROUS BATTERY LEVEL, LANDING IMMEDIATELY” and AUTO_LAND attempted.

It looks like it was added in master (development) after the current stable release.

Yes, it looks like you have COM_LOW_BAT_ACT correct.

BAT_EMERGEN_THR now shows in QGC using a recent daily build. It does not show up in older QGC builds. Huh.