mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-05 18:27:02 +00:00
Rename cubature_filter library to nonlinear_filtering
This commit is contained in:
parent
83d77fabb0
commit
49a8f9a22a
@ -33,7 +33,7 @@ set(TRACKING_LIB_SOURCES
|
||||
cpu_multicorrelator.cc
|
||||
cpu_multicorrelator_real_codes.cc
|
||||
cpu_multicorrelator_16sc.cc
|
||||
cubature_filter.cc
|
||||
nonlinear_tracking.cc
|
||||
lock_detectors.cc
|
||||
tcp_communication.cc
|
||||
tcp_packet_data.cc
|
||||
@ -51,7 +51,7 @@ set(TRACKING_LIB_HEADERS
|
||||
cpu_multicorrelator.h
|
||||
cpu_multicorrelator_real_codes.h
|
||||
cpu_multicorrelator_16sc.h
|
||||
cubature_filter.h
|
||||
nonlinear_tracking.h
|
||||
lock_detectors.h
|
||||
tcp_communication.h
|
||||
tcp_packet_data.h
|
||||
|
@ -28,12 +28,13 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "cubature_filter.h"
|
||||
#include "nonlinear_tracking.h"
|
||||
#include <armadillo>
|
||||
#include <gtest/gtest.h>
|
||||
#include <random>
|
||||
|
||||
#define CUBATURE_TEST_N_TRIALS 1000
|
||||
#define CUBATURE_TEST_TOLERANCE 0.01
|
||||
|
||||
class Transition_Model : public Model_Function {
|
||||
public:
|
||||
@ -123,8 +124,8 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest)
|
||||
kf_x_pre = kf_F * kf_x_post;
|
||||
kf_P_x_pre = kf_F * kf_P_x_post * kf_F.t() + kf_Q;
|
||||
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_x_pre, kf_x_pre, "absdiff", 0.01));
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_P_x_pre, kf_P_x_pre, "absdiff", 0.01));
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_x_pre, kf_x_pre, "absdiff", CUBATURE_TEST_TOLERANCE));
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_P_x_pre, kf_P_x_pre, "absdiff", CUBATURE_TEST_TOLERANCE));
|
||||
|
||||
// Update Step
|
||||
kf_H = arma::randu<arma::mat>(ny,nx);
|
||||
@ -147,8 +148,8 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest)
|
||||
kf_x_post = kf_x_pre + kf_K * (kf_y - kf_H * kf_x_pre);
|
||||
kf_P_x_post = (arma::eye(nx,nx) - kf_K * kf_H) * kf_P_x_pre;
|
||||
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_x_post, kf_x_post, "absdiff", 0.01));
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_P_x_post, kf_P_x_post, "absdiff", 0.01));
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_x_post, kf_x_post, "absdiff", CUBATURE_TEST_TOLERANCE));
|
||||
EXPECT_TRUE(arma::approx_equal(ckf_P_x_post, kf_P_x_post, "absdiff", CUBATURE_TEST_TOLERANCE));
|
||||
|
||||
delete transition_function;
|
||||
delete measurement_function;
|
||||
|
Loading…
x
Reference in New Issue
Block a user