Skip to content

Commit

Permalink
Merge pull request #265 from SamFayolle/feature/odf_tests
Browse files Browse the repository at this point in the history
minor fixes for GRAIL fit to spice example.
  • Loading branch information
DominicDirkx authored Nov 18, 2024
2 parents d57776c + 4de5044 commit c8c4b50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 9 additions & 3 deletions include/tudat/simulation/estimation_setup/fitOrbitToEphemeris.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ std::shared_ptr< observation_models::ObservationCollection< StateScalarType, Tim
using namespace observation_models;

std::vector< TimeType > observationTimes;
TimeType currentTime = initialTime;
while( currentTime < finalTime )
TimeType currentTime = initialTime + 3600.0;
while( currentTime < finalTime - 3600.0 )
{
observationTimes.push_back( currentTime );
currentTime += static_cast< double >( dataPointInterval );
Expand Down Expand Up @@ -96,7 +96,8 @@ std::shared_ptr< EstimationOutput< StateScalarType, TimeType > > createBestFitTo
const std::vector< std::shared_ptr< estimatable_parameters::EstimatableParameterSettings > > additionalParameterNames =
std::vector< std::shared_ptr< estimatable_parameters::EstimatableParameterSettings > >( ),
const int numberOfIterations = 3,
const bool reintegrateVariationalEquations = true )
const bool reintegrateVariationalEquations = true,
const double resultsPrintFrequency = 0.0 )
{
using namespace observation_models;
using namespace estimatable_parameters;
Expand All @@ -111,13 +112,18 @@ std::shared_ptr< EstimationOutput< StateScalarType, TimeType > > createBestFitTo
std::make_shared< TranslationalStatePropagatorSettings< StateScalarType, TimeType > >
( centralBodies, accelerationModelMap, bodiesToPropagate, initialState, initialPropagationTime, integratorSettings,
std::make_shared< PropagationTimeTerminationSettings >( finalTime ) );
if ( resultsPrintFrequency > 0.0 )
{
propagatorSettings->getPrintSettings( )->setResultsPrintFrequencyInSteps( resultsPrintFrequency );
}

std::vector< std::shared_ptr< EstimatableParameterSettings > > parameterNames =
getInitialStateParameterSettings< StateScalarType, TimeType >( propagatorSettings, bodies );
parameterNames.insert(parameterNames.end(), additionalParameterNames.begin(), additionalParameterNames.end());

std::shared_ptr< estimatable_parameters::EstimatableParameterSet< StateScalarType > > parametersToEstimate =
createParametersToEstimate< StateScalarType, TimeType >( parameterNames, bodies, propagatorSettings );
printEstimatableParameterEntries( parametersToEstimate );


std::pair< std::vector< std::shared_ptr< observation_models::ObservationModelSettings > >,
Expand Down
1 change: 0 additions & 1 deletion src/io/readVariousPdsFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ std::pair< std::vector< double >, std::vector< double > > grailAntennaFileReader
}

std::string emptyFlags = vectorOfIndividualStrings.at( 6 );
std::cout << "emptyFlags.compare( 00000000 ) " << emptyFlags.compare( "00000000" ) << std::endl;
if ( emptyFlags.compare( "00000000" ) != 1 )
{
throw std::runtime_error( "Error when reading antenna switch file for GRAIL, inconsistent entry. The last eights digits should be set to zero." );
Expand Down

0 comments on commit c8c4b50

Please sign in to comment.