Skip to content

Commit

Permalink
re-introdouced deprecated functions for backward compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFayolle committed Sep 24, 2024
1 parent 4e21c80 commit c8bb7ab
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 364 deletions.
539 changes: 230 additions & 309 deletions include/tudat/astro/orbit_determination/podInputOutputTypes.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,6 @@ std::pair< std::shared_ptr< EstimationOutput< StateScalarType, TimeType > >, Eig

if( observableType == 4 )
{
// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_range ] = 1.0 / ( 1.0 * 1.0 );
// weightPerObservable[ angular_position ] = 1.0 / ( 1.0E-9 * 1.0E-9 );
// weightPerObservable[ one_way_doppler ] = 1.0 / ( 1.0E-12 * 1.0E-12 );
//
// simulatedObservations->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightsPerObservationParser;
weightsPerObservationParser[ observationParser( one_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
weightsPerObservationParser[ observationParser( angular_position ) ] = 1.0 / ( 1.0E-9 * 1.0E-9 );
Expand All @@ -302,7 +295,6 @@ std::pair< std::shared_ptr< EstimationOutput< StateScalarType, TimeType > >, Eig
}
else
{
// simulatedObservations->setConstantWeightsMatrix( weight );
simulatedObservations->setConstantWeight( weight );
}

Expand Down Expand Up @@ -331,8 +323,6 @@ std::pair< std::shared_ptr< EstimationOutput< StateScalarType, TimeType > >, Eig
covarianceInput->defineCovarianceSettings( true, true, true, false );
estimationInput->applyFinalParameterCorrection_ = false;

// std::cout << "weights" << "\n\n";
// std::cout << estimationInput->getWeightsMatrixDiagonals( ).transpose( ) << "\n\n";

// Perform estimation
std::shared_ptr< EstimationOutput< StateScalarType, TimeType > > estimationOutput = orbitDeterminationManager.estimateParameters(
Expand Down Expand Up @@ -610,13 +600,6 @@ Eigen::VectorXd executeEarthOrbiterParameterEstimation(
std::shared_ptr< ObservationCollection< StateScalarType, TimeType > > simulatedObservations =
simulateObservations< StateScalarType, TimeType >( measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_range ] = 1.0 / ( 1.0 * 1.0 );
// weightPerObservable[ angular_position ] = 1.0 / ( 1.0E-5 * 1.0E-5 );
// weightPerObservable[ one_way_doppler ] = 1.0 / ( 1.0E-11 * 1.0E-11 * SPEED_OF_LIGHT * SPEED_OF_LIGHT );
//
// simulatedObservations->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightsPerObservationParser;
weightsPerObservationParser[ observationParser( one_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
weightsPerObservationParser[ observationParser( angular_position ) ] = 1.0 / ( 1.0E-5 * 1.0E-5 );
Expand Down Expand Up @@ -650,8 +633,6 @@ Eigen::VectorXd executeEarthOrbiterParameterEstimation(
simulatedObservations );
estimationInput->defineEstimationSettings( true, true, true, true, false );
estimationInput->setConvergenceChecker( std::make_shared< EstimationConvergenceChecker >( numberOfIterations ) );
// std::cout << "weights: " << "\n\n";
// std::cout << estimationInput->getWeightsMatrixDiagonals( ).transpose( ) << "\n\n";

// Perform estimation
std::shared_ptr< EstimationOutput< StateScalarType > > estimationOutput = orbitDeterminationManager.estimateParameters(
Expand Down Expand Up @@ -1193,14 +1174,6 @@ std::pair< Eigen::VectorXd, bool > executeEarthOrbiterBiasEstimation(
std::shared_ptr< ObservationCollection< StateScalarType, TimeType > > simulatedObservations = simulateObservations< StateScalarType, TimeType >(
measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_range ] = 1.0 / ( 1.0 * 1.0 );
// weightPerObservable[ n_way_range ] = 1.0 / ( 1.0 * 1.0 );
//
// weightPerObservable[ one_way_doppler ] = 1.0 / ( 1.0E-12 * 1.0E-12 * SPEED_OF_LIGHT * SPEED_OF_LIGHT );
//// weightPerObservable[ two_way_doppler ] = 1.0 / ( 1.0E-12 * 1.0E-12 * SPEED_OF_LIGHT * SPEED_OF_LIGHT );
// simulatedObservations->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightsPerObservationParser;
weightsPerObservationParser[ observationParser( one_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
weightsPerObservationParser[ observationParser( n_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,6 @@ BOOST_AUTO_TEST_CASE( test_DesaturationDeltaVsEstimation )
measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// Set weights
// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_range ] = 1.0 / ( 1.0 * 1.0 );
// weightPerObservable[ angular_position ] = 1.0 / ( 1.0E-5 * 1.0E-5 );
// weightPerObservable[ one_way_doppler ] = 1.0 / ( 1.0E-11 * 1.0E-11 * physical_constants::SPEED_OF_LIGHT * physical_constants::SPEED_OF_LIGHT );
//
// observationsAndTimes->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightsPerObservationParser;
weightsPerObservationParser[ observationParser( one_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
weightsPerObservationParser[ observationParser( angular_position ) ] = 1.0 / ( 1.0E-5 * 1.0E-5 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ Eigen::VectorXd executeParameterEstimation(
measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// Set weights
// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_range ] = 1.0E-4;
// weightPerObservable[ angular_position ] = 1.0E-20;
// observationsAndTimes->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightPerObservationParser;
weightPerObservationParser[ observationParser( one_way_range ) ] = 1.0E-4;
weightPerObservationParser[ observationParser( angular_position ) ] = 1.0E-20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ int main( )
std::shared_ptr< ObservationCollection< double, double > > simulatedObservations = simulateObservations< double, double >(
measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_doppler ] = 1.0 / ( 0.1 * 0.1 );
// simulatedObservations->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightPerObservationParser;
weightPerObservationParser[ observationParser( one_way_doppler ) ] = 1.0 / ( 0.1 * 0.1 );
simulatedObservations->setConstantWeightPerObservable( weightPerObservationParser );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,6 @@ BOOST_AUTO_TEST_CASE( test_ReferencePointEstimation )
measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// Set observation weights
// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ one_way_range ] = 1.0 / ( 1.0 * 1.0 );
// weightPerObservable[ angular_position ] = 1.0 / ( 1.0E-5 * 1.0E-5 );
// weightPerObservable[ one_way_doppler ] = 1.0 / ( 1.0E-11 * 1.0E-11 * physical_constants::SPEED_OF_LIGHT * physical_constants::SPEED_OF_LIGHT );
// observationsAndTimes->setConstantPerObservableWeightsMatrix( weightPerObservable );

std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightsPerObservationParser;
weightsPerObservationParser[ observationParser( one_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
weightsPerObservationParser[ observationParser( angular_position ) ] = 1.0 / ( 1.0E-5 * 1.0E-5 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -863,12 +863,7 @@ BOOST_AUTO_TEST_CASE( testMultiArcMultiBodyVariationalEquationCalculation1 )
std::shared_ptr< ObservationCollection< > > observationsAndTimes = simulateObservations< double, double >(
measurementSimulationInput, orbitDeterminationManager.getObservationSimulators( ), bodies );

// // Set observations weights.
// std::map< observation_models::ObservableType, double > weightPerObservable;
// weightPerObservable[ position_observable ] = 1.0 / ( 1.0 * 1.0 );
// weightPerObservable[ one_way_range ] = 1.0 / ( 1.0 * 1.0 );
// observationsAndTimes->setConstantPerObservableWeightsMatrix( weightPerObservable );

// Set observations weights.
std::map< std::shared_ptr< observation_models::ObservationCollectionParser >, double > weightPerObservationParser;
weightPerObservationParser[ observationParser( position_observable ) ] = 1.0 / ( 1.0 * 1.0 );
weightPerObservationParser[ observationParser( one_way_range ) ] = 1.0 / ( 1.0 * 1.0 );
Expand Down

0 comments on commit c8bb7ab

Please sign in to comment.