Returns the time and space coordinates when the transmission arrives at the object that moves with the provided mobility.
The result might be an approximation only, because there's a tradeoff between precision and performance. This function never returns nullptr.
67 const simtime_t startTime = transmission->getStartTime();
68 const simtime_t endTime = transmission->getEndTime();
69 const Coord startPosition = transmission->getStartPosition();
70 const Coord endPosition = transmission->getEndPosition();
72 const simtime_t startPropagationTime = startPosition.distance(startArrivalPosition) /
propagationSpeed.
get();
73 const simtime_t startArrivalTime = startTime + startPropagationTime;
74 const EulerAngles startArrivalOrientation = mobility->getCurrentAngularPosition();
76 const Coord endArrivalPosition = startArrivalPosition;
77 const simtime_t endPropagationTime = startPropagationTime;
78 const simtime_t endArrivalTime = endTime + startPropagationTime;
79 const simtime_t preambleDuration = transmission->getPreambleDuration();
80 const simtime_t headerDuration = transmission->getHeaderDuration();
81 const simtime_t dataDuration = transmission->getDataDuration();
82 const EulerAngles endArrivalOrientation = mobility->getCurrentAngularPosition();
83 return new Arrival(startPropagationTime, endPropagationTime, startArrivalTime, endArrivalTime, preambleDuration, headerDuration, dataDuration, startArrivalPosition, endArrivalPosition, startArrivalOrientation, endArrivalOrientation);
87 const simtime_t endPropagationTime = endPosition.distance(endArrivalPosition) /
propagationSpeed.
get();
88 const simtime_t endArrivalTime = endTime + endPropagationTime;
89 const simtime_t preambleDuration = transmission->getPreambleDuration();
90 const simtime_t headerDuration = transmission->getHeaderDuration();
91 const simtime_t dataDuration = transmission->getDataDuration();
92 const EulerAngles endArrivalOrientation = mobility->getCurrentAngularPosition();
93 return new Arrival(startPropagationTime, endPropagationTime, startArrivalTime, endArrivalTime, preambleDuration, headerDuration, dataDuration, startArrivalPosition, endArrivalPosition, startArrivalOrientation, endArrivalOrientation);
bool ignoreMovementDuringReception
Definition: ConstantSpeedPropagation.h:32
bool ignoreMovementDuringPropagation
Definition: ConstantSpeedPropagation.h:31
const value_type & get() const
Definition: Units.h:89
mps propagationSpeed
Definition: PropagationBase.h:30
virtual const Coord computeArrivalPosition(const simtime_t startTime, const Coord startPosition, IMobility *mobility) const
Definition: ConstantSpeedPropagation.cc:48
long arrivalComputationCount
Definition: PropagationBase.h:31