2015-11-14 13:17:02 +00:00
|
|
|
/*!
|
|
|
|
* \file ls_pvt.h
|
|
|
|
* \brief Interface of a base class for Least Squares PVT solutions
|
|
|
|
* \author Carles Fernandez-Prades, 2015. cfernandez(at)cttc.es
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2019-07-26 10:38:20 +00:00
|
|
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
2015-11-14 13:17:02 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2015-11-14 13:17:02 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_LS_PVT_H_
|
|
|
|
#define GNSS_SDR_LS_PVT_H_
|
|
|
|
|
|
|
|
|
2015-11-14 19:41:28 +00:00
|
|
|
#include "pvt_solution.h"
|
2015-11-14 13:17:02 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Base class for the Least Squares PVT solution
|
|
|
|
*
|
|
|
|
*/
|
2015-11-14 19:41:28 +00:00
|
|
|
class Ls_Pvt : public Pvt_Solution
|
2015-11-14 13:17:02 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-08-13 23:17:47 +00:00
|
|
|
Ls_Pvt() = default;
|
2015-11-14 13:17:02 +00:00
|
|
|
|
2017-01-27 18:21:51 +00:00
|
|
|
/*!
|
|
|
|
* \brief Computes the initial position solution based on the Bancroft algorithm
|
|
|
|
*/
|
2018-03-03 01:03:39 +00:00
|
|
|
arma::vec bancroftPos(const arma::mat& satpos, const arma::vec& obs);
|
2017-01-27 18:21:51 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Computes the Weighted Least Squares position solution
|
|
|
|
*/
|
2018-03-03 01:03:39 +00:00
|
|
|
arma::vec leastSquarePos(const arma::mat& satpos, const arma::vec& obs, const arma::vec& w_vec);
|
2019-07-01 21:44:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
/*!
|
|
|
|
* \brief Computes the Lorentz inner product between two vectors
|
|
|
|
*/
|
|
|
|
double lorentz(const arma::vec& x, const arma::vec& y);
|
2015-11-14 13:17:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|