Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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);
```