2017-04-20 14:10:12 +00:00
|
|
|
/*!
|
|
|
|
* \file rtklib_pvt.h
|
|
|
|
* \brief Interface of a Position Velocity and Time computation block
|
|
|
|
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2018-05-13 20:49:11 +00:00
|
|
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
2017-04-20 14:10:12 +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/>.
|
2017-04-20 14:10:12 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_RTKLIB_PVT_H_
|
|
|
|
#define GNSS_SDR_RTKLIB_PVT_H_
|
|
|
|
|
|
|
|
#include "pvt_interface.h"
|
|
|
|
#include "rtklib_pvt_cc.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <string>
|
2017-04-20 14:10:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ConfigurationInterface;
|
|
|
|
|
|
|
|
/*!
|
2018-10-21 10:16:45 +00:00
|
|
|
* \brief This class implements a PvtInterface for the RTKLIB PVT block
|
2017-04-20 14:10:12 +00:00
|
|
|
*/
|
|
|
|
class RtklibPvt : public PvtInterface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RtklibPvt(ConfigurationInterface* configuration,
|
2018-12-02 04:29:11 +00:00
|
|
|
const std::string& role,
|
2018-03-03 01:03:39 +00:00
|
|
|
unsigned int in_streams,
|
|
|
|
unsigned int out_streams);
|
2017-04-20 14:10:12 +00:00
|
|
|
|
|
|
|
virtual ~RtklibPvt();
|
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string role() override
|
2017-04-20 14:10:12 +00:00
|
|
|
{
|
|
|
|
return role_;
|
|
|
|
}
|
|
|
|
|
2018-11-07 18:23:40 +00:00
|
|
|
//! Returns "RTKLIB_PVT"
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string implementation() override
|
2017-04-20 14:10:12 +00:00
|
|
|
{
|
|
|
|
return "RTKLIB_PVT";
|
|
|
|
}
|
|
|
|
|
2018-11-07 18:23:40 +00:00
|
|
|
void clear_ephemeris() override;
|
2018-11-08 13:25:38 +00:00
|
|
|
std::map<int, Gps_Ephemeris> get_gps_ephemeris() const override;
|
|
|
|
std::map<int, Galileo_Ephemeris> get_galileo_ephemeris() const override;
|
|
|
|
std::map<int, Gps_Almanac> get_gps_almanac() const override;
|
|
|
|
std::map<int, Galileo_Almanac> get_galileo_almanac() const override;
|
2018-11-05 16:53:53 +00:00
|
|
|
|
2017-08-15 22:58:10 +00:00
|
|
|
void connect(gr::top_block_sptr top_block) override;
|
|
|
|
void disconnect(gr::top_block_sptr top_block) override;
|
|
|
|
gr::basic_block_sptr get_left_block() override;
|
|
|
|
gr::basic_block_sptr get_right_block() override;
|
2017-04-20 14:10:12 +00:00
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline void reset() override
|
2017-04-20 14:10:12 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
//! All blocks must have an item_size() function implementation. Returns sizeof(gr_complex)
|
2017-08-21 09:45:12 +00:00
|
|
|
inline size_t item_size() override
|
2017-04-20 14:10:12 +00:00
|
|
|
{
|
|
|
|
return sizeof(gr_complex);
|
|
|
|
}
|
|
|
|
|
2018-11-06 13:39:57 +00:00
|
|
|
bool get_latest_PVT(double* longitude_deg,
|
|
|
|
double* latitude_deg,
|
|
|
|
double* height_m,
|
|
|
|
double* ground_speed_kmh,
|
|
|
|
double* course_over_ground_deg,
|
2018-11-07 18:23:40 +00:00
|
|
|
time_t* UTC_time) override;
|
2018-11-06 13:39:57 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
private:
|
|
|
|
rtklib_pvt_cc_sptr pvt_;
|
2017-04-30 14:06:01 +00:00
|
|
|
rtk_t rtk;
|
2017-04-20 14:10:12 +00:00
|
|
|
std::string role_;
|
|
|
|
unsigned int in_streams_;
|
|
|
|
unsigned int out_streams_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|