Skip to content

Commit

Permalink
chore: fix doxygen formatting (#289)
Browse files Browse the repository at this point in the history
* chore: fix doxygen formatting

* Apply suggestions from code review

Co-authored-by: Remy Derollez <43561754+Derollez@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Remy Derollez <43561754+Derollez@users.noreply.github.com>

* docs: align sequence api docs with function definition (#311)

* chore: fix doxygen formatting

* feat: realign brief

---------

Co-authored-by: Remy Derollez <43561754+Derollez@users.noreply.github.com>
Co-authored-by: Antoine Paletta <98616558+apaletta3@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 8, 2024
1 parent bf8bd6d commit 785fbb5
Show file tree
Hide file tree
Showing 63 changed files with 2,153 additions and 2,775 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ struct ToListConverter

struct IterableConverter
{
/// @brief Registers converter from a python iterable type to the provided type

/// @brief Registers converter from a python iterable type to the provided type
template <typename Container>
IterableConverter& from_python()
{
Expand All @@ -37,8 +36,7 @@ struct IterableConverter
return *this;
}

/// @brief Registers converter from the provided type to a python iterable type

/// @brief Registers converter from the provided type to a python iterable type
template <typename Container>
IterableConverter& to_python()
{
Expand All @@ -47,8 +45,7 @@ struct IterableConverter
return *this;
}

/// @brief Check if PyObject is iterable

/// @brief Check if PyObject is iterable
static void* convertible(PyObject* anObject)
{
auto* iterator = PyObject_GetIter(anObject);
Expand All @@ -69,7 +66,6 @@ struct IterableConverter
/// * Container::value_type is CopyConstructable.
/// * Container can be constructed and populated with two iterators.
/// I.e. Container(begin, end)

template <typename Container>
static void construct(PyObject* object, boost::python::converter::rvalue_from_python_stage1_data* data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ struct ToDictConverter

struct MapConverter
{
/// @brief Registers converter from a python iterable type to the provided type

/// @brief Registers converter from a python iterable type to the provided type
template <typename Container>
MapConverter& from_python()
{
Expand All @@ -39,8 +38,7 @@ struct MapConverter
return *this;
}

/// @brief Registers converter from the provided type to a python iterable type

/// @brief Registers converter from the provided type to a python iterable type
template <typename Container>
MapConverter& to_python()
{
Expand All @@ -49,8 +47,7 @@ struct MapConverter
return *this;
}

/// @brief Check if PyObject is iterable

/// @brief Check if PyObject is iterable
static void* convertible(PyObject* anObject)
{
auto* iterator = PyObject_GetIter(anObject);
Expand All @@ -69,7 +66,6 @@ struct MapConverter
/// Container Concept requirements:
///
/// * Container to be constructed is a map.

template <typename Container>
static void construct(PyObject* object, boost::python::converter::rvalue_from_python_stage1_data* data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

#include <sstream>

/// @brief Shift to String Template Function
///
/// Template function used for __str__ and __repr__
/// methods on classes exposed in python.

/// @brief Shift to String Template Function
/// Template function used for __str__ and __repr__
/// methods on classes exposed in python.
template <class T>
std::string shiftToString(const T& aClass)
{
Expand Down
3 changes: 1 addition & 2 deletions include/OpenSpaceToolkit/Astrodynamics/Access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ using ostk::physics::time::Interval;

using ostk::physics::units::Angle;

/// @brief Object-to-object visibility

/// @brief Object-to-object visibility
class Access
{
public:
Expand Down
24 changes: 11 additions & 13 deletions include/OpenSpaceToolkit/Astrodynamics/Access/Generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,28 +101,26 @@ class Generator

static Generator Undefined();

/// @brief Constructs an access generator with defined AER ranges
/// @brief Construct an access generator with defined AER ranges
///
/// @param [in] anAzimuthRange An azimuth interval [deg]
/// @param [in] anElevationRange An elevation interval [deg]
/// @param [in] aRangeRange A range interval [m]
/// @param [in] anEnvironment An environment
/// @return An access generator

/// @param anAzimuthRange An azimuth interval [deg]
/// @param anElevationRange An elevation interval [deg]
/// @param aRangeRange A range interval [m]
/// @param anEnvironment An environment
/// @return An access generator
static Generator AerRanges(
const Interval<Real>& anAzimuthRange,
const Interval<Real>& anElevationRange,
const Interval<Real>& aRangeRange,
const Environment& anEnvironment
);

/// @brief Constructs an access generator with a defined AER mask
/// @brief Construct an access generator with a defined AER mask
///
/// @param [in] anAzimuthElevationMask An azimuth-elevation mask [deg]
/// @param [in] aRangeRange A range interval [m]
/// @param [in] anEnvironment An environment
/// @return An access generator

/// @param anAzimuthElevationMask An azimuth-elevation mask [deg]
/// @param aRangeRange A range interval [m]
/// @param anEnvironment An environment
/// @return An access generator
static Generator AerMask(
const Map<Real, Real>& anAzimuthElevationMask,
const Interval<Real>& aRangeRange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ using ostk::physics::units::Mass;

using ostk::astro::trajectory::State;

/// @brief CCSDS Conjunction Data Message (CDM)
/// @brief CCSDS Conjunction Data Message (CDM)
/// General content sections:
/// - Header
/// - Event Relative Metadata
/// - Objects Metadata
/// - Objects Data
///
/// General content sections:
/// - Header
/// - Event Relative Metadata
/// - Objects Metadata
/// - Objects Data
///
/// @ref https://public.ccsds.org/Pubs/508x0b1e2c2.pdf

/// @ref https://public.ccsds.org/Pubs/508x0b1e2c2.pdf
// TBI: Figure out how to adapt based on providers
// TBI: Find a good way to handle comments and extra fields
// TBI: Self-contained, create a RSO class to hold Object data
Expand Down
80 changes: 34 additions & 46 deletions include/OpenSpaceToolkit/Astrodynamics/Dynamics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ using ostk::astro::trajectory::state::NumericalSolver;
using ostk::astro::trajectory::state::CoordinatesBroker;
using ostk::astro::trajectory::state::CoordinatesSubset;

/// @brief Define a dynamical system subject to equations of motion

/// @brief Define a dynamical system subject to equations of motion
class Dynamics
{
public:
Expand All @@ -63,91 +62,80 @@ class Dynamics
Size readStateSize;
};

/// @brief Constructor
/// @brief Constructor
///
/// @param [in] aName A name

/// @param aName A name
Dynamics(const String& aName = String::Empty());

/// @brief Destructor

/// @brief Destructor
virtual ~Dynamics();

/// @brief Output stream operator
/// @brief Output stream operator
///
/// @code
/// std::cout << Dynamics(...) ;
/// @code{.cpp}
/// std::cout << Dynamics(...) ;
/// @endcode
///
/// @param [in] anOutputStream An output stream
/// @param [in] aDynamics A Dynamics
/// @return A reference to output stream

/// @param anOutputStream An output stream
/// @param aDynamics A Dynamics
/// @return A reference to output stream
friend std::ostream& operator<<(std::ostream& anOutputStream, const Dynamics& aDynamics);

/// @brief Get name
/// @brief Get name
///
/// @return Name of Dynamics

/// @return Name of Dynamics
String getName() const;

/// @brief Print dynamics
/// @brief Print dynamics
///
/// @param [in] anOutputStream An output stream
/// @param [in] (optional) displayDecorators If true, display decorators

/// @param anOutputStream An output stream
/// @param (optional) displayDecorators If true, display decorators
virtual void print(std::ostream& anOutputStream, bool displayDecorator = true) const;

/// @brief Check if dynamics is defined (pure virtual)
/// @brief Check if dynamics is defined (pure virtual)
///
/// @return True if dynamics is defined

/// @return True if dynamics is defined
virtual bool isDefined() const = 0;

/// @brief Return the coordinates subsets that the instance reads from
/// @brief Return the coordinates subsets that the instance reads from
///
/// @return The coordinates subsets that the instance reads from

/// @return The coordinates subsets that the instance reads from
virtual Array<Shared<const CoordinatesSubset>> getReadCoordinatesSubsets() const = 0;

/// @brief Return the coordinates subsets that the instance writes to
/// @brief Return the coordinates subsets that the instance writes to
///
/// @return The coordinates subsets that the instance writes to

/// @return The coordinates subsets that the instance writes to
virtual Array<Shared<const CoordinatesSubset>> getWriteCoordinatesSubsets() const = 0;

/// @brief Compute the contribution to the state derivative.
/// @brief Compute the contribution to the state derivative.
///
/// @param [in] anInstant An instant
/// @param [in] x The reduced state vector (this vector will follow the structure determined by the
/// @param anInstant An instant
/// @param x The reduced state vector (this vector will follow the structure determined by the
/// 'read' coordinate subsets)
/// @param [in] aFrameSPtr The frame in which the state vector is expressed
/// @param aFrameSPtr The frame in which the state vector is expressed
///
/// @return The reduced derivative state vector (this vector must follow the structure determined by
/// @return The reduced derivative state vector (this vector must follow the structure determined by
/// the 'write' coordinate subsets) expressed in the given frame

virtual VectorXd computeContribution(
const Instant& anInstant, const VectorXd& x, const Shared<const Frame>& aFrameSPtr
) const = 0;

/// @brief Get system of equations wrapper
/// @brief Get system of equations wrapper
///
/// @param [in] aContextArray An array of Dynamics Information
/// @param [in] anInstant An instant
/// @param [in] aFrameSPtr The reference frame in which dynamic equations are resolved
/// @param aContextArray An array of Dynamics Information
/// @param anInstant An instant
/// @param aFrameSPtr The reference frame in which dynamic equations are resolved
///
/// @return std::function<void(const std::vector<double>&, std::vector<double>&, const double)>

/// @return std::function<void(const std::vector<double>&, std::vector<double>&, const double)>
static NumericalSolver::SystemOfEquationsWrapper GetSystemOfEquations(
const Array<Context>& aContextArray, const Instant& anInstant, const Shared<const Frame>& aFrameSPtr
);

/// @brief Get a list of dynamics from the envrionment
/// @brief Get a list of dynamics from the envrionment
///
/// @param [in] anEnvironment An environment
/// @param anEnvironment An environment
///
/// @return A list of dynamics

/// @return A list of dynamics
static Array<Shared<Dynamics>> FromEnvironment(const Environment& anEnvironment);

private:
Expand Down
Loading

0 comments on commit 785fbb5

Please sign in to comment.