Skip to content

Commit

Permalink
Working on model
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Dec 10, 2024
1 parent ef22038 commit 27f6b47
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ class DirectFirstOrderDopplerProperTimeRateInterface:
const std::function< double( ) > gravitationalParameterFunction,
const std::string& referenceBody,
const LinkEndType referencePointLinkEndType = unidentified_link_end,
const std::function< Eigen::Vector6d( const double ) > referencePointStateFunction =
std::function< Eigen::Vector6d( const double ) >( ) ):
const std::vector< std::function< Eigen::Vector6d( const double ) > > referencePointStateFunction =
std::vector< std::function< Eigen::Vector6d( const double ) > >( ) ):
DopplerProperTimeRateInterface( computationPointLinkEndType ),
gravitationalParameterFunction_( gravitationalParameterFunction ),
referenceBody_( referenceBody ),
referencePointLinkEndType_( referencePointLinkEndType ),
referencePointStateFunction_( referencePointStateFunction )
referencePointStateFunctions_( referencePointStateFunctions )
{
// Check input consistency
if( this->computationPointLinkEndType_ == referencePointLinkEndType )
Expand Down
17 changes: 12 additions & 5 deletions include/tudat/simulation/estimation_setup/createObservationModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,14 @@ class DirectFirstOrderDopplerProperTimeRateSettings: public DopplerProperTimeRat
* and w.r.t. which the velocity of the point at which proper time rate is computed is taken
*/
DirectFirstOrderDopplerProperTimeRateSettings(
const std::string centralBodyName ):
const std::string& centralBodyName ):
DopplerProperTimeRateSettings( direct_first_order_doppler_proper_time_rate ),
centralBodyName_( centralBodyName ){ }
centralBodyNames_( { centralBodyName } ){ }

DirectFirstOrderDopplerProperTimeRateSettings(
const std::vector< std::string >& centralBodyNames ):
DopplerProperTimeRateSettings( direct_first_order_doppler_proper_time_rate ),
centralBodyNames_( centralBodyNames ){ }

//! Destructor.
~DirectFirstOrderDopplerProperTimeRateSettings( ){ }
Expand All @@ -625,7 +630,7 @@ class DirectFirstOrderDopplerProperTimeRateSettings: public DopplerProperTimeRat
* Name of central body, fromw which the mass monopole is retrieved to compute the proper time rate,
* and w.r.t. which the velocity of the point at which proper time rate is computed is taken
*/
std::string centralBodyName_;
std::vector< std::string > centralBodyNames_;
};

//! Class to define the settings for one-way Doppler observable
Expand Down Expand Up @@ -1282,6 +1287,8 @@ std::shared_ptr< DopplerProperTimeRateInterface > createOneWayDopplerProperTimeC
}
else
{
std::vector< std::function< double( ) > > gravitationalParameterFunctions;

if( bodies.at( directFirstOrderDopplerProperTimeRateSettings->centralBodyName_ )->getGravityFieldModel( ) == nullptr )
{
throw std::runtime_error( "Error when making DirectFirstOrderDopplerProperTimeRateInterface, no gravity field found for " +
Expand Down Expand Up @@ -2291,11 +2298,11 @@ class ObservationModelCreator< 1, ObservationScalarType, TimeType >
{
auto uplinkOneWaySettings = std::make_shared< OneWayDopplerObservationSettings >(
getUplinkFromTwoWayLinkEnds( linkEnds ), observationSettings->lightTimeCorrectionsList_,
std::make_shared< DirectFirstOrderDopplerProperTimeRateSettings >( "Earth" ), nullptr );
std::make_shared< DirectFirstOrderDopplerProperTimeRateSettings >( "Sun" ), std::make_shared< DirectFirstOrderDopplerProperTimeRateSettings >( "Sun" ) );
uplinkOneWaySettings->normalizeWithSpeedOfLight_ = false;
auto downlinkOneWaySettings = std::make_shared< OneWayDopplerObservationSettings >(
getDownlinkFromTwoWayLinkEnds( linkEnds ), observationSettings->lightTimeCorrectionsList_,
nullptr, std::make_shared< DirectFirstOrderDopplerProperTimeRateSettings >( "Earth" ) );
std::make_shared< DirectFirstOrderDopplerProperTimeRateSettings >( "Sun" ), std::make_shared< DirectFirstOrderDopplerProperTimeRateSettings >( "Sun" ) );
downlinkOneWaySettings->normalizeWithSpeedOfLight_ = false;

auto twoWaySettings = std::make_shared< TwoWayDopplerObservationSettings >( uplinkOneWaySettings, downlinkOneWaySettings );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ BOOST_AUTO_TEST_CASE(testJuiceMeasuredFrequency)
// std::cout<<linear_algebra::getVectorEntryMean( residualVector.segment( 0, 7000 ) )<<std::endl;

//
// input_output::writeMatrixToFile( observableVector, "pride_doppler.dat", 16 );
// input_output::writeMatrixToFile( residualVector, "pride_residual.dat", 16 );
// input_output::writeMatrixToFile( utilities::convertStlVectorToEigenVector( utilities::staticCastVector< double, Time >( observationTimes ) ), "pride_times.dat", 16 );
input_output::writeMatrixToFile( observableVector, "pride_doppler.dat", 16 );
input_output::writeMatrixToFile( residualVector, "pride_residual.dat", 16 );
input_output::writeMatrixToFile( utilities::convertStlVectorToEigenVector( utilities::staticCastVector< double, Time >( observationTimes ) ), "pride_times.dat", 16 );
}

}
Expand Down

0 comments on commit 27f6b47

Please sign in to comment.