Astro
is a library for orbital mechanics and spacecraft dynamics. This is a refactored version of the original library developed by Enrico Bertolazzi (University of Trento, Department of Industrial Engineering).
Are you looking for the online documentation? Visit this link!
Astro
is a header-only library that depends only on Eigen
(version >= 3.4.0), so the quick and dirty way of installing it is by simply copying the include
directory to your project and make sure to have Eigen
available however you see fit. Alternatively, you can do things properly and use CMake
(version >= 3.14).
Optionally, you can also install Sandals
ODEs/DAEs C++17 integrator library, and Matplot++
(version >= 1.2.0) to plot the results of your simulations.
If you are using CMake, you can add the library as a subdirectory in your project.
add_subdirectory(path/to/Astro)
target_link_libraries(your_target PRIVATE Astro::Astro)
You can use FetchContent
to download the library from GitHub.
include(FetchContent)
# Optionally specify a custom path to fetch content to
set(FETCHCONTENT_BASE_DIR "path/to/your/dependencies")
fetchcontent_declare(
Astro
GIT_REPOSITORY https://github.com/StoccoDavide/Astro.git
GIT_TAG main
)
fetchcontent_makeavailable(Astro)
target_link_libraries(your_target PRIVATE Astro::Astro)
If you already have Astro
somewhere on your system, you can use find_pacakge
directly.
# Optionally specify a custom path to find content from
list(APPEND CMAKE_PREFIX_PATH "path/to/your/dependencies")
find_package(
Astro
${YOUR_DESIRED_ASTRO_VERSION}
NO_MODULE
)
target_link_libraries(your_target PRIVATE Astro::Astro)
Since we are nice people, we also show you how to conditionally use FetchContent
based if you already have the library or not.
# Optionally specify a custom path to find content from
list(APPEND CMAKE_PREFIX_PATH "path/to/your/dependencies")
find_package(
Astro
${YOUR_DESIRED_ASTRO_VERSION}
NO_MODULE
)
if(NOT TARGET Astro::Astro)
include(FetchContent)
# Optionally specify a custom path to fetch content to
set(FETCHCONTENT_BASE_DIR "path/to/your/dependencies")
fetchcontent_declare(
Astro
GIT_REPOSITORY https://github.com/StoccoDavide/Astro.git
GIT_TAG main
)
fetchcontent_makeavailable(Astro)
endif()
target_link_libraries(your_target PRIVATE Astro::Astro)
-
Davide Stocco
University of Trento
Department of Industrial Engineering
email: davide.stocco@unitn.it -
Enrico Bertolazzi
University of Trento
Department of Industrial Engineering
email: enrico.bertolazzi@unitn.it
Aka...
▗▄▄▄ ▄ ▄ ▐▌ ▗▞▀▜▌▄▄▄▄ ▐▌ ▗▄▄▖ ▗▞▀▚▖ ▄▄▄ ▄ ▄
▐▌ █ █ █ ▐▌ ▝▚▄▟▌█ █ ▐▌ ▐▌ ▐▌▐▛▀▀▘█ █ █
▐▌ █ ▀▄▀▗▞▀▜▌ █ █ ▗▞▀▜▌ ▐▛▀▚▖▝▚▄▄▖█ ▀▀▀█
▐▙▄▄▀ ▝▚▄▟▌ ▝▚▄▟▌ ▐▙▄▞▘ ▄ █
▀▀▀
The Astro
project is distributed under the BSD 2-Clause License - see the LICENSE file for details.
Here's what the license entails:
- Anyone can copy, modify and distribute this software.
- You have to include the license and copyright notice with each and every distribution.
- You can use this software privately.
- You can use this software for commercial purposes.
- This software is provided without warranty.
- The software author or license can not be held liable for any damages inflicted by the software.