aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/fw_att_pos_estimator/estimator.cpp11
-rw-r--r--src/modules/fw_att_pos_estimator/estimator.h4
-rw-r--r--src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp4
3 files changed, 17 insertions, 2 deletions
diff --git a/src/modules/fw_att_pos_estimator/estimator.cpp b/src/modules/fw_att_pos_estimator/estimator.cpp
index 3ce1ce56e..7ab06e85d 100644
--- a/src/modules/fw_att_pos_estimator/estimator.cpp
+++ b/src/modules/fw_att_pos_estimator/estimator.cpp
@@ -106,7 +106,16 @@ void swap_var(float &d1, float &d2)
d2 = tmp;
}
-void AttPosEKF::UpdateStrapdownEquationsNED()
+AttPosEKF::AttPosEKF()
+{
+
+}
+
+AttPosEKF::~AttPosEKF()
+{
+}
+
+void AttPosEKF::UpdateStrapdownEquationsNED()
{
Vector3f delVelNav;
float q00;
diff --git a/src/modules/fw_att_pos_estimator/estimator.h b/src/modules/fw_att_pos_estimator/estimator.h
index 821392399..7edb3c714 100644
--- a/src/modules/fw_att_pos_estimator/estimator.h
+++ b/src/modules/fw_att_pos_estimator/estimator.h
@@ -78,6 +78,10 @@ struct ekf_status_report {
class AttPosEKF {
public:
+
+ AttPosEKF();
+ ~AttPosEKF();
+
// Global variables
float KH[n_states][n_states]; // intermediate result used for covariance updates
float KHP[n_states][n_states]; // intermediate result used for covariance updates
diff --git a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp
index 20c5d3719..840cd585e 100644
--- a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp
+++ b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp
@@ -292,7 +292,7 @@ FixedwingEstimator::FixedwingEstimator() :
_initialized(false),
_gps_initialized(false),
_mavlink_fd(-1),
- _ekf(new AttPosEKF())
+ _ekf(nullptr)
{
_mavlink_fd = open(MAVLINK_LOG_DEVICE, 0);
@@ -396,6 +396,8 @@ void
FixedwingEstimator::task_main()
{
+ _ekf = new AttPosEKF();
+
if (!_ekf) {
errx(1, "failed allocating EKF filter - out of RAM!");
}