Files
gnss-sdr/src/core/interfaces/pvt_interface.h
T

92 lines
3.5 KiB
C++

/*!
* \file pvt_interface.h
* \brief This class represents an interface to a PVT block.
* \author Javier Arribas, 2011. jarribas(at)cttc.es
*
* Abstract class for PVT solvers. Since all its methods are virtual,
* this class cannot be instantiated directly, and a subclass can only be
* instantiated directly if all inherited pure virtual methods have been
* implemented by that class or a parent class.
*
* -----------------------------------------------------------------------------
*
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_PVT_INTERFACE_H
#define GNSS_SDR_PVT_INTERFACE_H
#include "beidou_cnav1_ephemeris.h"
#include "beidou_dnav_almanac.h"
#include "beidou_dnav_ephemeris.h"
#include "galileo_almanac.h"
#include "galileo_ephemeris.h"
#include "glonass_gnav_almanac.h"
#include "glonass_gnav_ephemeris.h"
#include "glonass_gnav_utc_model.h"
#include "gnss_block_interface.h"
#include "gps_almanac.h"
#include "gps_cnav_ephemeris.h"
#include "gps_ephemeris.h"
#include <map>
/** \addtogroup Core
* \{ */
/** \addtogroup GNSS_Block_Interfaces
* \{ */
/*!
* \brief This class represents an interface to a PVT block.
*
* Abstract class for PVT interfaces, derived from GNSSBlockInterface.
* Since all its methods are virtual,
* this class cannot be instantiated directly, and a subclass can only be
* instantiated directly if all inherited pure virtual methods have been
* implemented by that class or a parent class.
*/
class PvtInterface : public GNSSBlockInterface
{
public:
virtual void reset() = 0;
virtual void clear_ephemeris() = 0;
virtual std::map<int, Gps_CNAV_Ephemeris> get_gps_cnav_ephemeris() const = 0;
virtual std::map<int, Glonass_Gnav_Ephemeris> get_glonass_ephemeris() const = 0;
virtual std::map<int, Glonass_Gnav_Almanac> get_glonass_almanac() const = 0;
virtual Glonass_Gnav_Utc_Model get_glonass_utc_model() const = 0;
// Warm start: drops the ephemeris only and keeps the almanac already in
// memory (almanac current, ephemeris unknown or stale). Unlike a
// clear_ephemeris() followed by an XML reload, this cannot replace a live,
// fresher almanac with a stale snapshot from disk.
virtual void clear_ephemeris_keep_almanac() = 0;
virtual std::map<int, Gps_Ephemeris> get_gps_ephemeris() const = 0;
virtual std::map<int, Galileo_Ephemeris> get_galileo_ephemeris() const = 0;
virtual std::map<int, Beidou_Dnav_Ephemeris> get_beidou_dnav_ephemeris() const = 0;
// Optional navigation families: implementations without B-CNAV support
// retain the existing DNAV/almanac visibility path.
virtual std::map<int, Beidou_Cnav1_Ephemeris> get_beidou_cnav1_ephemeris() const { return {}; }
virtual std::map<int, Beidou_Cnav1_Ephemeris> get_beidou_cnav2_ephemeris() const { return {}; }
virtual std::map<int, Gps_Almanac> get_gps_almanac() const = 0;
virtual std::map<int, Galileo_Almanac> get_galileo_almanac() const = 0;
virtual std::map<int, Beidou_Dnav_Almanac> get_beidou_dnav_almanac() const = 0;
virtual bool get_latest_PVT(double* longitude_deg,
double* latitude_deg,
double* height_m,
double* ground_speed_kmh,
double* course_over_ground_deg,
time_t* UTC_time) = 0;
};
/** \} */
/** \} */
#endif // GNSS_SDR_PVT_INTERFACE_H