Skip to content

Commit

Permalink
refactor!: align namespaces to singular (#341)
Browse files Browse the repository at this point in the history
* chore: bump math to 2.1 instead of 2.0

* Revert "chore: bump math to 2.1 instead of 2.0"

This reverts commit 87f704a.

* chore: fix some missed imports

* chore: remove debug define

* feat: first pass

* chore: second pass of renaming

* fix: cpp tests

* fix: python tests

* refactor: change coordinatesbroker

* fix: CoordinatesBroker python bindings

* Apply suggestions from code review

self review

* refactor: coordinatessubsets namespace

* fix: documentation build

* feat: align namespaces to singular suggestions (#342)

feat: suggestions

---------

Co-authored-by: Vishwa Shah <vishwa2710@gmail.com>
  • Loading branch information
kyle-cochran and vishwa2710 authored Feb 13, 2024
1 parent 7e84431 commit 6b65f18
Show file tree
Hide file tree
Showing 460 changed files with 17,247 additions and 17,262 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Once the shell is up and running, playing with it is easy:
from ostk.physics import Environment
from ostk.physics.time import Instant
from ostk.astrodynamics.trajectory import Orbit
from ostk.astrodynamics.trajectory.orbit.models import SGP4
from ostk.astrodynamics.trajectory.orbit.models.sgp4 import TLE
from ostk.astrodynamics.trajectory.orbit.model import SGP4
from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE

tle = TLE(
'1 25544U 98067A 18231.17878740 .00000187 00000-0 10196-4 0 9994',
Expand Down Expand Up @@ -111,24 +111,24 @@ The library exhibits the following detailed and descriptive structure:
├── Trajectory
│ ├── State
│ ├── Orbit
│ │ ├── Models
│ │ ├── Model
│ │ │ ├── Kepler
│ │ │ │ └── Classical Orbital Elements (COE)
│ │ │ ├── SGP4
│ │ │ │ └── Two-Line Element set (TLE)
│ │ │ ├── Tabulated (input csv)
│ │ │ └── Propagated (numerical integration)
│ │ ├── Pass
│ │ └── Messages
│ │ └── Message
│ │ └── SpaceX
│ │ └── OPM
│ ├── Models
│ ├── Model
│ │ ├── Static
│ │ └── Tabulated
│ └── Propagator
├── Flight
│ ├── Profile
│ │ ├── Models
│ │ ├── Model
│ │ │ ├── Transform
│ │ │ └── Tabulated
│ │ └── State
Expand All @@ -142,7 +142,7 @@ The library exhibits the following detailed and descriptive structure:
├── Access
│ └── Generator
└── Conjunction
└── Messages
└── Message
└── CCSDS
└── CDM
```
Expand Down Expand Up @@ -315,18 +315,19 @@ The validation framework takes this yaml scenario definition (from the `/validat
```

#### Running the Validation Tests

The validation tests can be run with `ostk-validate` from within the dev container, or `make validation` as a standalone.

## Dependencies

| Name | Version | License | Link |
| ----------- | --------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Version | License | Link |
| ----------- | ------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Pybind11 | `2.10.1` | BSD-3-Clause | [github.com/pybind/pybind11](https://github.com/pybind/pybind11) |
| ordered-map | `0.6.0` | MIT | [github.com/Tessil/ordered-map](https://github.com/Tessil/ordered-map) |
| Eigen | `3.3.7` | MPL2 | [eigen.tuxfamily.org](http://eigen.tuxfamily.org/index.php) |
| SGP4 | `6a448b4` | Apache License 2.0 | [github.com/dnwrnr/sgp4](https://github.com/dnwrnr/sgp4) |
| NLopt | `2.5.0` | LGPL | [github.com/stevengj/nlopt](https://github.com/stevengj/nlopt) |
| benchmark | `1.8.2` | Apache License 2.0 | [github.com/google/benchmark](https://github.com/google/benchmark) |
| benchmark | `1.8.2` | Apache License 2.0 | [github.com/google/benchmark](https://github.com/google/benchmark) |
| Core | `main` | Apache License 2.0 | [github.com/open-space-collective/open-space-toolkit-core](https://github.com/open-space-collective/open-space-toolkit-core) |
| I/O | `main` | Apache License 2.0 | [github.com/open-space-collective/open-space-toolkit-io](https://github.com/open-space-collective/open-space-toolkit-io) |
| Mathematics | `main` | Apache License 2.0 | [github.com/open-space-collective/open-space-toolkit-mathematics](https://github.com/open-space-collective/open-space-toolkit-mathematics) |
Expand Down
16 changes: 8 additions & 8 deletions benchmark/OpenSpaceToolkit/Astrodynamics/Access.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <OpenSpaceToolkit/Astrodynamics/Dynamics.hpp>
#include <OpenSpaceToolkit/Astrodynamics/Trajectory.hpp>
#include <OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit.hpp>
#include <OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/SGP4.hpp>
#include <OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Models/SGP4/TLE.hpp>
#include <OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Model/SGP4.hpp>
#include <OpenSpaceToolkit/Astrodynamics/Trajectory/Orbit/Model/SGP4/TLE.hpp>

using ostk::core::container::Array;
using ostk::core::type::Shared;
Expand All @@ -35,12 +35,12 @@ using ostk::physics::time::Interval;
using ostk::physics::unit::Angle;
using ostk::physics::unit::Length;

using ostk::astro::Access;
using ostk::astro::Trajectory;
using ostk::astro::access::Generator;
using ostk::astro::trajectory::Orbit;
using ostk::astro::trajectory::orbit::models::SGP4;
using ostk::astro::trajectory::orbit::models::sgp4::TLE;
using ostk::astrodynamics::Access;
using ostk::astrodynamics::Trajectory;
using ostk::astrodynamics::access::Generator;
using ostk::astrodynamics::trajectory::Orbit;
using ostk::astrodynamics::trajectory::orbit::model::SGP4;
using ostk::astrodynamics::trajectory::orbit::model::sgp4::TLE;

static const int DEFAULT_ITERATIONS = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ using ostk::physics::time::DateTime;
using ostk::physics::time::Instant;
using ostk::physics::time::Scale;

using ostk::astro::trajectory::state::NumericalSolver;
using ostk::astro::trajectory::State;
using ostk::astro::trajectory::Propagator;
using ostk::astro::Dynamics;
using ostk::astro::dynamics::PositionDerivative;
using ostk::astro::dynamics::CentralBodyGravity;
using ostk::astrodynamics::trajectory::state::NumericalSolver;
using ostk::astrodynamics::trajectory::State;
using ostk::astrodynamics::trajectory::Propagator;
using ostk::astrodynamics::Dynamics;
using ostk::astrodynamics::dynamics::PositionDerivative;
using ostk::astrodynamics::dynamics::CentralBodyGravity;

static const int DEFAULT_ITERATIONS = 10;

Expand Down
24 changes: 12 additions & 12 deletions bindings/python/docs/Demonstration/Orbit Propagation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"from ostk.astrodynamics.flight.system import SatelliteSystem, PropulsionSystem\n",
"from ostk.astrodynamics.trajectory import LocalOrbitalFrameFactory\n",
"from ostk.astrodynamics.trajectory import LocalOrbitalFrameDirection\n",
"from ostk.astrodynamics.trajectory.state import CoordinatesSubset\n",
"from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianPosition\n",
"from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianVelocity\n",
"from ostk.astrodynamics.trajectory.state import CoordinatesBroker\n",
"from ostk.astrodynamics.trajectory.state import CoordinateSubset\n",
"from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianPosition\n",
"from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianVelocity\n",
"from ostk.astrodynamics.trajectory.state import CoordinateBroker\n",
"from ostk.astrodynamics.dynamics import (\n",
" AtmosphericDrag,\n",
" CentralBodyGravity,\n",
Expand Down Expand Up @@ -202,13 +202,13 @@
"metadata": {},
"outputs": [],
"source": [
"coordinates_broker = CoordinatesBroker(\n",
"coordinate_broker = CoordinateBroker(\n",
" [\n",
" CartesianPosition.default(),\n",
" CartesianVelocity.default(),\n",
" CoordinatesSubset.mass(),\n",
" CoordinatesSubset.surface_area(),\n",
" CoordinatesSubset.drag_coefficient(),\n",
" CoordinateSubset.mass(),\n",
" CoordinateSubset.surface_area(),\n",
" CoordinateSubset.drag_coefficient(),\n",
" ]\n",
")\n",
"\n",
Expand All @@ -228,7 +228,7 @@
" drag_coefficient,\n",
"]\n",
"\n",
"start_state = State(start_instant, coordinates, Frame.GCRF(), coordinates_broker)"
"start_state = State(start_instant, coordinates, Frame.GCRF(), coordinate_broker)"
]
},
{
Expand Down Expand Up @@ -401,7 +401,7 @@
"outputs": [],
"source": [
"def convert_state_with_mass(\n",
" instant: Instant, coordinates_broker: CoordinatesBroker, state: State\n",
" instant: Instant, coordinate_broker: CoordinateBroker, state: State\n",
") -> list:\n",
" \"\"\"\n",
" Convert an input (Instant, State) into dataframe-ready values. Including mass.\n",
Expand All @@ -420,7 +420,7 @@
" float(instant.get_modified_julian_date(Scale.UTC)),\n",
" *state.get_position().get_coordinates().transpose().tolist(),\n",
" *state.get_velocity().get_coordinates().transpose().tolist(),\n",
" state.extract_coordinates(CoordinatesSubset.mass())[0],\n",
" state.extract_coordinates(CoordinateSubset.mass())[0],\n",
" float(lla.get_latitude().in_degrees()),\n",
" float(lla.get_longitude().in_degrees()),\n",
" float(lla.get_altitude().in_meters()),\n",
Expand All @@ -435,7 +435,7 @@
"outputs": [],
"source": [
"data = [\n",
" convert_state_with_mass(state.get_instant(), coordinates_broker, state)\n",
" convert_state_with_mass(state.get_instant(), coordinate_broker, state)\n",
" for state in states\n",
"]"
]
Expand Down
Loading

0 comments on commit 6b65f18

Please sign in to comment.