aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-20 19:42:31 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-20 19:42:31 +0200
commitc95de36d3a01bda1d3664fbc46df3a5fc35fe4da (patch)
treed68c05d6ab9771e0385810176b9a8991f0cf93f6 /src/modules/commander
parent264fe884a2825ae430a19ba61e8c89d6a214f5cd (diff)
downloadpx4-firmware-c95de36d3a01bda1d3664fbc46df3a5fc35fe4da.tar.gz
px4-firmware-c95de36d3a01bda1d3664fbc46df3a5fc35fe4da.tar.bz2
px4-firmware-c95de36d3a01bda1d3664fbc46df3a5fc35fe4da.zip
commander: Add missing parameter definition
Diffstat (limited to 'src/modules/commander')
-rw-r--r--src/modules/commander/commander_helper.cpp2
-rw-r--r--src/modules/commander/commander_params.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/commander/commander_helper.cpp b/src/modules/commander/commander_helper.cpp
index d87af2d7d..2022e99fb 100644
--- a/src/modules/commander/commander_helper.cpp
+++ b/src/modules/commander/commander_helper.cpp
@@ -291,7 +291,7 @@ float battery_remaining_estimate_voltage(float voltage, float discharged, float
static param_t bat_v_load_drop_h;
static float bat_v_empty = 3.4f;
static float bat_v_full = 4.2f;
- static float bat_v_load_drop = 0.1f;
+ static float bat_v_load_drop = 0.06f;
static int bat_n_cells = 3;
static float bat_capacity = -1.0f;
static bool initialized = false;
diff --git a/src/modules/commander/commander_params.c b/src/modules/commander/commander_params.c
index dea12db40..0e4973b5f 100644
--- a/src/modules/commander/commander_params.c
+++ b/src/modules/commander/commander_params.c
@@ -68,6 +68,16 @@ PARAM_DEFINE_FLOAT(BAT_V_EMPTY, 3.4f);
PARAM_DEFINE_FLOAT(BAT_V_CHARGED, 4.2f);
/**
+ * Voltage drop per cell on 100% load
+ *
+ * This implicitely defines the internal resistance
+ * to maximum current ratio and assumes linearity.
+ *
+ * @group Battery Calibration
+ */
+PARAM_DEFINE_FLOAT(BAT_V_LOAD_DROP, 0.06f);
+
+/**
* Number of cells.
*
* Defines the number of cells the attached battery consists of.