GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
pvt_kf.h
Go to the documentation of this file.
1/*!
2 * \file pvt_kf.h
3 * \brief Kalman Filter for Position and Velocity
4 * \author Javier Arribas, 2023. jarribas(at)cttc.es
5 *
6 *
7 * -----------------------------------------------------------------------------
8 *
9 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
10 * This file is part of GNSS-SDR.
11 *
12 * Copyright (C) 2010-2023 (see AUTHORS file for a list of contributors)
13 * SPDX-License-Identifier: GPL-3.0-or-later
14 *
15 * -----------------------------------------------------------------------------
16 */
17
18#ifndef GNSS_SDR_PVT_KF_H
19#define GNSS_SDR_PVT_KF_H
20
21#include <armadillo>
22
23/** \addtogroup PVT
24 * \{ */
25/** \addtogroup PVT_libs
26 * \{ */
27
28
29/*!
30 * \brief Kalman Filter for Position and Velocity
31 *
32 */
33class Pvt_Kf
34{
35public:
36 Pvt_Kf() = default;
37 virtual ~Pvt_Kf() = default;
38 void init_Kf(const arma::vec& p,
39 const arma::vec& v,
40 double update_interval_s,
41 double measures_ecef_pos_sd_m,
42 double measures_ecef_vel_sd_ms,
43 double system_ecef_pos_sd_m,
44 double system_ecef_vel_sd_ms);
45 bool is_initialized() const;
46 void run_Kf(const arma::vec& p, const arma::vec& v);
47 void get_pv_Kf(arma::vec& p, arma::vec& v) const;
48 void reset_Kf();
49
50private:
51 // Kalman Filter class variables
52 arma::mat d_F;
53 arma::mat d_H;
54 arma::mat d_R;
55 arma::mat d_Q;
56 arma::mat d_P_old_old;
57 arma::mat d_P_new_old;
58 arma::mat d_P_new_new;
59 arma::vec d_x_old_old;
60 arma::vec d_x_new_old;
61 arma::vec d_x_new_new;
62 bool d_initialized{false};
63};
64
65
66/** \} */
67/** \} */
68#endif // GNSS_SDR_Pvt_Kf_H