magnetic_model_manager.h
Go to the documentation of this file.
1 #pragma once
2 
3 // SPDX-License-Identifier: BSD-3-Clause
4 // SPDX-FileCopyrightText: Czech Technical University in Prague
5 
12 #include <memory>
13 #include <string>
14 
19 #include <ros/time.h>
20 
21 namespace magnetic_model
22 {
23 
24 struct MagneticModelManagerPrivate;
25 
30 {
31 public:
41  explicit MagneticModelManager(const cras::LogHelperPtr& log, const cras::optional<std::string>& modelPath = {});
42  virtual ~MagneticModelManager();
43 
48  std::string getModelPath() const;
49 
57  void setModelPath(const cras::optional<std::string>& modelPath);
58 
64  virtual std::string getBestMagneticModelName(const ros::Time& date) const;
65 
72  virtual cras::expected<std::shared_ptr<MagneticModel>, std::string> getMagneticModel(
73  const ros::Time& stamp, bool strict) const;
74 
81  virtual cras::expected<std::shared_ptr<MagneticModel>, std::string> getMagneticModel(
82  const std::string& name, bool strict) const;
83 
84 protected:
86  std::unique_ptr<MagneticModelManagerPrivate> data;
87 };
88 
89 }
optional.hpp
time.h
magnetic_model.h
Earth magnetic field model.
cras::HasLogger
magnetic_model::MagneticModelManager::MagneticModelManager
MagneticModelManager(const cras::LogHelperPtr &log, const cras::optional< std::string > &modelPath={})
Create magnetic model manager.
log_utils.h
magnetic_model
Definition: magnetic_model.h:22
magnetic_model::MagneticModelManager::setModelPath
void setModelPath(const cras::optional< std::string > &modelPath)
Set the path to the folder with stored models.
magnetic_model::MagneticModelManager::getMagneticModel
virtual cras::expected< std::shared_ptr< MagneticModel >, std::string > getMagneticModel(const ros::Time &stamp, bool strict) const
Get the most suitable magnetic model for the given year.
expected.hpp
cras::LogHelperPtr
::cras::LogHelper::Ptr LogHelperPtr
ros::Time
magnetic_model::MagneticModelManager::~MagneticModelManager
virtual ~MagneticModelManager()
magnetic_model::MagneticModelManager
Earth magnetic model.
Definition: magnetic_model_manager.h:29
magnetic_model::MagneticModelManager::data
std::unique_ptr< MagneticModelManagerPrivate > data
PIMPL data.
Definition: magnetic_model_manager.h:86
cras::HasLogger::log
::cras::LogHelperPtr log
magnetic_model::MagneticModelManager::getModelPath
std::string getModelPath() const
Get the model path.
magnetic_model::MagneticModelManager::getBestMagneticModelName
virtual std::string getBestMagneticModelName(const ros::Time &date) const
Get the best magnetic model for the given date.


magnetic_model
Author(s): Martin Pecka
autogenerated on Wed Jan 8 2025 04:03:10