Commit a8b26e0b authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

- added a timestamp to the simulation result which refers to the timestamp of...

- added a timestamp to the simulation result which refers to the timestamp of the corresponding update
- now the timestamp of an update can be set externally
parent 6fb6801e
......@@ -35,6 +35,9 @@ namespace ITA
///
int iReferenceID = -1;
//! \brief Time stamp of the scene update that lead to this result
double dTimeStamp = -1;
///
/// \brief Serialize the object.
/// \param pSerializer the IVistaSerializer to use.
......
......@@ -40,13 +40,19 @@ namespace ITA
CUpdateScene ( ) = default;
///
/// \brief Constructor for a CUpdateScene.
/// \brief Constructs a scene update giving it a reference ID using an internal timestamp
///
/// This constructor initializes the ID to the next free ID and source and receiver to nullptrs.
/// \param referenceID the reference ID for the update.
/// Source and receiver are nullptrs.
///
explicit CUpdateScene ( unsigned int referenceID );
///
/// \brief Constructs a scene update giving it a reference ID and a timestamp from an external clock
///
/// Source and receiver are nullptrs.
///
explicit CUpdateScene( unsigned int iReferenceID, double dTimeStamp );
///
/// \brief Copy constructor.
/// \note This also copies the timestamp to keep the creation time of the original update.
......@@ -79,8 +85,7 @@ namespace ITA
void SetSourceReceiverPair ( std::unique_ptr<C3DObject> pSource, std::unique_ptr<C3DObject> pReceiver );
///
/// \brief Get the reference ID of update.
/// \return the reference ID of update.
/// \brief Get the reference ID of the source-receiver pair of this update
///
unsigned int GetReferenceID ( ) const;
......@@ -137,7 +142,7 @@ namespace ITA
///
/// \brief The reference ID of the update (For the user).
///
/// It encodes the source receiver path.
/// It encodes the source receiver pair.
///
int m_iReferenceID = -1;
......
......@@ -122,6 +122,7 @@ namespace ITA
auto pResult = std::make_unique< COutdoorSimulationResult>();
pResult->sourceReceiverPair = oSRPair;
pResult->iReferenceID = m_pSceneUpdate->GetReferenceID();
pResult->dTimeStamp = m_pSceneUpdate->GetTimeStamp();
pResult->voPathProperties.resize( vpEigenrays.size() );
for (int idx = 0; idx < vpEigenrays.size(); idx++)
......
......@@ -16,6 +16,12 @@ namespace ITA
CUpdateScene::CUpdateScene ( unsigned int referenceID ) :
m_iReferenceID ( referenceID )
{ }
CUpdateScene::CUpdateScene(unsigned int iReferenceID, double dTimeStamp)
: m_iReferenceID(iReferenceID)
, m_dTimeStamp(dTimeStamp)
{
}
CUpdateScene::CUpdateScene ( const CUpdateScene& other )
: IUpdateMessage ( other ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment