-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome!
Astrodynamics toolkit can be seen as an extension and a C++ wrapper of cspice toolkit(N 67) developped by the JPL.
This project has been initiated to make life easier for people who don't know cspice or need an object-oriented approach.
The goal of this project is to :
- Allow object oriented development and provide high level objects
- Abstract file handling (kernels, frames, ...)
- Evaluate constraints like occultations, body in instrument field of view, ...
This framework has been written in C++ to offer a good performance but if you need a more productive approach you can switch immediately to the .Net version of this project here and you will get the best of the both worlds :
C++ velocity + .Net productivity = ❤️
Download the latest Linux or Windows release : Releases
At this stage we assume that you have mastered your development environment but if you need some advises for yours developments we suggest you this approach :
In this quick start you have 2 options to install the framework, one from binaries another from cmake.
-
Create your C/C++ project folder, in this example we assume your output path will be called "build" but you can use the name of your choice.
-
Extract Includes folder from archive IO-Toolkit-Linux-vx.x.xx-x to folder /usr/local/include/IO/.
-
Copy libIO.Astrodynamics.so to /usr/local/lib/
-
Extract Data folder from archive IO-Toolkit-Linux-vx.x.xx-x into your computer. This data folder contains main solar system kernels.
-
You will need to load these data in your program with the following recursive function
IO::Astrodynamics::Kernels::KernelsLoader::Load("Data/SolarSystem");
-
Create your C/C++ project folder, in this example we assume your output path will be called "build" but you can use the name of your choice.
-
From the dll package you just downloaded
- Copy Includes folder at the root of the project
- Copy IO.Astrodynamics.dll and IO.Astrodynamics.lib in the root folder(used to link libraries) and in the build folder(used at runtime).
- Copy Data folder into your computer. This data folder contains main solar system kernels.
-
You will need to load these data in your program with the following recursive function
IO::Astrodynamics::Kernels::KernelsLoader::Load("Data/SolarSystem");
You should have a folder tree like that :
YourProject
| Includes
| build
| IO.Astrodynamics.dll
| IO.Astrodynamics.lib
| IO.Astrodynamics.dll
| IO.Astrodynamics.lib
#Clone project
git clone https://github.com/IO-Aerospace-software-engineering/Astrodynamics.git
#Go into directory
cd Astrodynamics
#Create build directory
mkdir build_release
#Go into build directory
cd build_release
#Configure Cmake project
cmake -DCMAKE_BUILD_TYPE=Release ..
#Build project
#-j 4 option is used to define how many threads could be used to compile project, is this example will use 4 threads
cmake --build . --config Release --target IO.Astrodynamics -j 4
#Install libraries and includes
#This command must be executed with admin rights
cmake --install IO.Astrodynamics
Due to heterogeneous Windows development environments, once you've proceeded cmake install you must copy headers and libraries into your project.
Windows users should have a folder tree like that for their project :
YourProject
| Includes
| build_release
| IO.Astrodynamics.dll
| IO.Astrodynamics.lib
| IO.Astrodynamics.dll
| IO.Astrodynamics.lib
Linux users should have a folder tree like that :
YourProject
| build_release
Before use the framework, you must install it.
It can be installed from binaries or cmake, these procedures are described above.
In this example we will create a small program based on cmake to compute maneuvers required to join another Spacecraft from earth surface and evaluate some constraints during the flight.
- Ensure your CMake project contains at least these parameters :
cmake_minimum_required(VERSION 3.18.0) project(MyApp VERSION 0.1.0) project (MyApp C CXX) set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 17) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_executable(MyApp main.cpp) if (MSVC) include_directories(${CMAKE_SOURCE_DIR}/Includes) target_link_libraries(MyApp IO.Astrodynamics.dll) elseif(UNIX) include_directories(/usr/local/include/IO) find_library(IO_Astrodynamics_LIB NAMES libIO.Astrodynamics.so) target_link_libraries(IOAstrodynamicsTEST ${IO_Astrodynamics_LIB}) endif ()
Remark : If unspecified, all values are expressed in international system of units (meter, second, radian, m/s, ...)