6 #include <Simulation.h>
10 namespace helios {
namespace filems{
class FMSFacade;}}
36 shared_ptr<FMSFacade>
fms =
nullptr;
90 std::shared_ptr<Survey> survey,
91 std::shared_ptr<FMSFacade>
fms,
93 std::shared_ptr<PulseThreadPoolInterface> pulseThreadPoolInterface,
111 int legCurrentProgress,
113 double legElapsedLength
184 void startLeg(
unsigned int const legIndex,
bool const manual);
229 void stopAndTurn(
unsigned int legIndex, std::shared_ptr<Leg> leg);
Class representing a simulation.
Definition: Simulation.h:23
int parallelizationStrategy
Specify the parallelization strategy.
Definition: Simulation.h:35
bool exportToFile
Flag specifying if simulation output must be exported to a file (true) or not (false)
Definition: Simulation.h:140
std::string fixedGpsTimeStart
Given fixed time start for GPS time as a string.
Definition: Simulation.h:123
Survey playback class, used to extend simulation functionalities so it can be controlled.
Definition: SurveyPlayback.h:18
std::chrono::nanoseconds getElapsedTime()
Obtain elapsed time.
Definition: SurveyPlayback.h:283
shared_ptr< FMSFacade > fms
Main facade to file management system.
Definition: SurveyPlayback.h:36
std::chrono::nanoseconds elapsedTime_ns
Elapsed time (nanoseconds) since survey simulation started.
Definition: SurveyPlayback.h:63
double elapsedLength
Currently elapsed length. It can be understood as the summation of all traveled legs.
Definition: SurveyPlayback.h:47
double getElapsedLength()
Obtain elapsed length.
Definition: SurveyPlayback.h:289
std::shared_ptr< Leg > getCurrentLeg()
Obtain current leg.
Definition: SurveyPlayback.cpp:218
long long legRemainingTime_ns
Expected remaining time (nanoseconds) for current leg completion.
Definition: SurveyPlayback.h:75
long long remainingTime_ns
Expected remaining time (nanoseconds) for survey simulation.
Definition: SurveyPlayback.h:67
void estimateTime(int legCurrentProgress, bool onGround, double legElapsedLength)
Time estimation for the entire simulation and current leg. NOTICE this function is called from trackP...
Definition: SurveyPlayback.cpp:107
void trackProgress()
Progress tracking and time estimation.
Definition: SurveyPlayback.cpp:178
long getRemainingTime()
Obtain expected remaining time.
Definition: SurveyPlayback.h:295
std::shared_ptr< Survey > mSurvey
The survey itself.
Definition: SurveyPlayback.h:32
void startLeg(unsigned int const legIndex, bool const manual)
Start specified leg.
Definition: SurveyPlayback.cpp:264
void prepareOutput()
Prepare output for current leg (measurements, trajectory and fullwave)
Definition: SurveyPlayback.cpp:464
void onLegComplete()
Handle leg completion.
Definition: SurveyPlayback.cpp:255
int estimateAngularLegProgress(double const legElapsedAngle)
Estimate leg progress from angular progress.
Definition: SurveyPlayback.cpp:161
void shutdown()
Handle survey playback shutdown.
Definition: SurveyPlayback.cpp:416
virtual void doSimStep()
Perform computations for current simulation step.
Definition: SurveyPlayback.cpp:200
std::chrono::nanoseconds getLegStartTime()
Obtain the leg start time in nanoseconds.
Definition: SurveyPlayback.h:300
std::string getLegOutputPrefix(std::string format="%03d")
Obtain current leg output prefix.
Definition: SurveyPlayback.cpp:236
void clearPointcloudFile()
Clear point cloud file for current leg.
Definition: SurveyPlayback.cpp:489
double getLegProgress()
Obtain current leg progress.
Definition: SurveyPlayback.h:271
void stopAndTurn(unsigned int legIndex, std::shared_ptr< Leg > leg)
Perform stop and turn operation to advance to next leg.
Definition: SurveyPlayback.cpp:431
double legProgress
Progress tracking for current leg.
Definition: SurveyPlayback.h:55
void startNextLeg(bool manual)
Start next leg.
Definition: SurveyPlayback.cpp:399
double getProgress()
Obtain simulation progress.
Definition: SurveyPlayback.h:265
int numEffectiveLegs
Number of effective legs.
Definition: SurveyPlayback.h:42
int getNumEffectiveLegs()
Obtain the number of effective legs.
Definition: SurveyPlayback.h:277
int estimateSpatialLegProgress(double const legElapsedLength)
Estimate the leg progress from linear space progress.
Definition: SurveyPlayback.cpp:156
std::string milliToString(long millis)
Translate milliseconds to time stamp string.
Definition: SurveyPlayback.cpp:421
bool mLegStarted
Flag to specify if leg has been started (true) or not (false)
Definition: SurveyPlayback.h:26
std::shared_ptr< Leg > getPreviousLeg()
Obtain the previous leg, if any.
Definition: SurveyPlayback.cpp:227
SurveyPlayback(std::shared_ptr< Survey > survey, std::shared_ptr< FMSFacade > fms, int const parallelizationStrategy, std::shared_ptr< PulseThreadPoolInterface > pulseThreadPoolInterface, int const chunkSize, std::string fixedGpsTimeStart, bool const exportToFile=true)
Survey playback constructor.
Definition: SurveyPlayback.cpp:28
std::chrono::nanoseconds legStartTime_ns
Time (nanoseconds) when the leg started.
Definition: SurveyPlayback.h:59
std::chrono::nanoseconds legElapsedTime_ns
Elapsed time (nanoseconds) since current leg started.
Definition: SurveyPlayback.h:71
long getLegRemainingTime()
Obtain current leg expected remaining time.
Definition: SurveyPlayback.h:311
std::chrono::nanoseconds getLegElapsedTime()
Obtain current leg elapsed time.
Definition: SurveyPlayback.h:305
double progress
Survey simulation progress tracking.
Definition: SurveyPlayback.h:51
int getCurrentLegIndex()
Obtain current leg index.
Definition: SurveyPlayback.cpp:232
int estimateTemporalLegProgress()
Estimate leg progress from temporal progress.
Definition: SurveyPlayback.cpp:167
The main facade for file management system.
Definition: FMSFacade.h:19