Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aoshimash/cs
Coordinate systems for planetary N-body simulation
https://github.com/aoshimash/cs
astrophysics cpp n-body
Last synced: 10 days ago
JSON representation
Coordinate systems for planetary N-body simulation
- Host: GitHub
- URL: https://github.com/aoshimash/cs
- Owner: aoshimash
- Created: 2019-03-12T08:07:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-08T11:54:16.000Z (over 5 years ago)
- Last Synced: 2024-10-26T17:23:26.777Z (about 2 months ago)
- Topics: astrophysics, cpp, n-body
- Language: C++
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CS
Coordinate systems library for planetary N-body simulation.
## Usage
### Example
Convert Orbital Elements to Cartesian Coordinates
```cpp
// Arrange containers to store results
vector> pos(3, valarray(3));
vector> vel(3, valarray(3));// Convert orbital elements to cartesian coordinates
cs::ConvertOelemToCartesian(mass, oelems, &pos, &vel);
```Convert Cartesian Coordinates to Orbital Elements
``` cpp
auto oelems = cs::ConvertCartesianToOelem(mass, pos, vel);
```