Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fixes for GRAIL fit to spice example. #265

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading