From 002d00a162b5cb13adb196cd76c68302eee56611 Mon Sep 17 00:00:00 2001 From: alfonso Date: Fri, 24 Jan 2025 01:02:56 +0100 Subject: [PATCH] Update with last version of develop branch --- .../expose_element_conversion.cpp | 10 +- .../expose_astro/expose_ephemerides.cpp | 442 +++++++++--------- .../expose_astro/expose_frame_conversion.cpp | 4 +- .../expose_astro/expose_fundamentals.cpp | 3 +- .../expose_astro/expose_gravitation.cpp | 4 +- .../expose_polyhedron_utilities.cpp | 4 +- .../expose_astro/expose_time_conversion.cpp | 56 +-- .../expose_astro/expose_two_body_dynamics.cpp | 2 +- tudatpy/kernel/expose_constants.cpp | 154 +++--- tudatpy/kernel/expose_example.cpp | 54 +-- .../kernel/expose_interface/expose_spice.cpp | 2 +- .../kernel/expose_math/expose_geometry.cpp | 1 - .../expose_math/expose_interpolators.cpp | 9 +- .../expose_numerical_integrators.cpp | 2 +- .../expose_math/expose_root_finders.cpp | 2 +- .../kernel/expose_math/expose_statistics.cpp | 150 +++--- .../kernel/expose_numerical_simulation.cpp | 6 +- .../expose_environment.cpp | 108 ++--- .../expose_environment_setup.cpp | 18 +- .../expose_aerodynamic_coefficient_setup.cpp | 9 +- .../expose_atmosphere_setup.cpp | 4 +- .../expose_ephemeris_setup.cpp | 8 +- .../expose_gravity_field_setup.cpp | 34 +- .../expose_gravity_field_variation_setup.cpp | 9 +- .../expose_ground_station_setup.cpp | 5 +- .../expose_radiation_pressure_setup.cpp | 9 +- .../expose_rigid_body_setup.cpp | 7 +- .../expose_rotation_model_setup.cpp | 12 +- .../expose_shape_deformation_setup.cpp | 5 +- .../expose_shape_setup.cpp | 9 +- .../expose_vehicle_systems_setup.cpp | 9 +- .../expose_estimation.cpp | 2 +- .../expose_estimation_setup.cpp | 2 +- .../expose_estimated_parameter_setup.cpp | 7 +- .../expose_observation_setup.cpp | 22 +- .../expose_propagation.cpp | 2 +- .../expose_propagation_setup.cpp | 3 +- .../expose_acceleration_setup.cpp | 10 +- .../expose_dependent_variable_setup.cpp | 5 +- .../expose_integrator_setup.cpp | 8 +- .../expose_mass_rate_setup.cpp | 5 +- .../expose_propagator_setup.cpp | 7 +- .../expose_thrust_setup.cpp | 7 +- .../expose_torque_setup.cpp | 1 - .../expose_shape_based_thrust.cpp | 2 +- .../expose_transfer_trajectory.cpp | 3 +- tudatpy/kernel/expose_unit_tests.cpp | 38 +- tudatpy/kernel/expose_utils.cpp | 2 +- tudatpy/kernel/expose_utils/expose_data.cpp | 2 +- tudatpy/kernel/kernel.cpp | 146 +++--- tudatpy/temp/cli/templates/cpp_class.cpp | 22 +- tudatpy/temp/cli/templates/main.cpp | 1 + tudatpy/temp/cli/templates/pybind_module.cpp | 88 ++-- .../temp/cli/templates/pybind_submodule.cpp | 56 +-- tudatpy/temp/cli/test/kernel/kernel.cpp | 72 +-- 55 files changed, 780 insertions(+), 884 deletions(-) diff --git a/tudatpy/kernel/expose_astro/expose_element_conversion.cpp b/tudatpy/kernel/expose_astro/expose_element_conversion.cpp index 49f04f4f..2e25c8d6 100644 --- a/tudatpy/kernel/expose_astro/expose_element_conversion.cpp +++ b/tudatpy/kernel/expose_astro/expose_element_conversion.cpp @@ -8,6 +8,7 @@ * http://tudat.tudelft.nl/LICENSE. */ + #include "expose_element_conversion.h" #include @@ -20,7 +21,6 @@ #include #include - namespace py = pybind11; namespace toec = tudat::orbital_element_conversions; namespace tcc = tudat::coordinate_conversions; @@ -1205,7 +1205,8 @@ numpy.ndarray */ m.def("teme_to_j2000", &te::getRotationMatrixFromTemeToJ2000, - py::arg("epoch"), R"doc( + py::arg("epoch"), + R"doc( Computes the rotation matrix from the TEME (True Equator Mean Equinox) frame to the J2000 frame, using the following: @@ -1231,7 +1232,8 @@ numpy.ndarray )doc"); m.def("j2000_to_teme", &te::getRotationMatrixFromTemeToJ2000, - py::arg("epoch"), R"doc( + py::arg("epoch"), + R"doc( Computes the rotation matrix from the J2000 to the TEME (True Equator Mean Equinox) frame, which is the inverse of the :func:`~teme_to_j2000` function. @@ -1319,5 +1321,5 @@ numpy.ndarray )doc"); } } // namespace element_conversion - } // namespace astro + } // namespace astro } // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_ephemerides.cpp b/tudatpy/kernel/expose_astro/expose_ephemerides.cpp index 00a0c57d..7d0ac1e7 100644 --- a/tudatpy/kernel/expose_astro/expose_ephemerides.cpp +++ b/tudatpy/kernel/expose_astro/expose_ephemerides.cpp @@ -1,221 +1,221 @@ -/* Copyright (c) 2010-2018, Delft University of Technology - * All rights reserved - * - * This file is part of the Tudat. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * http://tudat.tudelft.nl/LICENSE. - */ - -#include "expose_ephemerides.h" - -#include -#include -#include -#include -#include -#include // TODO: EphemerisType should be in - -namespace py = pybind11; - -namespace te = tudat::ephemerides; -namespace tss = tudat::simulation_setup; - -namespace tudatpy { - - namespace trampoline { - - class PyEphemeris : public te::Ephemeris { - public: - /* Inherit the constructors */ - using te::Ephemeris::Ephemeris; - - Eigen::Vector6d getCartesianState( - const double seconds_since_epoch) override { - PYBIND11_OVERLOAD_PURE( - Eigen::Vector6d, /* Return type */ - te::Ephemeris, /* Parent class */ - getCartesianState, /* Name of function in C++ (must match - Python name) */ - seconds_since_epoch /* Argument(s) */ - ); - } - - // Eigen::Matrix getCartesianLongState(const - // double seconds_since_epoch) override { - // PYBIND11_OVERLOAD_PURE( - // Eigen::Matrix, /* Return type */ - // te::Ephemeris, /* Parent class */ - // getCartesianLongState, /* Name of function in - // C++ (must match Python name) */ seconds_since_epoch /* - // Argument(s) */ - // ); - // } - - // Eigen::Matrix - // getCartesianStateFromExtendedTime() override { - // PYBIND11_OVERLOAD_PURE( - // Eigen::Matrix, /* Return type */ - // te::Ephemeris, /* Parent class */ - // getCartesianStateFromExtendedTime, /* Name of function in - // C++ (must match Python name) */ const Time & /* - // Argument(s) */ - // ); - // } - - // Eigen::Matrix - // getCartesianStateFromExtendedTime() override { - // PYBIND11_OVERLOAD_PURE( - // Eigen::Matrix, /* Return type */ - // te::Ephemeris, /* Parent class */ - // getCartesianStateFromExtendedTime, /* Name of function in - // C++ (must match Python name) */ const double /* - // Argument(s) */ - // ); - }; - - } // namespace trampoline - - void expose_ephemerides(py::module &m) { - /* - * ephemerides/ - * ├── approximatePlanetPositionsBase.h - * ├── approximatePlanetPositionsCircularCoplanar.h - * ├── approximatePlanetPositionsDataContainer.h - * ├── approximatePlanetPositions.h - * ├── cartesianStateExtractor.h - * ├── compositeEphemeris.h - * ├── constantEphemeris.h - * ├── constantRotationalEphemeris.h - * ├── customEphemeris.h - * ├── ephemeris.h - * ├── frameManager.h - * ├── fullPlanetaryRotationModel.h - * ├── itrsToGcrsRotationModel.h - * ├── keplerEphemeris.h - * ├── keplerStateExtractor.h - * ├── multiArcEphemeris.h - * ├── rotationalEphemeris.h - * ├── simpleRotationalEphemeris.h - * ├── synchronousRotationalEphemeris.h - * ├── tabulatedEphemeris.h - * ├── tabulatedRotationalEphemeris.h - * └── tleEphemeris.h - * - * ephemerides/ - * ├── approximatePlanetPositionsBase.cpp - * ├── approximatePlanetPositionsCircularCoplanar.cpp - * ├── approximatePlanetPositions.cpp - * ├── cartesianStateExtractor.cpp - * ├── CMakeLists.txt - * ├── compositeEphemeris.cpp - * ├── ephemeris.cpp - * ├── frameManager.cpp - * ├── fullPlanetaryRotationModel.cpp - * ├── keplerEphemeris.cpp - * ├── keplerStateExtractor.cpp - * ├── rotationalEphemeris.cpp - * ├── simpleRotationalEphemeris.cpp - * ├── synchronousRotationalEphemeris.cpp - * ├── tabulatedEphemeris.cpp - * ├── tabulatedRotationalEphemeris.cpp - * └── tleEphemeris.cpp - * - */ - ////////////////////////////////////////////////////////////////////////////// - // - ////////////////////////////////////////////////////////////////////////////// - py::class_>(m, - "Ephemeris") - .def("get_cartesian_state", &te::Ephemeris::getCartesianState, - py::arg("seconds_since_epoch") = 0.0) - .def("get_cartesian_position", &te::Ephemeris::getCartesianPosition, - py::arg("seconds_since_epoch") = 0.0) - .def("get_cartesian_velocity", &te::Ephemeris::getCartesianVelocity, - py::arg("seconds_since_epoch") = 0.0); - - py::enum_(m.attr("Ephemeris"), "EphemerisType") - .value("approximate_planet_positions", - tss::approximate_planet_positions) - .value("direct_spice_ephemeris", tss::direct_spice_ephemeris) - .value("interpolated_spice", tss::interpolated_spice) - .value("constant_ephemeris", tss::constant_ephemeris) - .value("kepler_ephemeris", tss::kepler_ephemeris) - .value("direct_tle_ephemeris", tss::direct_tle_ephemeris) - .value("interpolated_tle_ephemeris", - tss::interpolated_tle_ephemeris) - .value("custom_ephemeris", tss::custom_ephemeris); - - ////////////////////////////////////////////////////////////////////////////// - // constantEphemeris.h - ////////////////////////////////////////////////////////////////////////////// - py::class_, te::Ephemeris>( - m, "ConstantEphemeris") - .def( - py::init< - const std::function< - Eigen:: - Vector6d()>, //, - const std::string &, const std::string &>(), - py::arg("constant_state_function"), - py::arg("reference_frame_origin") = "SSB", - py::arg("reference_frame_orientation") = "ECLIPJ2000") - .def(py::init - const std::string &, const std::string &>(), - py::arg("constant_state"), - py::arg("reference_frame_origin") = "SSB", - py::arg("reference_frame_orientation") = "ECLIPJ2000") - .def("update_constant_state", - &te::ConstantEphemeris::updateConstantState, - py::arg("new_state")); - - ////////////////////////////////////////////////////////////////////////////// - // keplerEphemeris.h - ////////////////////////////////////////////////////////////////////////////// - - py::class_, - te::Ephemeris>(m, "KeplerEphemeris"); - - ////////////////////////////////////////////////////////////////////////////// - // tleEphemeris.h / tleEphemeris.cpp - ////////////////////////////////////////////////////////////////////////////// - py::class_>(m, "Tle") - .def(py::init< // ctor 1 - const std::string &>(), - py::arg("lines")) - .def(py::init< // ctor 2 - const std::string &, const std::string &>(), - py::arg("line_1"), py::arg("line_2")) - .def("get_epoch", &te::Tle::getEpoch) - .def("get_b_star", &te::Tle::getBStar) - .def("get_epoch", &te::Tle::getEpoch) - .def("get_inclination", &te::Tle::getInclination) - .def("get_right_ascension", &te::Tle::getRightAscension) - .def("get_eccentricity", &te::Tle::getEccentricity) - .def("get_arg_of_perigee", &te::Tle::getArgOfPerigee) - .def("get_mean_anomaly", &te::Tle::getMeanAnomaly) - .def("get_mean_motion", &te::Tle::getMeanMotion); - - py::class_, - te::Ephemeris>(m, "TleEphemeris") - .def(py::init, const bool>(), - py::arg("frame_origin") = "Earth", - py::arg("frame_orientation") = "J2000", - py::arg("tle") = nullptr, py::arg("use_sdp") = false); - - ////////////////////////////////////////////////////////////////////////////// - // tabulatedEphemeris.h - ////////////////////////////////////////////////////////////////////////////// - py::class_< - te::TabulatedCartesianEphemeris, - std::shared_ptr>, - te::Ephemeris>(m, "TabulatedEphemeris") - .def("reset_interpolator", - &te::TabulatedCartesianEphemeris::resetInterpolator, - py::arg("interpolator")); - }; -} // namespace tudatpy +/* Copyright (c) 2010-2018, Delft University of Technology + * All rights reserved + * + * This file is part of the Tudat. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * http://tudat.tudelft.nl/LICENSE. + */ + +#include "expose_ephemerides.h" + +#include +#include +#include +#include +#include +#include // TODO: EphemerisType should be in + +namespace py = pybind11; + +namespace te = tudat::ephemerides; +namespace tss = tudat::simulation_setup; + +namespace tudatpy { + + namespace trampoline { + + class PyEphemeris : public te::Ephemeris { + public: + /* Inherit the constructors */ + using te::Ephemeris::Ephemeris; + + Eigen::Vector6d getCartesianState( + const double seconds_since_epoch) override { + PYBIND11_OVERLOAD_PURE( + Eigen::Vector6d, /* Return type */ + te::Ephemeris, /* Parent class */ + getCartesianState, /* Name of function in C++ (must match + Python name) */ + seconds_since_epoch /* Argument(s) */ + ); + } + + // Eigen::Matrix getCartesianLongState(const + // double seconds_since_epoch) override { + // PYBIND11_OVERLOAD_PURE( + // Eigen::Matrix, /* Return type */ + // te::Ephemeris, /* Parent class */ + // getCartesianLongState, /* Name of function in + // C++ (must match Python name) */ seconds_since_epoch /* + // Argument(s) */ + // ); + // } + + // Eigen::Matrix + // getCartesianStateFromExtendedTime() override { + // PYBIND11_OVERLOAD_PURE( + // Eigen::Matrix, /* Return type */ + // te::Ephemeris, /* Parent class */ + // getCartesianStateFromExtendedTime, /* Name of function in + // C++ (must match Python name) */ const Time & /* + // Argument(s) */ + // ); + // } + + // Eigen::Matrix + // getCartesianStateFromExtendedTime() override { + // PYBIND11_OVERLOAD_PURE( + // Eigen::Matrix, /* Return type */ + // te::Ephemeris, /* Parent class */ + // getCartesianStateFromExtendedTime, /* Name of function in + // C++ (must match Python name) */ const double /* + // Argument(s) */ + // ); + }; + + } // namespace trampoline + + void expose_ephemerides(py::module &m) { + /* + * ephemerides/ + * ├── approximatePlanetPositionsBase.h + * ├── approximatePlanetPositionsCircularCoplanar.h + * ├── approximatePlanetPositionsDataContainer.h + * ├── approximatePlanetPositions.h + * ├── cartesianStateExtractor.h + * ├── compositeEphemeris.h + * ├── constantEphemeris.h + * ├── constantRotationalEphemeris.h + * ├── customEphemeris.h + * ├── ephemeris.h + * ├── frameManager.h + * ├── fullPlanetaryRotationModel.h + * ├── itrsToGcrsRotationModel.h + * ├── keplerEphemeris.h + * ├── keplerStateExtractor.h + * ├── multiArcEphemeris.h + * ├── rotationalEphemeris.h + * ├── simpleRotationalEphemeris.h + * ├── synchronousRotationalEphemeris.h + * ├── tabulatedEphemeris.h + * ├── tabulatedRotationalEphemeris.h + * └── tleEphemeris.h + * + * ephemerides/ + * ├── approximatePlanetPositionsBase.cpp + * ├── approximatePlanetPositionsCircularCoplanar.cpp + * ├── approximatePlanetPositions.cpp + * ├── cartesianStateExtractor.cpp + * ├── CMakeLists.txt + * ├── compositeEphemeris.cpp + * ├── ephemeris.cpp + * ├── frameManager.cpp + * ├── fullPlanetaryRotationModel.cpp + * ├── keplerEphemeris.cpp + * ├── keplerStateExtractor.cpp + * ├── rotationalEphemeris.cpp + * ├── simpleRotationalEphemeris.cpp + * ├── synchronousRotationalEphemeris.cpp + * ├── tabulatedEphemeris.cpp + * ├── tabulatedRotationalEphemeris.cpp + * └── tleEphemeris.cpp + * + */ + ////////////////////////////////////////////////////////////////////////////// + // + ////////////////////////////////////////////////////////////////////////////// + py::class_>(m, + "Ephemeris") + .def("get_cartesian_state", &te::Ephemeris::getCartesianState, + py::arg("seconds_since_epoch") = 0.0) + .def("get_cartesian_position", &te::Ephemeris::getCartesianPosition, + py::arg("seconds_since_epoch") = 0.0) + .def("get_cartesian_velocity", &te::Ephemeris::getCartesianVelocity, + py::arg("seconds_since_epoch") = 0.0); + + py::enum_(m.attr("Ephemeris"), "EphemerisType") + .value("approximate_planet_positions", + tss::approximate_planet_positions) + .value("direct_spice_ephemeris", tss::direct_spice_ephemeris) + .value("interpolated_spice", tss::interpolated_spice) + .value("constant_ephemeris", tss::constant_ephemeris) + .value("kepler_ephemeris", tss::kepler_ephemeris) + .value("direct_tle_ephemeris", tss::direct_tle_ephemeris) + .value("interpolated_tle_ephemeris", + tss::interpolated_tle_ephemeris) + .value("custom_ephemeris", tss::custom_ephemeris); + + ////////////////////////////////////////////////////////////////////////////// + // constantEphemeris.h + ////////////////////////////////////////////////////////////////////////////// + py::class_, te::Ephemeris>( + m, "ConstantEphemeris") + .def( + py::init< + const std::function< + Eigen:: + Vector6d()>, //, + const std::string &, const std::string &>(), + py::arg("constant_state_function"), + py::arg("reference_frame_origin") = "SSB", + py::arg("reference_frame_orientation") = "ECLIPJ2000") + .def(py::init + const std::string &, const std::string &>(), + py::arg("constant_state"), + py::arg("reference_frame_origin") = "SSB", + py::arg("reference_frame_orientation") = "ECLIPJ2000") + .def("update_constant_state", + &te::ConstantEphemeris::updateConstantState, + py::arg("new_state")); + + ////////////////////////////////////////////////////////////////////////////// + // keplerEphemeris.h + ////////////////////////////////////////////////////////////////////////////// + + py::class_, + te::Ephemeris>(m, "KeplerEphemeris"); + + ////////////////////////////////////////////////////////////////////////////// + // tleEphemeris.h / tleEphemeris.cpp + ////////////////////////////////////////////////////////////////////////////// + py::class_>(m, "Tle") + .def(py::init< // ctor 1 + const std::string &>(), + py::arg("lines")) + .def(py::init< // ctor 2 + const std::string &, const std::string &>(), + py::arg("line_1"), py::arg("line_2")) + .def("get_epoch", &te::Tle::getEpoch) + .def("get_b_star", &te::Tle::getBStar) + .def("get_epoch", &te::Tle::getEpoch) + .def("get_inclination", &te::Tle::getInclination) + .def("get_right_ascension", &te::Tle::getRightAscension) + .def("get_eccentricity", &te::Tle::getEccentricity) + .def("get_arg_of_perigee", &te::Tle::getArgOfPerigee) + .def("get_mean_anomaly", &te::Tle::getMeanAnomaly) + .def("get_mean_motion", &te::Tle::getMeanMotion); + + py::class_, + te::Ephemeris>(m, "TleEphemeris") + .def(py::init, const bool>(), + py::arg("frame_origin") = "Earth", + py::arg("frame_orientation") = "J2000", + py::arg("tle") = nullptr, py::arg("use_sdp") = false); + + ////////////////////////////////////////////////////////////////////////////// + // tabulatedEphemeris.h + ////////////////////////////////////////////////////////////////////////////// + py::class_< + te::TabulatedCartesianEphemeris, + std::shared_ptr>, + te::Ephemeris>(m, "TabulatedEphemeris") + .def("reset_interpolator", + &te::TabulatedCartesianEphemeris::resetInterpolator, + py::arg("interpolator")); + }; +} // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_frame_conversion.cpp b/tudatpy/kernel/expose_astro/expose_frame_conversion.cpp index 0dc33ac4..47589758 100644 --- a/tudatpy/kernel/expose_astro/expose_frame_conversion.cpp +++ b/tudatpy/kernel/expose_astro/expose_frame_conversion.cpp @@ -8,6 +8,7 @@ * http://tudat.tudelft.nl/LICENSE. */ + #include "expose_frame_conversion.h" #include @@ -17,7 +18,6 @@ #include #include - namespace trf = tudat::reference_frames; namespace te = tudat::ephemerides; @@ -315,5 +315,5 @@ Euler angle rotation (see Archinal et al. [1]_). } } // namespace frame_conversion - } // namespace astro + } // namespace astro } // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_fundamentals.cpp b/tudatpy/kernel/expose_astro/expose_fundamentals.cpp index 182dd58d..ce8441dc 100644 --- a/tudatpy/kernel/expose_astro/expose_fundamentals.cpp +++ b/tudatpy/kernel/expose_astro/expose_fundamentals.cpp @@ -14,7 +14,6 @@ #include #include - namespace py = pybind11; namespace tmg = tudat::mission_geometry; @@ -62,5 +61,5 @@ float } } // namespace fundamentals - } // namespace astro + } // namespace astro } // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_gravitation.cpp b/tudatpy/kernel/expose_astro/expose_gravitation.cpp index 16326785..9e917751 100644 --- a/tudatpy/kernel/expose_astro/expose_gravitation.cpp +++ b/tudatpy/kernel/expose_astro/expose_gravitation.cpp @@ -8,6 +8,7 @@ * http://tudat.tudelft.nl/LICENSE. */ + #include "expose_gravitation.h" #include @@ -16,7 +17,6 @@ #include #include - namespace py = pybind11; namespace tg = tudat::gravitation; namespace tbm = tudat::basic_mathematics; @@ -194,5 +194,5 @@ tuple[numpy.ndarray, numpy.ndarray] } // namespace gravitation - } // namespace astro + } // namespace astro } // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_polyhedron_utilities.cpp b/tudatpy/kernel/expose_astro/expose_polyhedron_utilities.cpp index f7904924..804aaa2f 100644 --- a/tudatpy/kernel/expose_astro/expose_polyhedron_utilities.cpp +++ b/tudatpy/kernel/expose_astro/expose_polyhedron_utilities.cpp @@ -8,6 +8,7 @@ * http://tudat.tudelft.nl/LICENSE. */ + #include "expose_polyhedron_utilities.h" #include @@ -16,7 +17,6 @@ #include #include - namespace tba = tudat::basic_astrodynamics; namespace py = pybind11; @@ -247,5 +247,5 @@ numpy.ndarray } } // namespace polyhedron_utilities - } // namespace astro + } // namespace astro } // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_time_conversion.cpp b/tudatpy/kernel/expose_astro/expose_time_conversion.cpp index f2ad3c7e..8461cd50 100644 --- a/tudatpy/kernel/expose_astro/expose_time_conversion.cpp +++ b/tudatpy/kernel/expose_astro/expose_time_conversion.cpp @@ -694,7 +694,8 @@ In this example, the number of seconds that have elapsed at the Julian day `2451 // Time scales conversion (inputs and outputs are always time in // seconds since J2000) m.def("TCB_to_TDB", &tba::convertTcbToTdb, - py::arg("TCB_time"), R"doc( + py::arg("TCB_time"), + R"doc( Convert time from the TCB scale to the TDB scale. @@ -735,7 +736,8 @@ Then, this date and time is converted from the TCB scale to the TDB scale. )doc"); m.def("TDB_to_TCB", &tba::convertTdbToTcb, - py::arg("TDB_time"), R"doc( + py::arg("TDB_time"), + R"doc( Convert time from the TBD scale to the TCB scale. @@ -761,7 +763,8 @@ float )doc"); m.def("TCG_to_TT", &tba::convertTcgToTt, - py::arg("TCG_time"), R"doc( + py::arg("TCG_time"), + R"doc( Convert time from the TCG scale to the TT scale. @@ -784,7 +787,8 @@ float )doc"); m.def("TT_to_TCG", &tba::convertTtToTcg, - py::arg("TT_time"), R"doc( + py::arg("TT_time"), + R"doc( Convert time from the TT scale to the TCG scale. @@ -810,7 +814,8 @@ float )doc"); m.def("TAI_to_TT", &tba::convertTAItoTT, - py::arg("TAI_time"), R"doc( + py::arg("TAI_time"), + R"doc( Convert time from the TAI scale to the TT scale. @@ -833,7 +838,8 @@ float )doc"); m.def("TT_to_TAI", &tba::convertTTtoTAI, - py::arg("TT_time"), R"doc( + py::arg("TT_time"), + R"doc( Convert time from the TT scale to the TAI scale. @@ -949,20 +955,15 @@ float Enumeration of available time scales between which the :class:`~TimeScaleConverter` can automaticaly convert. )doc") - .value("tai_scale", tba::tai_scale, - R"doc( + .value("tai_scale", tba::tai_scale, R"doc( )doc") - .value("tt_scale", tba::tt_scale, - R"doc( + .value("tt_scale", tba::tt_scale, R"doc( )doc") - .value("tdb_scale", tba::tdb_scale, - R"doc( + .value("tdb_scale", tba::tdb_scale, R"doc( )doc") - .value("utc_scale", tba::utc_scale, - R"doc( + .value("utc_scale", tba::utc_scale, R"doc( )doc") - .value("ut1_scale", tba::ut1_scale, - R"doc( + .value("ut1_scale", tba::ut1_scale, R"doc( )doc") .export_values(); @@ -1020,8 +1021,7 @@ TimeScaleConverter Eigen::Vector3d::Zero()); - py::class_(m, "DateTime", - R"doc( + py::class_(m, "DateTime", R"doc( Class to store a calendar date and time of day, with high resolution. @@ -1042,8 +1042,7 @@ TimeScaleConverter py::arg("hour") = 12, py::arg("minute") = 0, py::arg("seconds") = 0.0L) .def_property("year", &tba::DateTime::getYear, - &tba::DateTime::setYear, - R"doc( + &tba::DateTime::setYear, R"doc( Calendar year @@ -1051,8 +1050,7 @@ TimeScaleConverter :type: int )doc") .def_property("month", &tba::DateTime::getMonth, - &tba::DateTime::setMonth, - R"doc( + &tba::DateTime::setMonth, R"doc( Calendar month (value must be 1-12) @@ -1060,8 +1058,7 @@ TimeScaleConverter :type: int )doc") .def_property("day", &tba::DateTime::getDay, - &tba::DateTime::setDay, - R"doc( + &tba::DateTime::setDay, R"doc( Calendar day in current month, value must be larger than 0, and smaller or equal to the number of days in the month @@ -1069,8 +1066,7 @@ TimeScaleConverter :type: int )doc") .def_property("hour", &tba::DateTime::getHour, - &tba::DateTime::setHour, - R"doc( + &tba::DateTime::setHour, R"doc( Full hours into the current day (value must be 0-23) @@ -1078,8 +1074,7 @@ TimeScaleConverter :type: int )doc") .def_property("minute", &tba::DateTime::getMinute, - &tba::DateTime::setMinute, - R"doc( + &tba::DateTime::setMinute, R"doc( Full minutes into the current hour (value must be 0-59) @@ -1087,8 +1082,7 @@ TimeScaleConverter :type: int )doc") .def_property("seconds", &tba::DateTime::getSeconds, - &tba::DateTime::setSeconds, - R"doc( + &tba::DateTime::setSeconds, R"doc( Number of seconds into the current minute. Note that this value is stored as ``long double`` in Tudat, which may be 64-bit or 80-bit (16 or 19 digits) depending on the compiler used. @@ -1331,5 +1325,5 @@ DateTime tba::JULIAN_DAY_ON_J2000); } } // namespace time_conversion - } // namespace astro + } // namespace astro } // namespace tudatpy diff --git a/tudatpy/kernel/expose_astro/expose_two_body_dynamics.cpp b/tudatpy/kernel/expose_astro/expose_two_body_dynamics.cpp index be86c3e1..a9e70346 100644 --- a/tudatpy/kernel/expose_astro/expose_two_body_dynamics.cpp +++ b/tudatpy/kernel/expose_astro/expose_two_body_dynamics.cpp @@ -8,6 +8,7 @@ * http://tudat.tudelft.nl/LICENSE. */ + #include "expose_two_body_dynamics.h" #include @@ -15,7 +16,6 @@ #include #include - namespace py = pybind11; namespace tms = tudat::mission_segments; namespace trf = tudat::root_finders; diff --git a/tudatpy/kernel/expose_constants.cpp b/tudatpy/kernel/expose_constants.cpp index 623dde15..82cf0d2a 100644 --- a/tudatpy/kernel/expose_constants.cpp +++ b/tudatpy/kernel/expose_constants.cpp @@ -1,77 +1,77 @@ -/* Copyright (c) 2010-2018, Delft University of Technology - * All rights reserved - * - * This file is part of the Tudat. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * http://tudat.tudelft.nl/LICENSE. - */ - -#include "expose_constants.h" - -#include -#include - -#include "tudat/astro/basic_astro/timeConversions.h" -#include "tudat/constants.h" - -namespace py = pybind11; -namespace tbc = tudat::celestial_body_constants; -namespace tpc = tudat::physical_constants; -namespace tmc = tudat::mathematical_constants; -namespace tba = tudat::basic_astrodynamics; - -namespace tudatpy { - namespace constants { - void expose_constants(py::module &m) { - m.attr("__doc__") = R"doc(No documentation found.)doc"; - - // physicalConstants.h - m.attr("SEA_LEVEL_GRAVITATIONAL_ACCELERATION") = - tpc::SEA_LEVEL_GRAVITATIONAL_ACCELERATION; - m.attr("JULIAN_DAY") = tpc::JULIAN_DAY; - m.attr("JULIAN_DAY_LONG") = tpc::JULIAN_DAY_LONG; - m.attr("JULIAN_YEAR_IN_DAYS") = tpc::JULIAN_YEAR_IN_DAYS; - m.attr("JULIAN_YEAR_IN_DAYS_LONG") = tpc::JULIAN_YEAR_IN_DAYS_LONG; - m.attr("JULIAN_YEAR") = tpc::JULIAN_YEAR; - m.attr("SIDEREAL_DAY") = tpc::SIDEREAL_DAY; - m.attr("SIDEREAL_YEAR_IN_DAYS") = tpc::SIDEREAL_YEAR_IN_DAYS; - m.attr("SIDEREAL_YEAR") = tpc::SIDEREAL_YEAR; - m.attr("SPEED_OF_LIGHT") = tpc::SPEED_OF_LIGHT; - m.attr("SPEED_OF_LIGHT_LONG") = tpc::SPEED_OF_LIGHT_LONG; - m.attr("GRAVITATIONAL_CONSTANT") = tpc::GRAVITATIONAL_CONSTANT; - m.attr("ASTRONOMICAL_UNIT") = tpc::ASTRONOMICAL_UNIT; - m.attr("SPECIFIC_GAS_CONSTANT_AIR") = - tpc::SPECIFIC_GAS_CONSTANT_AIR; - m.attr("MOLAR_GAS_CONSTANT") = tpc::MOLAR_GAS_CONSTANT; - m.attr("PLANCK_CONSTANT") = tpc::PLANCK_CONSTANT; - m.attr("BOLTZMANN_CONSTANT") = tpc::BOLTZMANN_CONSTANT; - m.attr("STEFAN_BOLTZMANN_CONSTANT") = - tpc::STEFAN_BOLTZMANN_CONSTANT; - m.attr("INVERSE_SQUARE_SPEED_OF_LIGHT") = - tpc::INVERSE_SQUARE_SPEED_OF_LIGHT; - m.attr("INVERSE_CUBIC_SPEED_OF_LIGHT") = - tpc::INVERSE_CUBIC_SPEED_OF_LIGHT; - m.attr("INVERSE_QUARTIC_SPEED_OF_LIGHT") = - tpc::INVERSE_QUARTIC_SPEED_OF_LIGHT; - m.attr("INVERSE_QUINTIC_SPEED_OF_LIGHT") = - tpc::INVERSE_QUINTIC_SPEED_OF_LIGHT; - m.attr("VACUUM_PERMEABILITY") = tpc::VACUUM_PERMEABILITY; - m.attr("VACUUM_PERMITTIVITY") = tpc::VACUUM_PERMITTIVITY; - m.attr("LG_TIME_RATE_TERM") = tpc::LG_TIME_RATE_TERM; - m.attr("LG_TIME_RATE_TERM_LONG") = tpc::LG_TIME_RATE_TERM_LONG; - - // time constants - m.attr("JULIAN_DAY_ON_J2000") = tba::JULIAN_DAY_ON_J2000; - m.attr("JULIAN_DAY_AT_0_MJD") = tba::JULIAN_DAY_AT_0_MJD; - - // mathematicalConstants.h - m.attr("E") = tmc::E; - m.attr("GOLDEN_RATIO") = tmc::GOLDEN_RATIO; - m.attr("COMPLEX_I") = tmc::COMPLEX_I; - m.attr("PI") = tmc::PI; - m.attr("TUDAT_NAN") = TUDAT_NAN; - }; - } // namespace constants -} // namespace tudatpy +/* Copyright (c) 2010-2018, Delft University of Technology + * All rights reserved + * + * This file is part of the Tudat. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * http://tudat.tudelft.nl/LICENSE. + */ + +#include "expose_constants.h" + +#include +#include + +#include "tudat/astro/basic_astro/timeConversions.h" +#include "tudat/constants.h" + +namespace py = pybind11; +namespace tbc = tudat::celestial_body_constants; +namespace tpc = tudat::physical_constants; +namespace tmc = tudat::mathematical_constants; +namespace tba = tudat::basic_astrodynamics; + +namespace tudatpy { + namespace constants { + void expose_constants(py::module &m) { + m.attr("__doc__") = R"doc(No documentation found)doc"; + + // physicalConstants.h + m.attr("SEA_LEVEL_GRAVITATIONAL_ACCELERATION") = + tpc::SEA_LEVEL_GRAVITATIONAL_ACCELERATION; + m.attr("JULIAN_DAY") = tpc::JULIAN_DAY; + m.attr("JULIAN_DAY_LONG") = tpc::JULIAN_DAY_LONG; + m.attr("JULIAN_YEAR_IN_DAYS") = tpc::JULIAN_YEAR_IN_DAYS; + m.attr("JULIAN_YEAR_IN_DAYS_LONG") = tpc::JULIAN_YEAR_IN_DAYS_LONG; + m.attr("JULIAN_YEAR") = tpc::JULIAN_YEAR; + m.attr("SIDEREAL_DAY") = tpc::SIDEREAL_DAY; + m.attr("SIDEREAL_YEAR_IN_DAYS") = tpc::SIDEREAL_YEAR_IN_DAYS; + m.attr("SIDEREAL_YEAR") = tpc::SIDEREAL_YEAR; + m.attr("SPEED_OF_LIGHT") = tpc::SPEED_OF_LIGHT; + m.attr("SPEED_OF_LIGHT_LONG") = tpc::SPEED_OF_LIGHT_LONG; + m.attr("GRAVITATIONAL_CONSTANT") = tpc::GRAVITATIONAL_CONSTANT; + m.attr("ASTRONOMICAL_UNIT") = tpc::ASTRONOMICAL_UNIT; + m.attr("SPECIFIC_GAS_CONSTANT_AIR") = + tpc::SPECIFIC_GAS_CONSTANT_AIR; + m.attr("MOLAR_GAS_CONSTANT") = tpc::MOLAR_GAS_CONSTANT; + m.attr("PLANCK_CONSTANT") = tpc::PLANCK_CONSTANT; + m.attr("BOLTZMANN_CONSTANT") = tpc::BOLTZMANN_CONSTANT; + m.attr("STEFAN_BOLTZMANN_CONSTANT") = + tpc::STEFAN_BOLTZMANN_CONSTANT; + m.attr("INVERSE_SQUARE_SPEED_OF_LIGHT") = + tpc::INVERSE_SQUARE_SPEED_OF_LIGHT; + m.attr("INVERSE_CUBIC_SPEED_OF_LIGHT") = + tpc::INVERSE_CUBIC_SPEED_OF_LIGHT; + m.attr("INVERSE_QUARTIC_SPEED_OF_LIGHT") = + tpc::INVERSE_QUARTIC_SPEED_OF_LIGHT; + m.attr("INVERSE_QUINTIC_SPEED_OF_LIGHT") = + tpc::INVERSE_QUINTIC_SPEED_OF_LIGHT; + m.attr("VACUUM_PERMEABILITY") = tpc::VACUUM_PERMEABILITY; + m.attr("VACUUM_PERMITTIVITY") = tpc::VACUUM_PERMITTIVITY; + m.attr("LG_TIME_RATE_TERM") = tpc::LG_TIME_RATE_TERM; + m.attr("LG_TIME_RATE_TERM_LONG") = tpc::LG_TIME_RATE_TERM_LONG; + + // time constants + m.attr("JULIAN_DAY_ON_J2000") = tba::JULIAN_DAY_ON_J2000; + m.attr("JULIAN_DAY_AT_0_MJD") = tba::JULIAN_DAY_AT_0_MJD; + + // mathematicalConstants.h + m.attr("E") = tmc::E; + m.attr("GOLDEN_RATIO") = tmc::GOLDEN_RATIO; + m.attr("COMPLEX_I") = tmc::COMPLEX_I; + m.attr("PI") = tmc::PI; + m.attr("TUDAT_NAN") = TUDAT_NAN; + }; + } // namespace constants +} // namespace tudatpy diff --git a/tudatpy/kernel/expose_example.cpp b/tudatpy/kernel/expose_example.cpp index 43227bac..6824e66a 100644 --- a/tudatpy/kernel/expose_example.cpp +++ b/tudatpy/kernel/expose_example.cpp @@ -1,27 +1,27 @@ -///* Copyright (c) 2010-2018, Delft University of Technology -// * All rights reserved -// * -// * This file is part of the Tudat. Redistribution and use in source and -// * binary forms, with or without modification, are permitted exclusively -// * under the terms of the Modified BSD license. You should have received -// * a copy of the license with this file. If not, please or visit: -// * http://tudat.tudelft.nl/LICENSE. -// */ -// -//#include "expose_example.h" -// -//#include -// -//#include -// -// namespace py = pybind11; -// -// namespace tudatpy { -// -// void expose_example(py::module &m) { -// -// m.def("apollo_aerodynamics_coefficient_interface", -// &tudat::unit_tests::getApolloCoefficientInterface); -//} -// -//}// namespace tudatpy +///* Copyright (c) 2010-2018, Delft University of Technology +// * All rights reserved +// * +// * This file is part of the Tudat. Redistribution and use in source and +// * binary forms, with or without modification, are permitted exclusively +// * under the terms of the Modified BSD license. You should have received +// * a copy of the license with this file. If not, please or visit: +// * http://tudat.tudelft.nl/LICENSE. +// */ +// +//#include "expose_example.h" +// +//#include +// +//#include +// +// namespace py = pybind11; +// +// namespace tudatpy { +// +// void expose_example(py::module &m) { +// +// m.def("apollo_aerodynamics_coefficient_interface", +// &tudat::unit_tests::getApolloCoefficientInterface); +//} +// +//}// namespace tudatpy diff --git a/tudatpy/kernel/expose_interface/expose_spice.cpp b/tudatpy/kernel/expose_interface/expose_spice.cpp index 89225b57..6f07f46c 100644 --- a/tudatpy/kernel/expose_interface/expose_spice.cpp +++ b/tudatpy/kernel/expose_interface/expose_spice.cpp @@ -767,5 +767,5 @@ None }; } // namespace spice - } // namespace interface + } // namespace interface } // namespace tudatpy diff --git a/tudatpy/kernel/expose_math/expose_geometry.cpp b/tudatpy/kernel/expose_math/expose_geometry.cpp index af7a682f..b40895d9 100644 --- a/tudatpy/kernel/expose_math/expose_geometry.cpp +++ b/tudatpy/kernel/expose_math/expose_geometry.cpp @@ -17,7 +17,6 @@ namespace py = pybind11; - namespace tgs = tudat::geometric_shapes; namespace tudatpy { diff --git a/tudatpy/kernel/expose_math/expose_interpolators.cpp b/tudatpy/kernel/expose_math/expose_interpolators.cpp index f397e9ed..faad86f6 100644 --- a/tudatpy/kernel/expose_math/expose_interpolators.cpp +++ b/tudatpy/kernel/expose_math/expose_interpolators.cpp @@ -54,8 +54,7 @@ namespace tudatpy { void expose_interpolators(py::module &m) { py::enum_( - m, "BoundaryInterpolationType", - R"doc( + m, "BoundaryInterpolationType", R"doc( Enumeration of types of behaviour to be used beyond the edges of the interpolation domain. @@ -74,7 +73,6 @@ namespace tudatpy { R"doc( The program will terminate with an error message when the interpolator is interrogated beyond the range :math:`[t_{0}...t_{N}]` )doc") - .value("use_boundary_value", ti::BoundaryInterpolationType::use_boundary_value, R"doc( @@ -132,8 +130,7 @@ With this option, the algorithm uses a binary search algorithm to find the neare .export_values(); py::enum_( - m, "LagrangeInterpolatorBoundaryHandling", - R"doc( + m, "LagrangeInterpolatorBoundaryHandling", R"doc( Enumeration of types of behaviour to be used close to the edges of the interpolation domain, for the Lagrange interpolator. @@ -656,5 +653,5 @@ OneDimensionalInterpolatorMatrix } } // namespace interpolators - } // namespace math + } // namespace math } // namespace tudatpy diff --git a/tudatpy/kernel/expose_math/expose_numerical_integrators.cpp b/tudatpy/kernel/expose_math/expose_numerical_integrators.cpp index 7d28c47f..9edd721a 100644 --- a/tudatpy/kernel/expose_math/expose_numerical_integrators.cpp +++ b/tudatpy/kernel/expose_math/expose_numerical_integrators.cpp @@ -40,7 +40,7 @@ namespace tudatpy { /// std::shared_ptr> / >(m, /// "RungeKutta4Integrator") / .def(py::init< / const - /// stateDerivativeFunction &, / const double, / const double + ///stateDerivativeFunction &, / const double, / const double /// &>()); // // Alias diff --git a/tudatpy/kernel/expose_math/expose_root_finders.cpp b/tudatpy/kernel/expose_math/expose_root_finders.cpp index 696bae98..0ce93be7 100644 --- a/tudatpy/kernel/expose_math/expose_root_finders.cpp +++ b/tudatpy/kernel/expose_math/expose_root_finders.cpp @@ -277,6 +277,6 @@ RootFinderSettings } } // namespace root_finders - } // namespace math + } // namespace math } // namespace tudatpy diff --git a/tudatpy/kernel/expose_math/expose_statistics.cpp b/tudatpy/kernel/expose_math/expose_statistics.cpp index 4b9bcf57..65919aa8 100644 --- a/tudatpy/kernel/expose_math/expose_statistics.cpp +++ b/tudatpy/kernel/expose_math/expose_statistics.cpp @@ -1,75 +1,75 @@ -/* Copyright (c) 2010-2018, Delft University of Technology - * All rights reserved - * - * This file is part of the Tudat. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * http://tudat.tudelft.nl/LICENSE. - */ - -#include "expose_statistics.h" - -#include -#include -#include -#include - -#include "tudat/astro/system_models/timingSystem.h" - -namespace py = pybind11; - -namespace ts = tudat::statistics; -namespace tsm = tudat::system_models; - -namespace tudatpy { - - void expose_statistics(py::module &m) { - m.def("calculate_allan_variance_of_dataset", - &ts::calculateAllanVarianceOfTimeDataSet, - py::arg("timing_errors"), py::arg("time_step_size"), - R"doc(No documentation found.)doc"); - - m.def("convert_allan_variance_amplitudes_to_phase_noise_amplitudes", - &tsm::convertAllanVarianceAmplitudesToPhaseNoiseAmplitudes, - py::arg("allan_variance_amplitudes"), - py::arg("frequency_domain_cutoff_frequency"), - py::arg("is_inverse_square_term_flicker_phase_noise") = 0, - R"doc(No documentation found.)doc"); - -#if(TUDAT_BUILD_WITH_FFTW3) - m.def("generate_noise_from_allan_deviation", &tsm::generateClockNoise, - py::arg("allan_variance_amplitudes"), py::arg("start_time"), - py::arg("end_time"), py::arg("number_of_time_steps"), - py::arg("is_inverse_square_term_flicker_phase_noise") = 0, - py::arg("seed") = - ts::defaultRandomSeedGenerator->getRandomVariableValue(), - R"doc(No documentation found.)doc"); - - m.def("generate_colored_clock_noise", &tsm::generateColoredClockNoise, - py::arg("allan_variance_amplitudes"), py::arg("variance_type"), - py::arg("start_time"), py::arg("end_time"), - py::arg("number_of_time_steps"), - py::arg("seed") = - ts::defaultRandomSeedGenerator->getRandomVariableValue(), - R"doc(No documentation found.)doc"); - - m.def("get_clock_noise_interpolator", &tsm::getClockNoiseInterpolator, - py::arg("allan_variance_amplitudes"), py::arg("start_time"), - py::arg("end_time"), py::arg("time_step"), - py::arg("is_inverse_square_term_flicker_phase_noise") = 0, - py::arg("seed") = - ts::defaultRandomSeedGenerator->getRandomVariableValue(), - R"doc(No documentation found.)doc"); - - m.def("get_colored_clock_noise_interpolator", - &tsm::getColoredClockNoiseInterpolator, - py::arg("allan_variance_nodes"), py::arg("variance_type"), - py::arg("start_time"), py::arg("end_time"), py::arg("time_step"), - py::arg("seed") = - ts::defaultRandomSeedGenerator->getRandomVariableValue(), - R"doc(No documentation found.)doc"); -#endif - }; - -} // namespace tudatpy +/* Copyright (c) 2010-2018, Delft University of Technology + * All rights reserved + * + * This file is part of the Tudat. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * http://tudat.tudelft.nl/LICENSE. + */ + +#include "expose_statistics.h" + +#include +#include +#include +#include + +#include "tudat/astro/system_models/timingSystem.h" + +namespace py = pybind11; + +namespace ts = tudat::statistics; +namespace tsm = tudat::system_models; + +namespace tudatpy { + + void expose_statistics(py::module &m) { + m.def("calculate_allan_variance_of_dataset", + &ts::calculateAllanVarianceOfTimeDataSet, + py::arg("timing_errors"), py::arg("time_step_size"), + R"doc(No documentation found.)doc"); + + m.def("convert_allan_variance_amplitudes_to_phase_noise_amplitudes", + &tsm::convertAllanVarianceAmplitudesToPhaseNoiseAmplitudes, + py::arg("allan_variance_amplitudes"), + py::arg("frequency_domain_cutoff_frequency"), + py::arg("is_inverse_square_term_flicker_phase_noise") = 0, + R"doc(No documentation found.)doc"); + +#if(TUDAT_BUILD_WITH_FFTW3) + m.def("generate_noise_from_allan_deviation", &tsm::generateClockNoise, + py::arg("allan_variance_amplitudes"), py::arg("start_time"), + py::arg("end_time"), py::arg("number_of_time_steps"), + py::arg("is_inverse_square_term_flicker_phase_noise") = 0, + py::arg("seed") = + ts::defaultRandomSeedGenerator->getRandomVariableValue(), + R"doc(No documentation found.)doc"); + + m.def("generate_colored_clock_noise", &tsm::generateColoredClockNoise, + py::arg("allan_variance_amplitudes"), py::arg("variance_type"), + py::arg("start_time"), py::arg("end_time"), + py::arg("number_of_time_steps"), + py::arg("seed") = + ts::defaultRandomSeedGenerator->getRandomVariableValue(), + R"doc(No documentation found.)doc"); + + m.def("get_clock_noise_interpolator", &tsm::getClockNoiseInterpolator, + py::arg("allan_variance_amplitudes"), py::arg("start_time"), + py::arg("end_time"), py::arg("time_step"), + py::arg("is_inverse_square_term_flicker_phase_noise") = 0, + py::arg("seed") = + ts::defaultRandomSeedGenerator->getRandomVariableValue(), + R"doc(No documentation found.)doc"); + + m.def("get_colored_clock_noise_interpolator", + &tsm::getColoredClockNoiseInterpolator, + py::arg("allan_variance_nodes"), py::arg("variance_type"), + py::arg("start_time"), py::arg("end_time"), py::arg("time_step"), + py::arg("seed") = + ts::defaultRandomSeedGenerator->getRandomVariableValue(), + R"doc(No documentation found.)doc"); +#endif + }; + +} // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation.cpp b/tudatpy/kernel/expose_numerical_simulation.cpp index c0714a80..c092dd4d 100644 --- a/tudatpy/kernel/expose_numerical_simulation.cpp +++ b/tudatpy/kernel/expose_numerical_simulation.cpp @@ -204,8 +204,7 @@ Returns std::shared_ptr>, tp::DynamicsSimulator>( - m, "SingleArcSimulator", - R"doc( + m, "SingleArcSimulator", R"doc( Class for consolidating single arc dynamics simulation functionality. @@ -604,7 +603,8 @@ Returns py::class_< tss::OrbitDeterminationManager, std::shared_ptr>>(m, "Estimator", R"doc( + STATE_SCALAR_TYPE, TIME_TYPE>>>(m, "Estimator", + R"doc( Class for consolidating all estimation functionality. diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment.cpp index 2308c1c8..77a98f4b 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment.cpp @@ -910,8 +910,7 @@ output_file_prefix : str, default='' py::class_>( - m, "VehicleSystems", - R"doc( + m, "VehicleSystems", R"doc( Object used to store physical (hardware) properties of a vehicle. @@ -1042,8 +1041,7 @@ output_file_prefix : str, default='' py::class_>( - m, "RigidBodyProperties", - R"doc( + m, "RigidBodyProperties", R"doc( Object that defines the mass, center of mass, and inertia tensor as a function of time. @@ -1217,8 +1215,7 @@ The body-fixed frame of the body itself. py::class_>( - m, "AerodynamicAngleCalculator", - R"doc( + m, "AerodynamicAngleCalculator", R"doc( Object to calculate (aerodynamic) orientation angles, and frame transformations, from current vehicle state. @@ -1317,8 +1314,7 @@ The body-fixed frame of the body itself. py::class_>( - m, "FlightConditions", - R"doc( + m, "FlightConditions", R"doc( Object that calculates various state-derived quantities typically relevant for flight dynamics. @@ -1402,8 +1398,7 @@ The body-fixed frame of the body itself. :type: float )doc") .def_property_readonly( - "time", &ta::FlightConditions::getCurrentTime, - R"doc( + "time", &ta::FlightConditions::getCurrentTime, R"doc( **read-only** @@ -1443,9 +1438,8 @@ The body-fixed frame of the body itself. py::class_, - ta::FlightConditions>(m, - "AtmosphericFlightConditions", - R"doc( + ta::FlightConditions>( + m, "AtmosphericFlightConditions", R"doc( Object that calculates various state-derived quantities typically relevant for flight dynamics, for flight in an atmosphere. @@ -1824,8 +1818,7 @@ The body-fixed frame of the body itself. py::class_>( - m, "RotationalEphemeris", - R"doc( + m, "RotationalEphemeris", R"doc( Object that stores the rotational state of the bodies. @@ -2106,8 +2099,7 @@ numpy.ndarray[numpy.float64[6, 1]] py::class_< teo::EarthOrientationAnglesCalculator, std::shared_ptr>( - m, "EarthOrientationAnglesCalculator", - R"doc( + m, "EarthOrientationAnglesCalculator", R"doc( Object for computing high-accuracy Earth orientation angles @@ -2116,8 +2108,7 @@ numpy.ndarray[numpy.float64[6, 1]] &teo::EarthOrientationAnglesCalculator:: getRotationAnglesFromItrsToGcrs, py::arg("epoch"), - py::arg("time_scale") = tba::tdb_scale, - R"doc( + py::arg("time_scale") = tba::tdb_scale, R"doc( Function to compute high-accuracy Earth orientation angles @@ -2141,9 +2132,8 @@ numpy.ndarray[numpy.float64[6, 1]] py::class_, - te::RotationalEphemeris>(m, - "GcrsToItrsRotationModel", - R"doc( + te::RotationalEphemeris>( + m, "GcrsToItrsRotationModel", R"doc( Object for high-accuracy GCRS<->ITRS rotation. @@ -2242,8 +2232,7 @@ numpy.ndarray[numpy.float64[6, 1]] py::class_, tg::GravityFieldModel>( - m, "SphericalHarmonicsGravityField", - R"doc( + m, "SphericalHarmonicsGravityField", R"doc( Object that provides a spherical harmonic gravity field of a body. @@ -2354,8 +2343,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "average_radius", - &tba::BodyShapeModel::getAverageRadius, - R"doc( + &tba::BodyShapeModel::getAverageRadius, R"doc( **read-only** @@ -2375,8 +2363,7 @@ numpy.ndarray[numpy.float64[6, 1]] py::class_>( - m, "GroundStationState", - R"doc( + m, "GroundStationState", R"doc( Object that performs computations of the current (body-fixed) position and frame conversions of the ground station. @@ -2511,8 +2498,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "temperature_function", - &tgs::GroundStation::getTemperatureFunction, - R"doc( + &tgs::GroundStation::getTemperatureFunction, R"doc( Function that provides the local temperature at the ground station (typically use for media corrections) as a function of time @@ -2521,8 +2507,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "pressure_function", - &tgs::GroundStation::getPressureFunction, - R"doc( + &tgs::GroundStation::getPressureFunction, R"doc( Function that provides the local pressure at the ground station (typically use for media corrections) as a function of time @@ -2531,8 +2516,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "relative_humidity_function", - &tgs::GroundStation::getRelativeHumidityFunction, - R"doc( + &tgs::GroundStation::getRelativeHumidityFunction, R"doc( Function that provides the local relative humidity at the ground station (typically use for media corrections) as a function of time @@ -2541,8 +2525,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "pointing_angles_calculator", - &tgs::GroundStation::getPointingAnglesCalculator, - R"doc( + &tgs::GroundStation::getPointingAnglesCalculator, R"doc( **read-only** @@ -2553,8 +2536,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "station_state", - &tgs::GroundStation::getNominalStationState, - R"doc( + &tgs::GroundStation::getNominalStationState, R"doc( **read-only** @@ -2629,8 +2611,7 @@ numpy.ndarray[numpy.float64[6, 1]] .def_property("ephemeris_frame_to_base_frame", &tss::Body::getEphemerisFrameToBaseFrame, &tss::Body::setEphemerisFrameToBaseFrame) - .def_property_readonly("state", &tss::Body::getState, - R"doc( + .def_property_readonly("state", &tss::Body::getState, R"doc( **read-only** @@ -2675,8 +2656,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "inertial_to_body_fixed_frame", - &tss::Body::getCurrentRotationMatrixToLocalFrame, - R"doc( + &tss::Body::getCurrentRotationMatrixToLocalFrame, R"doc( **read-only** @@ -2767,8 +2747,7 @@ numpy.ndarray[numpy.float64[6, 1]] :type: numpy.ndarray )doc") .def_property("mass", &tss::Body::getBodyMass, - &tss::Body::setConstantBodyMass, - R"doc( + &tss::Body::setConstantBodyMass, R"doc( The current mass :math:`m` of the vehicle, as used in the calculation of non-conservative acceleration. This attribute is a shorthand for accessing the @@ -2807,8 +2786,7 @@ numpy.ndarray[numpy.float64[6, 1]] .def("state_in_base_frame_from_ephemeris", &tss::Body::getStateInBaseFrameFromEphemeris< STATE_SCALAR_TYPE, TIME_TYPE>, - py::arg("time"), - R"doc( + py::arg("time"), R"doc( This function returns the body's state, as computed from its ephemeris model (extracted from :attr:`~Body.ephemeris`) at the current time, and (if needed) translates this state to the global frame origin. For the case where the origin of the body's ephemeris (extracted from :attr:`~Ephemeris.frame_origin`) is equal to the @@ -2831,8 +2809,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("ephemeris", &tss::Body::getEphemeris, - &tss::Body::setEphemeris, - R"doc( + &tss::Body::setEphemeris, R"doc( Object defining the ephemeris model of this body, used to calculate its current state as a function of time. Depending on the selected type of model, the type of this attribute @@ -2843,8 +2820,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("atmosphere_model", &tss::Body::getAtmosphereModel, - &tss::Body::setAtmosphereModel, - R"doc( + &tss::Body::setAtmosphereModel, R"doc( Object defining the atmosphere model of this body, used to calculate density, temperature, etc. at a given state/time. Depending on the selected type of model, the type of this attribute @@ -2854,8 +2830,7 @@ numpy.ndarray[numpy.float64[6, 1]] :type: AtmosphereModel )doc") .def_property("shape_model", &tss::Body::getShapeModel, - &tss::Body::setShapeModel, - R"doc( + &tss::Body::setShapeModel, R"doc( Object defining the a shape model of this body, used to define the exterior shape of the body, for instance for the calculation of vehicle's altitude. Depending on the selected type of model, the type of this attribute @@ -2866,8 +2841,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("gravity_field_model", &tss::Body::getGravityFieldModel, - &tss::Body::setGravityFieldModel, - R"doc( + &tss::Body::setGravityFieldModel, R"doc( Object defining the a gravity field model of this body, used to define the exterior gravitational potential, and its gradient(s). Depending on the selected type of model, the type of this attribute @@ -2879,8 +2853,7 @@ numpy.ndarray[numpy.float64[6, 1]] .def_property( "aerodynamic_coefficient_interface", &tss::Body::getAerodynamicCoefficientInterface, - &tss::Body::setAerodynamicCoefficientInterface, - R"doc( + &tss::Body::setAerodynamicCoefficientInterface, R"doc( Object defining the aerodynamic coefficients of the body (force-only, or force and moment) as a function of any number of independent variables. Depending on the selected type of model, the type of this attribute @@ -2891,8 +2864,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("flight_conditions", &tss::Body::getFlightConditions, - &tss::Body::setFlightConditions, - R"doc( + &tss::Body::setFlightConditions, R"doc( Object used to calculated and store the current flight conditions of a vehicle (altitude, latitude, longitude, flight-path angle, etc.) w.r.t. a central body. In case the central body contains an atmosphere, this object @@ -2904,8 +2876,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("rotation_model", &tss::Body::getRotationalEphemeris, - &tss::Body::setRotationalEphemeris, - R"doc( + &tss::Body::setRotationalEphemeris, R"doc( Object defining the orientation of the body, used to calculate the rotation to/from a body-fixed frame (and its derivate). Depending on the selected type of model, the type of this attribute @@ -2916,8 +2887,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("system_models", &tss::Body::getVehicleSystems, - &tss::Body::setVehicleSystems, - R"doc( + &tss::Body::setVehicleSystems, R"doc( Object used to store physical (hardware) properties of a vehicle, such as engines, control surfaces, etc. This object is typically created automatically whenever such a hardware model needs to be assigned to a vehicle. @@ -2927,8 +2897,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property("rigid_body_properties", &tss::Body::getMassProperties, - &tss::Body::setMassProperties, - R"doc( + &tss::Body::setMassProperties, R"doc( Object defining the mass, center of mass and inertia tensor of the body. This object is distinct from the gravity field of a body (defined by the :attr:`Body.gravity_field` object). A body endowed with this property does *not* @@ -2940,8 +2909,7 @@ numpy.ndarray[numpy.float64[6, 1]] )doc") .def_property_readonly( "gravitational_parameter", - &tss::Body::getGravitationalParameter, - R"doc( + &tss::Body::getGravitationalParameter, R"doc( **read-only** @@ -2951,8 +2919,7 @@ numpy.ndarray[numpy.float64[6, 1]] :type: float )doc") .def("get_ground_station", &tss::Body::getGroundStation, - py::arg("station_name"), - R"doc( + py::arg("station_name"), R"doc( This function extracts a ground station object from the body. @@ -2989,8 +2956,7 @@ numpy.ndarray[numpy.float64[6, 1]] py::class_>( - m, "SystemOfBodies", - R"doc( + m, "SystemOfBodies", R"doc( Object that contains a set of Body objects and associated frame information. @@ -3218,5 +3184,5 @@ numpy.ndarray[numpy.float64[6, 1]] */ } } // namespace environment - } // namespace numerical_simulation + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp index 20f99834..509f1c11 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp @@ -71,8 +71,7 @@ namespace tudatpy { )doc") .def_readwrite("constant_mass", - &tss::BodySettings::constantMass, - R"doc( + &tss::BodySettings::constantMass, R"doc( Mass that gets assigned to the vehicle. This mass does *not* automatically define a gravity field model, but is instead used for the calculation of non-conservative forces only. When creating a body with a gravity field, @@ -94,8 +93,7 @@ namespace tudatpy { :type: AtmosphereSettings )doc") .def_readwrite("ephemeris_settings", - &tss::BodySettings::ephemerisSettings, - R"doc( + &tss::BodySettings::ephemerisSettings, R"doc( Object that defines the settings of the ephemeris model that is to be created. A variable of this type is typically assigned by using a function from the :ref:`\`\`ephemeris\`\`` module. @@ -182,8 +180,7 @@ namespace tudatpy { R"doc(No documentation found.)doc") .def_readwrite( "vehicle_shape_settings", - &tss::BodySettings::bodyExteriorPanelSettings_, - R"doc( + &tss::BodySettings::bodyExteriorPanelSettings_, R"doc( Object that defines the settings of an exterior panelled vehicle shape that is to be created. A variable of this type is typically assigned by using a function from the :ref:`\`\`vehicle_systems\`\`` module. @@ -199,8 +196,7 @@ namespace tudatpy { py::class_>( - m, "BodyListSettings", - R"doc( + m, "BodyListSettings", R"doc( Class for defining settings for the creation of a system of bodies. @@ -214,8 +210,7 @@ namespace tudatpy { )doc") .def(py::init(), py::arg("frame_origin"), py::arg("frame_orientation")) - .def("get", &tss::BodyListSettings::get, - R"doc( + .def("get", &tss::BodyListSettings::get, R"doc( This function extracts a single BodySettings object . @@ -251,8 +246,7 @@ namespace tudatpy { )doc") .def_property_readonly( "frame_orientation", - &tss::BodyListSettings::getFrameOrientation, - R"doc( + &tss::BodyListSettings::getFrameOrientation, R"doc( **read-only** diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_aerodynamic_coefficient_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_aerodynamic_coefficient_setup.cpp index fba73170..98d25381 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_aerodynamic_coefficient_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_aerodynamic_coefficient_setup.cpp @@ -14,11 +14,10 @@ #include #include - -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -1365,6 +1364,6 @@ ControlSurfaceIncrementAerodynamicCoefficientSettings } // namespace aerodynamic_coefficients - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_atmosphere_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_atmosphere_setup.cpp index 1dcd3fec..cdb7a58d 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_atmosphere_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_atmosphere_setup.cpp @@ -816,6 +816,6 @@ by modifying an existing :class:`~tudatpy.numerical_simulation.environment_setup } } // namespace atmosphere - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ephemeris_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ephemeris_setup.cpp index 04bd985b..b17240db 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ephemeris_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ephemeris_setup.cpp @@ -16,10 +16,10 @@ #include "scalarTypes.h" -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -1215,6 +1215,6 @@ In this example, we create :class:`~tudatpy.numerical_simulation.environment_set } // namespace ephemeris - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_setup.cpp index a87332b7..22d561a0 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_setup.cpp @@ -13,8 +13,7 @@ #include #include - -// #include +//#include #include #include #include @@ -100,20 +99,16 @@ namespace tudatpy { )doc") .value("central_gravity", - tss::GravityFieldType::central, - R"doc( + tss::GravityFieldType::central, R"doc( )doc") .value("central_spice_gravity", - tss::GravityFieldType::central_spice, - R"doc( + tss::GravityFieldType::central_spice, R"doc( )doc") .value("spherical_harmonic_gravity", - tss::GravityFieldType::spherical_harmonic, - R"doc( + tss::GravityFieldType::spherical_harmonic, R"doc( )doc") .value("polyhedron_gravity", - tss::GravityFieldType::polyhedron, - R"doc( + tss::GravityFieldType::polyhedron, R"doc( )doc") .value("ring_gravity", tss::GravityFieldType::one_dimensional_ring, @@ -153,8 +148,7 @@ Coefficients for the GRACE-only GGM02 Earth gravity field up to degree and order Coefficients for the GOCO05c combined Earth gravity field up to degree and order 719, (see `link `_ ) )doc") .value("glgm3150", - tss::SphericalHarmonicsModel::glgm3150, - R"doc( + tss::SphericalHarmonicsModel::glgm3150, R"doc( Coefficients for the GLGM3150 Moon gravity field up to degree and order 150, (see `link `_ ) )doc") .value("lpe200", tss::SphericalHarmonicsModel::lpe200, @@ -162,23 +156,19 @@ Coefficients for the GLGM3150 Moon gravity field up to degree and order 150, (se Coefficients for the LPE200 Moon gravity field up to degree and order 200, (see `link `_ ) )doc") .value("gggrx1200", - tss::SphericalHarmonicsModel::gggrx1200, - R"doc( + tss::SphericalHarmonicsModel::gggrx1200, R"doc( Coefficients for the GRGM1200A Moon gravity field up to degree and order 1199, (see `link `_ ) )doc") .value("jgmro120d", - tss::SphericalHarmonicsModel::jgmro120d, - R"doc( + tss::SphericalHarmonicsModel::jgmro120d, R"doc( Coefficients for the MRO120D Moon gravity field up to degree and order 120, (see `link `_ ) )doc") .value("jgmess160a", - tss::SphericalHarmonicsModel::jgmess160a, - R"doc( + tss::SphericalHarmonicsModel::jgmess160a, R"doc( Coefficients for the MESS160A Moon gravity field up to degree and order 160, (see `link `_ ) )doc") .value("shgj180u", - tss::SphericalHarmonicsModel::shgj180u, - R"doc( + tss::SphericalHarmonicsModel::shgj180u, R"doc( Coefficients for the SHGJ180U Moon gravity field up to degree and order 180, (see `link `_ ) )doc") .export_values(); @@ -972,6 +962,6 @@ SphericalHarmonicsGravityFieldSettings } } // namespace gravity_field - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_variation_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_variation_setup.cpp index 7f314d05..06d14b1f 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_variation_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_gravity_field_variation_setup.cpp @@ -13,11 +13,10 @@ #include #include - -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -477,6 +476,6 @@ BasicSolidBodyGravityFieldVariationSettings } } // namespace gravity_field_variation - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ground_station_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ground_station_setup.cpp index c3248bbb..9dab973d 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ground_station_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_ground_station_setup.cpp @@ -18,7 +18,6 @@ #include #include - namespace py = pybind11; namespace tss = tudat::simulation_setup; namespace tcc = tudat::coordinate_conversions; @@ -294,6 +293,6 @@ GroundStationMotionSettings } } // namespace ground_station - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_radiation_pressure_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_radiation_pressure_setup.cpp index 86027187..5bbf3d87 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_radiation_pressure_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_radiation_pressure_setup.cpp @@ -13,11 +13,10 @@ #include #include - -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -1056,6 +1055,6 @@ RadiationPressureTargetModelSettings } } // namespace radiation_pressure - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rigid_body_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rigid_body_setup.cpp index 07b95c3c..7e3d7a3f 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rigid_body_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rigid_body_setup.cpp @@ -13,8 +13,7 @@ #include #include - -// #include +//#include #include #include #include @@ -183,6 +182,6 @@ RigidBodyPropertiesSettings } } // namespace rigid_body - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rotation_model_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rotation_model_setup.cpp index 2b66299a..dd939763 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rotation_model_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_rotation_model_setup.cpp @@ -13,11 +13,10 @@ #include #include - -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -95,8 +94,7 @@ namespace tudatpy { py::class_>( - m, "RotationModelSettings", - R"doc( + m, "RotationModelSettings", R"doc( Base class for providing settings for automatic rotation model creation. @@ -762,6 +760,6 @@ RotationModelSettings } } // namespace rotation_model - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_deformation_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_deformation_setup.cpp index d313bdea..6ab39a7a 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_deformation_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_deformation_setup.cpp @@ -17,7 +17,6 @@ #include #include - namespace py = pybind11; namespace tss = tudat::simulation_setup; @@ -191,6 +190,6 @@ BodyDeformationSettings } } // namespace shape_deformation - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_setup.cpp index f7c2967d..1e408616 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_shape_setup.cpp @@ -13,11 +13,10 @@ #include #include - -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -444,6 +443,6 @@ HybridBodyShapeSettings } } // namespace shape - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_vehicle_systems_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_vehicle_systems_setup.cpp index 19dcb0dd..48a95447 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_vehicle_systems_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup/expose_vehicle_systems_setup.cpp @@ -12,11 +12,10 @@ #include - -// #include +//#include #include #include -// #include +//#include #include #include #include @@ -327,6 +326,6 @@ FullPanelledBodySettings } } // namespace vehicle_systems - } // namespace environment_setup - } // namespace numerical_simulation + } // namespace environment_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_estimation.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_estimation.cpp index e738c33b..34552da0 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_estimation.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_estimation.cpp @@ -2928,5 +2928,5 @@ Returns } } // namespace estimation - } // namespace numerical_simulation + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup.cpp index f716eb3d..db535483 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup.cpp @@ -248,5 +248,5 @@ This code snippet closely follows what is done in: The following snippet closely } } // namespace estimation_setup - } // namespace numerical_simulation + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_estimated_parameter_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_estimated_parameter_setup.cpp index 1413027e..7b5c8a30 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_estimated_parameter_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_estimated_parameter_setup.cpp @@ -27,8 +27,7 @@ namespace tudatpy { void expose_estimated_parameter_setup(py::module& m) { py::enum_( - m, "EstimatableParameterTypes", - R"doc( + m, "EstimatableParameterTypes", R"doc( Enumeration of model parameters that are available for estimation. In order to establish a parameter estimation settings for a parameter of a certain type, use the function dedicated to this parameter type. @@ -1500,6 +1499,6 @@ Returns } } // namespace parameter - } // namespace estimation_setup - } // namespace numerical_simulation + } // namespace estimation_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_observation_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_observation_setup.cpp index 2915d0b7..f1b1530d 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_observation_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_estimation_setup/expose_observation_setup.cpp @@ -595,8 +595,7 @@ Examples py::class_ >( - m, "LinkDefinition", - R"doc( + m, "LinkDefinition", R"doc( Base class storing the link ends involved in a given observation. Instances of this class are typically created defining a *Link_Ends* dictionary via the :func:`~tudatpy.numerical_simulation.estimation_setup.observation.link_definition` function, @@ -713,8 +712,7 @@ Examples )doc"); - py::enum_(m, "ObservableType", - R"doc( + py::enum_(m, "ObservableType", R"doc( Enumeration of available observable types. @@ -789,8 +787,7 @@ Examples py::class_ >( - m, "ObservationSettings", - R"doc( + m, "ObservationSettings", R"doc( Base class to define settings of observation models. @@ -911,8 +908,7 @@ Examples )doc"); py::enum_( - m, "LightTimeFailureHandling", - R"doc( + m, "LightTimeFailureHandling", R"doc( Enumeration of behaviour when failing to converge light-time with required settings. @@ -2263,8 +2259,7 @@ Examples py::class_ >( - m, "ObservationBiasSettings", - R"doc( + m, "ObservationBiasSettings", R"doc( Base class to defining observation bias settings. @@ -2856,8 +2851,7 @@ Examples // ############# py::enum_( - m, "ObservationViabilityType", - R"doc( + m, "ObservationViabilityType", R"doc( Enumeration of observation viability criterion types. @@ -4835,6 +4829,6 @@ observable_type : :class:`ObservableType` } } // namespace observation - } // namespace estimation_setup - } // namespace numerical_simulation + } // namespace estimation_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation.cpp index 422f3b84..c7512ffb 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation.cpp @@ -873,5 +873,5 @@ numpy.ndarray resetThrustMagnitudeFunction); } } // namespace propagation - } // namespace numerical_simulation + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup.cpp index 15ef1bc7..b964ad86 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup.cpp @@ -8,6 +8,7 @@ * http://tudat.tudelft.nl/LICENSE. */ + #include "expose_propagation_setup.h" #include @@ -229,5 +230,5 @@ MassRateModelMap )doc"); } } // namespace propagation_setup - } // namespace numerical_simulation + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_acceleration_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_acceleration_setup.cpp index 1d6963f3..b884c3bc 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_acceleration_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_acceleration_setup.cpp @@ -20,7 +20,6 @@ #include #include - namespace py = pybind11; namespace tba = tudat::basic_astrodynamics; namespace tss = tudat::simulation_setup; @@ -124,8 +123,7 @@ namespace tudatpy { py::enum_( - m, "AvailableAcceleration", - R"doc( + m, "AvailableAcceleration", R"doc( Enumeration of available acceleration types. @@ -146,8 +144,7 @@ namespace tudatpy { R"doc( )doc") .value("aerodynamic_type", - tba::AvailableAcceleration::aerodynamic, - R"doc( + tba::AvailableAcceleration::aerodynamic, R"doc( )doc") .value("cannonball_radiation_pressure_type", tba::AvailableAcceleration:: @@ -169,8 +166,7 @@ namespace tudatpy { R"doc( )doc") .value("ring_gravity_type", - tba::AvailableAcceleration::ring_gravity, - R"doc( + tba::AvailableAcceleration::ring_gravity, R"doc( )doc") .value("thrust_acceleration_type", tba::AvailableAcceleration::thrust_acceleration, diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_dependent_variable_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_dependent_variable_setup.cpp index 5cd85e05..b7711fa1 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_dependent_variable_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_dependent_variable_setup.cpp @@ -19,7 +19,6 @@ #include #include - namespace py = pybind11; namespace tba = tudat::basic_astrodynamics; namespace tss = tudat::simulation_setup; @@ -2262,6 +2261,6 @@ SingleDependentVariableSaveSettings } } // namespace dependent_variable - } // namespace propagation_setup - } // namespace numerical_simulation + } // namespace propagation_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_integrator_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_integrator_setup.cpp index 4527a501..0979f941 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_integrator_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_integrator_setup.cpp @@ -39,8 +39,7 @@ namespace tudatpy { void expose_integrator_setup(py::module &m) { // ENUMS py::enum_( - m, "MinimumIntegrationTimeStepHandling", - R"doc( + m, "MinimumIntegrationTimeStepHandling", R"doc( Enumeration defining possible behaviours when :math:`\Delta t_{rec}<\Delta t_{\min}`. in step-size control (e.g. recommended time step is smaller than minimum time step) @@ -76,9 +75,8 @@ The final time step is set to :math:`\Delta t=\Delta t_{\min}`, violating requir .export_values(); - py::enum_(m, - "AvailableIntegrators", - R"doc( + py::enum_( + m, "AvailableIntegrators", R"doc( Enumeration of integrators available with tudat. diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_mass_rate_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_mass_rate_setup.cpp index 177d7fba..d5828261 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_mass_rate_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_mass_rate_setup.cpp @@ -19,7 +19,6 @@ #include #include - namespace py = pybind11; namespace tba = tudat::basic_astrodynamics; namespace tss = tudat::simulation_setup; @@ -213,6 +212,6 @@ CustomMassRateSettings } } // namespace mass_rate - } // namespace propagation_setup - } // namespace numerical_simulation + } // namespace propagation_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_propagator_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_propagator_setup.cpp index 7a797dfa..bfe5d4a4 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_propagator_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_propagator_setup.cpp @@ -664,7 +664,8 @@ Entries 1-4: The exponential map defining the rotation from inertial to body-fix R"doc(No propagator documentation found.)doc") .export_values(); - py::enum_(m, "StateType", R"doc( + py::enum_(m, "StateType", + R"doc( Enumeration of available integrated state types. @@ -1882,6 +1883,6 @@ None } } // namespace propagator - } // namespace propagation_setup - } // namespace numerical_simulation + } // namespace propagation_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_thrust_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_thrust_setup.cpp index 7efebbea..39a2bf9f 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_thrust_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_thrust_setup.cpp @@ -9,7 +9,7 @@ */ #include "expose_acceleration_setup.h" -// #include "kernel/expose_numerical_simulation/deprecation_support.h" +//#include "kernel/expose_numerical_simulation/deprecation_support.h" #include #include @@ -19,7 +19,6 @@ #include #include - namespace py = pybind11; namespace tba = tudat::basic_astrodynamics; namespace tss = tudat::simulation_setup; @@ -435,6 +434,6 @@ FromFunctionThrustMagnitudeSettings } } // namespace thrust - } // namespace propagation_setup - } // namespace numerical_simulation + } // namespace propagation_setup + } // namespace numerical_simulation } // namespace tudatpy diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_torque_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_torque_setup.cpp index e5b6465a..3e335ad9 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_torque_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_propagation_setup/expose_torque_setup.cpp @@ -19,7 +19,6 @@ #include #include - namespace py = pybind11; namespace tba = tudat::basic_astrodynamics; namespace tss = tudat::simulation_setup; diff --git a/tudatpy/kernel/expose_trajectory_design/expose_shape_based_thrust.cpp b/tudatpy/kernel/expose_trajectory_design/expose_shape_based_thrust.cpp index 95f9ac58..5429a3ff 100644 --- a/tudatpy/kernel/expose_trajectory_design/expose_shape_based_thrust.cpp +++ b/tudatpy/kernel/expose_trajectory_design/expose_shape_based_thrust.cpp @@ -8,8 +8,8 @@ * http://tudat.tudelft.nl/LICENSE. */ -#include "expose_shape_based_thrust.h" +#include "expose_shape_based_thrust.h" // #include // #include diff --git a/tudatpy/kernel/expose_trajectory_design/expose_transfer_trajectory.cpp b/tudatpy/kernel/expose_trajectory_design/expose_transfer_trajectory.cpp index b0a79e20..7d577cf3 100644 --- a/tudatpy/kernel/expose_trajectory_design/expose_transfer_trajectory.cpp +++ b/tudatpy/kernel/expose_trajectory_design/expose_transfer_trajectory.cpp @@ -18,6 +18,7 @@ #include "tudat/astro/mission_segments/createTransferTrajectory.h" #include "tudat/math/root_finders.h" + namespace py = pybind11; namespace tms = tudat::mission_segments; namespace tss = tudat::simulation_setup; @@ -1219,5 +1220,5 @@ TransferTrajectory }; } // namespace transfer_trajectory - } // namespace trajectory_design + } // namespace trajectory_design } // namespace tudatpy diff --git a/tudatpy/kernel/expose_unit_tests.cpp b/tudatpy/kernel/expose_unit_tests.cpp index 5130a8b3..0a0c6f91 100644 --- a/tudatpy/kernel/expose_unit_tests.cpp +++ b/tudatpy/kernel/expose_unit_tests.cpp @@ -1,19 +1,19 @@ -//// -//// Created by ggarrett on 02-05-20. -//// -// -//#include "expose_unit_tests.h" -// -//#include -// -// namespace py = pybind11; -// -// namespace tudatpy { -// void expose_unit_tests(py::module &m) { -// -//// m.def("get_apollo_coefficient_interface", -//// tudat::unit_tests::getApolloCoefficientInterface, -//// ""); -// -// }; -//} +//// +//// Created by ggarrett on 02-05-20. +//// +// +//#include "expose_unit_tests.h" +// +//#include +// +// namespace py = pybind11; +// +// namespace tudatpy { +// void expose_unit_tests(py::module &m) { +// +//// m.def("get_apollo_coefficient_interface", +//// tudat::unit_tests::getApolloCoefficientInterface, +//// ""); +// +// }; +//} diff --git a/tudatpy/kernel/expose_utils.cpp b/tudatpy/kernel/expose_utils.cpp index 689c8598..bb484778 100644 --- a/tudatpy/kernel/expose_utils.cpp +++ b/tudatpy/kernel/expose_utils.cpp @@ -21,4 +21,4 @@ namespace tudatpy { } } // namespace utils -} // namespace tudatpy \ No newline at end of file +} // namespace tudatpy diff --git a/tudatpy/kernel/expose_utils/expose_data.cpp b/tudatpy/kernel/expose_utils/expose_data.cpp index c4dc3047..aae20d87 100644 --- a/tudatpy/kernel/expose_utils/expose_data.cpp +++ b/tudatpy/kernel/expose_utils/expose_data.cpp @@ -31,4 +31,4 @@ namespace tudatpy { } // namespace data } // namespace utils -} // namespace tudatpy \ No newline at end of file +} // namespace tudatpy diff --git a/tudatpy/kernel/kernel.cpp b/tudatpy/kernel/kernel.cpp index e95f2d72..d907b347 100644 --- a/tudatpy/kernel/kernel.cpp +++ b/tudatpy/kernel/kernel.cpp @@ -1,73 +1,73 @@ -#include - -#include - -#include "expose_astro.h" -#include "expose_constants.h" -#include "expose_data.h" -#include "expose_example.h" -#include "expose_interface.h" -#include "expose_math.h" -#include "expose_numerical_simulation.h" -#include "expose_trajectory_design.h" -#include "expose_utils.h" - -namespace py = pybind11; - -PYBIND11_MODULE(kernel, m) { - // Disable automatic function signatures in the docs. - // NOTE: the 'options' object needs to stay alive - // throughout the whole definition of the module. - py::options options; - options.enable_function_signatures(); - options.enable_user_defined_docstrings(); - - // Export the tudat version. - m.attr("_tudat_version") = TUDAT_VERSION; - m.attr("_tudat_version_major") = TUDAT_VERSION_MAJOR; - m.attr("_tudat_version_minor") = TUDAT_VERSION_MINOR; - m.attr("_tudat_version_patch") = TUDAT_VERSION_PATCH; - - // math module - auto utils = m.def_submodule("utils"); - tudatpy::utils::expose_utils(utils); - - // math module - auto math = m.def_submodule("math"); - tudatpy::math::expose_math(math); - - // astro module - auto astro = m.def_submodule("astro"); - tudatpy::astro::expose_astro(astro); - - // interface module - auto interface = m.def_submodule("interface"); - tudatpy::interface::expose_interface(interface); - - // constants module - auto constants = m.def_submodule("constants"); - tudatpy::constants::expose_constants(constants); - - // data module - auto data = m.def_submodule("data"); - tudatpy::data::expose_data(data); - - // simulation module - auto trajectory_design = m.def_submodule("trajectory_design"); - tudatpy::trajectory_design::expose_trajectory_design(trajectory_design); - - // simulation module - auto numerical_simulation = m.def_submodule("numerical_simulation"); - tudatpy::numerical_simulation::expose_numerical_simulation( - numerical_simulation); - - // // example module - // auto example = m.def_submodule("example"); - // tudatpy::expose_example(example); - -#ifdef VERSION_INFO - m.attr("__version__") = VERSION_INFO; -#else - m.attr("__version__") = "dev"; -#endif -} +#include + +#include + +#include "expose_astro.h" +#include "expose_constants.h" +#include "expose_data.h" +#include "expose_example.h" +#include "expose_interface.h" +#include "expose_math.h" +#include "expose_numerical_simulation.h" +#include "expose_trajectory_design.h" +#include "expose_utils.h" + +namespace py = pybind11; + +PYBIND11_MODULE(kernel, m) { + // Disable automatic function signatures in the docs. + // NOTE: the 'options' object needs to stay alive + // throughout the whole definition of the module. + py::options options; + options.enable_function_signatures(); + options.enable_user_defined_docstrings(); + + // Export the tudat version. + m.attr("_tudat_version") = TUDAT_VERSION; + m.attr("_tudat_version_major") = TUDAT_VERSION_MAJOR; + m.attr("_tudat_version_minor") = TUDAT_VERSION_MINOR; + m.attr("_tudat_version_patch") = TUDAT_VERSION_PATCH; + + // math module + auto utils = m.def_submodule("utils"); + tudatpy::utils::expose_utils(utils); + + // math module + auto math = m.def_submodule("math"); + tudatpy::math::expose_math(math); + + // astro module + auto astro = m.def_submodule("astro"); + tudatpy::astro::expose_astro(astro); + + // interface module + auto interface = m.def_submodule("interface"); + tudatpy::interface::expose_interface(interface); + + // constants module + auto constants = m.def_submodule("constants"); + tudatpy::constants::expose_constants(constants); + + // data module + auto data = m.def_submodule("data"); + tudatpy::data::expose_data(data); + + // simulation module + auto trajectory_design = m.def_submodule("trajectory_design"); + tudatpy::trajectory_design::expose_trajectory_design(trajectory_design); + + // simulation module + auto numerical_simulation = m.def_submodule("numerical_simulation"); + tudatpy::numerical_simulation::expose_numerical_simulation( + numerical_simulation); + + // // example module + // auto example = m.def_submodule("example"); + // tudatpy::expose_example(example); + +#ifdef VERSION_INFO + m.attr("__version__") = VERSION_INFO; +#else + m.attr("__version__") = "dev"; +#endif +} diff --git a/tudatpy/temp/cli/templates/cpp_class.cpp b/tudatpy/temp/cli/templates/cpp_class.cpp index 23ff5bac..f1df8f71 100644 --- a/tudatpy/temp/cli/templates/cpp_class.cpp +++ b/tudatpy/temp/cli/templates/cpp_class.cpp @@ -1,11 +1,11 @@ -/* Copyright (c) 2010-2018, Delft University of Technology - * All rights reserved - * - * This file is part of the Tudat. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * http://tudat.tudelft.nl/LICENSE. - */ - -#include "{{ name }}.h" +/* Copyright (c) 2010-2018, Delft University of Technology + * All rights reserved + * + * This file is part of the Tudat. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * http://tudat.tudelft.nl/LICENSE. + */ + +#include "{{ name }}.h" diff --git a/tudatpy/temp/cli/templates/main.cpp b/tudatpy/temp/cli/templates/main.cpp index e69de29b..8b137891 100644 --- a/tudatpy/temp/cli/templates/main.cpp +++ b/tudatpy/temp/cli/templates/main.cpp @@ -0,0 +1 @@ + diff --git a/tudatpy/temp/cli/templates/pybind_module.cpp b/tudatpy/temp/cli/templates/pybind_module.cpp index f08e0827..c2094ed5 100644 --- a/tudatpy/temp/cli/templates/pybind_module.cpp +++ b/tudatpy/temp/cli/templates/pybind_module.cpp @@ -1,44 +1,44 @@ -/* Copyright (c) {{ copyright_dates }}, {{ institution }} - * All rights reserved - * - * This file was autogenerated by {{ tool_name }}. It is intended to serve - * as an example component a support header for a {{ project_type }} type - * {{ organisation }} project. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * {{ url_license }}. - */ - -{% for submodule in kernel_submodules -% -} -#include "expose_{{ submodule }}.h" -{ % endfor % } -#include - -namespace py = pybind11; - -PYBIND11_MODULE(kernel, m) { - // Disable automatic function signatures in the docs. - // NOTE: the 'options' object needs to stay alive - // throughout the whole definition of the module. - py::options options; - options.disable_function_signatures(); - options.enable_user_defined_docstrings(); - - {% for submodule in kernel_submodules -% - } - // {{ submodule }} module - auto{{submodule}} = m.def_submodule("{{ submodule }}"); - { - { project_name } - } - ::expose_{{submodule}}({{submodule}}); - - { % endfor % } -#ifdef VERSION_INFO - m.attr("__version__") = VERSION_INFO; -#else - m.attr("__version__") = "dev"; -#endif -} +/* Copyright (c) {{ copyright_dates }}, {{ institution }} + * All rights reserved + * + * This file was autogenerated by {{ tool_name }}. It is intended to serve + * as an example component a support header for a {{ project_type }} type + * {{ organisation }} project. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * {{ url_license }}. + */ + +{% for submodule in kernel_submodules -% +} +#include "expose_{{ submodule }}.h" +{ % endfor % } +#include + +namespace py = pybind11; + +PYBIND11_MODULE(kernel, m) { + // Disable automatic function signatures in the docs. + // NOTE: the 'options' object needs to stay alive + // throughout the whole definition of the module. + py::options options; + options.disable_function_signatures(); + options.enable_user_defined_docstrings(); + + {% for submodule in kernel_submodules -% + } + // {{ submodule }} module + auto{{submodule}} = m.def_submodule("{{ submodule }}"); + { + { project_name } + } + ::expose_{{submodule}}({{submodule}}); + + { % endfor % } +#ifdef VERSION_INFO + m.attr("__version__") = VERSION_INFO; +#else + m.attr("__version__") = "dev"; +#endif +} diff --git a/tudatpy/temp/cli/templates/pybind_submodule.cpp b/tudatpy/temp/cli/templates/pybind_submodule.cpp index be8255a2..646768c9 100644 --- a/tudatpy/temp/cli/templates/pybind_submodule.cpp +++ b/tudatpy/temp/cli/templates/pybind_submodule.cpp @@ -1,28 +1,28 @@ -/* Copyright (c) 2010-2018, Delft University of Technology - * All rights reserved - * - * This file is part of the Tudat. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * http://tudat.tudelft.nl/LICENSE. - */ - -#include - -#include - -#include "expose_{{ submodule_name }}.h" - -namespace { - { - project - } -} // namespace -{ - std::string hello_world() { return "Hello World!"; }; - - void expose_{{module_name.lower()}}(py::module & m) { - m.def("hello_world", &hello_world); - }; -} +/* Copyright (c) 2010-2018, Delft University of Technology + * All rights reserved + * + * This file is part of the Tudat. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * http://tudat.tudelft.nl/LICENSE. + */ + +#include + +#include + +#include "expose_{{ submodule_name }}.h" + +namespace { + { + project + } +} // namespace +{ + std::string hello_world() { return "Hello World!"; }; + + void expose_{{module_name.lower()}}(py::module & m) { + m.def("hello_world", &hello_world); + }; +} diff --git a/tudatpy/temp/cli/test/kernel/kernel.cpp b/tudatpy/temp/cli/test/kernel/kernel.cpp index 12406ee5..c570f263 100644 --- a/tudatpy/temp/cli/test/kernel/kernel.cpp +++ b/tudatpy/temp/cli/test/kernel/kernel.cpp @@ -1,47 +1,25 @@ -/* Copyright (c) 2010-2019, Delft University of Technology - * All rights reserved - * - * This file was autogenerated by tudat-space. It is intended to serve - * as an example component a support header for a hybrid type - * tudat-space project. Redistribution and use in source and - * binary forms, with or without modification, are permitted exclusively - * under the terms of the Modified BSD license. You should have received - * a copy of the license with this file. If not, please or visit: - * http://tudat.tudelft.nl/LICENSE. - */ - -#include - -#include "expose_test1.h" -#include "expose_test2.h" -#include "expose_test3.h" - -namespace py = pybind11; - -PYBIND11_MODULE(kernel, m) { - // Disable automatic function signatures in the docs. - // NOTE: the 'options' object needs to stay alive - // throughout the whole definition of the module. - py::options options; - options.disable_function_signatures(); - options.enable_user_defined_docstrings(); - - // test1 module - auto test1 = m.def_submodule("test1"); - test::expose_test1(test1); - - // test2 module - auto test2 = m.def_submodule("test2"); - test::expose_test2(test2); - - // test3 module - auto test3 = m.def_submodule("test3"); - test::expose_test3(test3); - - -#ifdef VERSION_INFO - m.attr("__version__") = VERSION_INFO; -#else - m.attr("__version__") = "dev"; -#endif -} \ No newline at end of file +/* Copyright (c) 2010-2018, Delft University of Technology + * All rights reserved + * + * This file is part of the Tudat. Redistribution and use in source and + * binary forms, with or without modification, are permitted exclusively + * under the terms of the Modified BSD license. You should have received + * a copy of the license with this file. If not, please or visit: + * http://tudat.tudelft.nl/LICENSE. + */ + +#ifndef{{module_name | upper } } _H +#define{{module_name | upper } } _H + +#include + +#include + +namespace { + { + project_name + } +} // namespace +{ void expose_{{module_name | lower}}(py::module & m); } + +#endif //{{ module_name | upper }}_H