Skip to content

Commit

Permalink
remove delta computation in isListeningPossible
Browse files Browse the repository at this point in the history
  • Loading branch information
aarizaq committed Feb 22, 2023
1 parent 1fb1a59 commit cef4a30
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,7 @@ bool Radio::isListeningPossible() const
const simtime_t now = simTime();
const Coord& position = antenna->getMobility()->getCurrentPosition();
// TODO use 2 * minInterferenceTime for lookahead? or maybe simply use 0 duration listening?
double delta = 1E-12;
double exponent = now.getScaleExp();
if (exponent > -12)
delta = std::pow(10.0, exponent);
const IListening *listening = receiver->createListening(this, now, now + delta, position, position);
const IListening *listening = receiver->createListening(this, now, now + 1E-12, position, position);
const IListeningDecision *listeningDecision = medium->listenOnMedium(this, listening);
bool isListeningPossible = listeningDecision->isListeningPossible();
delete listening;
Expand Down

0 comments on commit cef4a30

Please sign in to comment.