From aabe00a39472074d05b54946b3878e82f7db17f7 Mon Sep 17 00:00:00 2001 From: Adam Paquette <acpaquette@usgs.gov> Date: Mon, 28 Jan 2019 12:41:00 -0700 Subject: [PATCH] updated config with recommended changes and started documenting functions --- docs/source/conf.py | 12 ++++--- docs/source/index.rst | 10 +++--- docs/source/library/capi/capi.rst | 5 ++- docs/source/library/capi/index.rst | 2 +- include/ale.h | 56 +++++++++++++++++++++++++++--- 5 files changed, 70 insertions(+), 15 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6f49da3..5962c8e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,12 +21,12 @@ import guzzle_sphinx_theme # -- Project information ----------------------------------------------------- -project = 'ale' -copyright = '2018, Adam Paquette' -author = 'Adam Paquette' +project = 'ALE' +copyright = 'Public Domain' +author = 'USGS, Astrogeology Science Center' # The short X.Y version -version = '' +version = '0.1' # The full version, including alpha/beta/rc tags release = '0.1.0' @@ -43,6 +43,8 @@ release = '0.1.0' breathe_projects = {"ale": "./../doxyxml/"} +# breathe_projects_source = {"ale": ("../../include", ['ale.h'])} + breathe_default_project = "ale" extensions = [ @@ -144,7 +146,7 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'ALE.tex', 'ALE Documentation', - 'Adam Paquette', 'manual'), + author, 'manual'), ] diff --git a/docs/source/index.rst b/docs/source/index.rst index 190e16d..17dc275 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,5 +1,7 @@ -ALE C API -====== +ALE Package +=========== -.. doxygenfile:: ale.cpp - :project: ale +.. toctree:: + :maxdepth: 2 + + library/index diff --git a/docs/source/library/capi/capi.rst b/docs/source/library/capi/capi.rst index 20a5da8..e2b88f9 100644 --- a/docs/source/library/capi/capi.rst +++ b/docs/source/library/capi/capi.rst @@ -1,6 +1,9 @@ -:mod:`capi` --- Input/Output Algorithms +:mod:`capi` --- Module C Functions ============================================ The :mod:`src` module +.. doxygenfile:: ale.h + :project: ale + .. versionadded:: 0.1.0 diff --git a/docs/source/library/capi/index.rst b/docs/source/library/capi/index.rst index 1e6854f..55e134d 100644 --- a/docs/source/library/capi/index.rst +++ b/docs/source/library/capi/index.rst @@ -1,4 +1,4 @@ -:mod:`capi` --- All A.L.E. functions +:mod:`capi` --- All ALE functions =================================== The internal data structures used by PyHAT to represent 1d, 2d, and n-dimensional data. diff --git a/include/ale.h b/include/ale.h index 7145e75..5cdb018 100644 --- a/include/ale.h +++ b/include/ale.h @@ -1,5 +1,6 @@ #ifndef ALE_INCLUDE_ALE_H #define ALE_INCLUDE_ALE_H +/// @file #include <json.hpp> #include <string> @@ -14,27 +15,74 @@ namespace ale { spline }; - nlohmann::json constructStateFromIsd(const std::string positionRotationData); - + /** + *@brief Get the position of the spacecraft at a given time based on a set of coordinates, and their associated times + *@param coords a vector of double vectors of coordinates + *@param times a double vector of times + *@param time time to observe the spacecraft's position at + *@param interp interpolation type + */ std::vector<double> getPosition(std::vector<std::vector<double>> coords, std::vector<double> times, double time, interpolation interp); - + /** + *@brief Get the velocity of the spacecraft at a given time based on a set of coordinates, and their associated times + *@param coords a vector of double vectors of coordinates + *@param times a double vector of times + *@param time time to observe the spacecraft's velocity at + *@param interp interpolation type + */ std::vector<double> getVelocity(std::vector<std::vector<double>> coords, std::vector<double> times, double time, const interpolation interp); - + /** + *@brief Get the position of the spacecraft at a given time based on a derived function from a set of coeffcients + *@param coeffs a vector of double vector of coeffcients + *@param time time to observe the spacecraft's position at + */ std::vector<double> getPosition(std::vector<std::vector<double>> coeffs, double time); + + /** + *@brief Get the velocity of the spacecraft at a given time based on a derived function from a set of coeffcients + *@param coeffs a vector of double vector of coeffcients + *@param time time to observe the spacecraft's velocity at + */ std::vector<double> getVelocity(std::vector<std::vector<double>> coeffs, double time); + /** + *@brief Get the rotation of the spacecraft at a given time based on a set of rotations, and their associated times + *@param rotations a vector of double vector of rotations + *@param times a double vector of times + *@param time time to observe the spacecraft's rotation at + *@param interp interpolation type + */ std::vector<double> getRotation(std::vector<std::vector<double>> rotations, std::vector<double> times, double time, interpolation interp); + + /** + *@brief Get the angular velocity of the spacecraft at a given time based on a set of rotations, and their associated times + *@param rotations a vector of double vector of rotations + *@param times a double vector of times + *@param time time to observe the spacecraft's angular velocity at + *@param interp interpolation type + */ std::vector<double> getAngularVelocity(std::vector<std::vector<double>> rotations, std::vector<double> times, double time, interpolation interp); + /** + *@brief Get the rotation of the spacecraft at a given time based on a derived function from a set of coeffcients + *@param coeffs a vector of double vector of coeffcients + *@param time time to observe the spacecraft's rotation at + */ std::vector<double> getRotation(std::vector<std::vector<double>> coeffs, double time); + + /** + *@brief Get the angular velocity of the spacecraft at a given time based on a derived function from a set of coeffcients + *@param coeffs a vector of double vector of coeffcients + *@param time time to observe the spacecraft's angular velocity at + */ std::vector<double> getAngularVelocity(std::vector<std::vector<double>> coeffs, double time); double evaluatePolynomial(std::vector<double> coeffs, double time, int d); -- GitLab