WSF
wsf::coverage::MeasureUtils Namespace Reference

Functions

void ComputeGaps (std::vector< AccessInterval > &aGaps, std::vector< AccessInterval > &aIntervals, const AccessInterval &aCoverageInterval, const std::string &aMoE_Type, const std::string &aMoE_ObjectName)
long GetIntervalStartSample (const AccessInterval &aInterval, const UtCalendar &aStartEpoch, double aCoverageStart, double aSampleDuration)
long GetIntervalEndSample (const AccessInterval &aInterval, const UtCalendar &aStartEpoch, double aCoverageStart, double aSampleDuration)

Function Documentation

◆ ComputeGaps()

void wsf::coverage::MeasureUtils::ComputeGaps ( std::vector< AccessInterval > & aGaps,
std::vector< AccessInterval > & aIntervals,
const AccessInterval & aCoverageInterval,
const std::string & aMoE_Type,
const std::string & aMoE_ObjectName )

Compute the gap intervals from the coverage intervals.

The complement of the access aIntervals in the coverage interval are the gap intervals. This routine will return the gaps given the access aIntervals. The provided intervals should be non-overlapping: no interval should overlap any other interval. The input aIntervals does not have to be time-ordered.

Parameters
aGapsA reference to an empty vector that will be used to store the gap intervals. This is an output parameter.
aIntervalsA set of access intervals.
aCoverageIntervalThe overall coverage interval which specifies the beginning and end of the relevant time span.
aMoE_TypeA string reference that describes the MoE type, i.e. "Simple Coverage MoE".
aMoE_ObjectNameThe name of the MoE WsfObject. When in doubt, just use GetName().

References end(), wsf::coverage::AccessInterval::GetEnd(), and wsf::coverage::AccessInterval::GetStart().

◆ GetIntervalEndSample()

long wsf::coverage::MeasureUtils::GetIntervalEndSample ( const AccessInterval & aInterval,
const UtCalendar & aStartEpoch,
double aCoverageStart,
double aSampleDuration )

Get the sample on which aInterval ends. The sample on which the coverage interval begins is always sample 0.

Parameters
aIntervalThe AccessInterval for which to find the end sample.
aStartEpochThe date and time at which the coverage interval begins.
aCoverageStartThe simulation time at which the coverage interval begins. When in doubt, use AccessInterval::GetStart().
aSampleDurationThe duration of the samples.
Returns
The sample on which aInterval ends. If it ends at midnight exactly, then it counts as the sample before.

References wsf::coverage::AccessInterval::GetEnd().

◆ GetIntervalStartSample()

long wsf::coverage::MeasureUtils::GetIntervalStartSample ( const AccessInterval & aInterval,
const UtCalendar & aStartEpoch,
double aCoverageStart,
double aSampleDuration )

Get the sample on which aInterval starts. The sample on which the coverage interval begins is always sample 0.

Parameters
aIntervalThe AccessInterval for which to find the start sample.
aStartEpochThe date and time at which the coverage interval begins.
aCoverageStartThe simulation time at which the coverage interval begins. When in doubt, use AccessInterval::GetStart().
aSampleDurationThe duration of the samples.
Returns
The sample on which aInterval begins.

References wsf::coverage::AccessInterval::GetStart().

Copyrights Multiple, All Rights Reserved