Skip to content

Commit

Permalink
adapt to tools 0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-urban committed Oct 30, 2024
1 parent 51a510d commit 67e992a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ project(
'cpp',
license: 'MPL-2.0',

version: '0.17.1',
version: '0.17.2',
default_options: ['warning_level=2', 'buildtype=release', 'cpp_std=c++20'],
meson_version: '>=1.3.2' #first version with clang-cl openmp support
)
Expand Down
18 changes: 9 additions & 9 deletions src/pymodule/c_navigationinterpolatorlatlon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
//
// SPDX-License-Identifier: MPL-2.0


// automatically gernerated using python -m pybind11_mkdoc -o docstrings.h <headerfiles>



// -- c++ library headers
#include <themachinethatgoesping/tools/vectorinterpolators.hpp>
#include <themachinethatgoesping/tools_pybind/classhelper.hpp>
Expand Down Expand Up @@ -43,7 +40,7 @@ void init_c_NavigationInterpolatorLatLon(py::module& m)
py::arg("extrapolation_mode") = t_extr_mode::extrapolate)
.def("__call__",
py::overload_cast<const std::string&, double>(
&NavigationInterpolatorLatLon::compute_target_position),
&NavigationInterpolatorLatLon::compute_target_position, py::const_),
DOC(themachinethatgoesping,
navigation,
NavigationInterpolatorLatLon,
Expand All @@ -52,15 +49,15 @@ void init_c_NavigationInterpolatorLatLon(py::module& m)
py::arg("timestamp"))
.def("compute_target_position",
py::overload_cast<const std::string&, double>(
&NavigationInterpolatorLatLon::compute_target_position),
&NavigationInterpolatorLatLon::compute_target_position, py::const_),
DOC(themachinethatgoesping,
navigation,
NavigationInterpolatorLatLon,
compute_target_position),
py::arg("target_id"),
py::arg("timestamp"))
.def("get_sensor_data",
py::overload_cast<double>(&NavigationInterpolatorLatLon::get_sensor_data),
py::overload_cast<double>(&NavigationInterpolatorLatLon::get_sensor_data, py::const_),
DOC(themachinethatgoesping, navigation, NavigationInterpolatorLatLon, get_sensor_data),
py::arg("timestamp"))
.def("get_sensor_configuration",
Expand Down Expand Up @@ -176,14 +173,16 @@ void init_c_NavigationInterpolatorLatLon(py::module& m)
"interpolator_depth",
&NavigationInterpolatorLatLon::interpolator_depth,
[](NavigationInterpolatorLatLon& self,
const themachinethatgoesping::tools::vectorinterpolators::LinearInterpolator<double, float>&
const themachinethatgoesping::tools::vectorinterpolators::LinearInterpolator<double,
float>&
interpolator) { self.interpolator_depth() = interpolator; },
DOC(themachinethatgoesping, navigation, I_NavigationInterpolator, interpolator_depth))
.def_property(
"interpolator_attitude",
&NavigationInterpolatorLatLon::interpolator_attitude,
[](NavigationInterpolatorLatLon& self,
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double, float>&
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double,
float>&
interpolator) { self.interpolator_attitude() = interpolator; },
DOC(themachinethatgoesping,
navigation,
Expand All @@ -193,7 +192,8 @@ void init_c_NavigationInterpolatorLatLon(py::module& m)
"interpolator_heading",
&NavigationInterpolatorLatLon::interpolator_heading,
[](NavigationInterpolatorLatLon& self,
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double, float>&
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double,
float>&
interpolator) { self.interpolator_heading() = interpolator; },
DOC(themachinethatgoesping, navigation, I_NavigationInterpolator, interpolator_heading))
.def("merge",
Expand Down
12 changes: 7 additions & 5 deletions src/pymodule/c_navigationinterpolatorlocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void init_c_NavigationInterpolatorLocal(py::module& m)
py::arg("extrapolation_mode") = t_extr_mode::extrapolate)
.def("__call__",
py::overload_cast<const std::string&, double>(
&NavigationInterpolatorLocal::compute_target_position),
&NavigationInterpolatorLocal::compute_target_position, py::const_),
DOC(themachinethatgoesping,
navigation,
NavigationInterpolatorLocal,
Expand All @@ -49,15 +49,15 @@ void init_c_NavigationInterpolatorLocal(py::module& m)
py::arg("timestamp"))
.def("compute_target_position",
py::overload_cast<const std::string&, double>(
&NavigationInterpolatorLocal::compute_target_position),
&NavigationInterpolatorLocal::compute_target_position, py::const_),
DOC(themachinethatgoesping,
navigation,
NavigationInterpolatorLocal,
compute_target_position),
py::arg("target_id"),
py::arg("timestamp"))
.def("get_sensor_data",
py::overload_cast<double>(&NavigationInterpolatorLocal::get_sensor_data),
py::overload_cast<double>(&NavigationInterpolatorLocal::get_sensor_data, py::const_),
DOC(themachinethatgoesping, navigation, NavigationInterpolatorLocal, get_sensor_data),
py::arg("timestamp"))
.def("get_sensor_configuration",
Expand Down Expand Up @@ -179,7 +179,8 @@ void init_c_NavigationInterpolatorLocal(py::module& m)
"interpolator_attitude",
&NavigationInterpolatorLocal::interpolator_attitude,
[](NavigationInterpolatorLocal& self,
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double, float>&
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double,
float>&
interpolator) { self.interpolator_attitude() = interpolator; },
DOC(themachinethatgoesping,
navigation,
Expand All @@ -189,7 +190,8 @@ void init_c_NavigationInterpolatorLocal(py::module& m)
"interpolator_heading",
&NavigationInterpolatorLocal::interpolator_heading,
[](NavigationInterpolatorLocal& self,
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double, float>&
const themachinethatgoesping::tools::vectorinterpolators::SlerpInterpolator<double,
float>&
interpolator) { self.interpolator_heading() = interpolator; },
DOC(themachinethatgoesping, navigation, I_NavigationInterpolator, interpolator_heading))
.def("merge",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//sourcehash: 09b3f492ec3d8379b35b497d66133e467fb47e9d987b3b15b35e1a15c6fb694f
//sourcehash: 5420377404a61c1cd77c8cd0e62f58640565fc7d3b38bc20009a828e611d05fb

/*
This file contains docstrings for use in the Python bindings.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//sourcehash: 7e446b34e48cb2a7a810ade1b4796f633aa4d47951b53964a401bcb763affd31
//sourcehash: 476de4352eff680649ba6130a33daff8eaf3a8703d5b8b34cf65f848ef112ace

/*
This file contains docstrings for use in the Python bindings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class NavigationInterpolatorLatLon : public I_NavigationInterpolator
* @return data structure that contains the position of the target in the world coordinate
* system
*/
datastructures::GeolocationLatLon operator()(const std::string& target_id, double timestamp)
datastructures::GeolocationLatLon operator()(const std::string& target_id, double timestamp) const
{
return _sensor_configuration.compute_target_position(target_id, get_sensor_data(timestamp));
}
Expand All @@ -162,7 +162,7 @@ class NavigationInterpolatorLatLon : public I_NavigationInterpolator
* system
*/
datastructures::GeolocationLatLon compute_target_position(const std::string& target_id,
double timestamp)
double timestamp) const
{
return _sensor_configuration.compute_target_position(target_id, get_sensor_data(timestamp));
}
Expand All @@ -175,7 +175,7 @@ class NavigationInterpolatorLatLon : public I_NavigationInterpolator
* @return data structure that contains the sensor data interpolated for the given timestamp
* stamp
*/
datastructures::SensordataLatLon get_sensor_data(double timestamp)
datastructures::SensordataLatLon get_sensor_data(double timestamp) const
{
datastructures::SensordataLatLon sensor_data;
if (!_interpolator_depth.empty()) // default is 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class NavigationInterpolatorLocal : public I_NavigationInterpolator
* system
*/
datastructures::GeolocationLocal compute_target_position(const std::string& target_id,
double timestamp)
double timestamp) const
{
return _sensor_configuration.compute_target_position(target_id, get_sensor_data(timestamp));
}
Expand All @@ -201,7 +201,7 @@ class NavigationInterpolatorLocal : public I_NavigationInterpolator
* @return data structure that contains the sensor data interpolated for the given timestamp
* stamp
*/
datastructures::SensordataLocal get_sensor_data(double timestamp)
datastructures::SensordataLocal get_sensor_data(double timestamp) const
{
datastructures::SensordataLocal sensor_data;
if (!_interpolator_depth.empty()) // default is 0.0
Expand Down

0 comments on commit 67e992a

Please sign in to comment.