Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwa2710 committed Feb 7, 2025
1 parent 346eaf2 commit cd9fa24
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Estimator_OrbitDeterminationSolver(p
aModule,
"OrbitDeterminationSolver",
R"doc(
Orbit Determination solver using Least Squares estimation.
Orbit Determination solver.
)doc"
);

class_<OrbitDeterminationSolver::Analysis>(
orbitDeterminationSolver,
"Analysis",
R"doc(
Analysis results from the Orbit Determination Least Squares Solver.
Analysis results from the Orbit Determination.
)doc"
)
.def(
Expand Down Expand Up @@ -120,6 +120,17 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Estimator_OrbitDeterminationSolver(p
LeastSquaresSolver: The Least Squares solver.
)doc"
)
.def(
"access_estimation_frame",
&OrbitDeterminationSolver::accessEstimationFrame,
return_value_policy::reference_internal,
R"doc(
Access the estimation frame.
Returns:
Frame: The estimation frame.
)doc"
)
.def(
"estimate",
&OrbitDeterminationSolver::estimate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ def observations() -> list[State]:
reference_frame=Frame.ITRF(),
)


@pytest.fixture
def initial_guess_sigmas(
coordinate_subsets: list[CoordinateSubset],
) -> dict[CoordinateSubset, list[float]]:
return {
coordinate_subsets[0]: [1e-1],
coordinate_subsets[1]: [1e-2],
coordinate_subsets[0]: [1e-1, 1e-1, 1e-1],
coordinate_subsets[1]: [1e-2, 1e-2, 1e-2],
}


Expand All @@ -88,10 +89,11 @@ def observation_sigmas(
coordinate_subsets: list[CoordinateSubset],
) -> dict[CoordinateSubset, list[float]]:
return {
coordinate_subsets[0]: [1e-1],
coordinate_subsets[1]: [1e-2],
coordinate_subsets[0]: [1e-1, 1e-1, 1e-1],
coordinate_subsets[1]: [1e-2, 1e-2, 1e-2],
}


@pytest.fixture
def rms_error() -> float:
return 1.0
Expand Down Expand Up @@ -214,7 +216,7 @@ def test_access_methods(
assert isinstance(orbit_determination_solver.access_environment(), Environment)
assert isinstance(orbit_determination_solver.access_propagator(), Propagator)
assert isinstance(orbit_determination_solver.access_solver(), LeastSquaresSolver)
# assert isinstance(orbit_determination_solver.access_estimation_frame(), Frame)
assert isinstance(orbit_determination_solver.access_estimation_frame(), Frame)

def test_estimate(
self,
Expand Down

0 comments on commit cd9fa24

Please sign in to comment.