File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -319,8 +319,8 @@ HtPhy::GetPayloadDuration(uint32_t size,
319
319
case LAST_MPDU_IN_AGGREGATE: {
320
320
// last packet in an A-MPDU
321
321
uint32_t totalSize = totalAmpduSize + size;
322
- numSymbols = lrint (
323
- stbc * ceil ((service + totalSize * 8.0 + 6 * nes) / (stbc * numDataBitsPerSymbol))) ;
322
+ numSymbols =
323
+ stbc * ceil ((service + totalSize * 8.0 + 6 * nes) / (stbc * numDataBitsPerSymbol));
324
324
NS_ASSERT (totalAmpduNumSymbols <= numSymbols);
325
325
numSymbols -= totalAmpduNumSymbols;
326
326
if (incFlag)
@@ -336,7 +336,7 @@ HtPhy::GetPayloadDuration(uint32_t size,
336
336
// The number of OFDM symbols in the data field when BCC encoding
337
337
// is used is given in equation 19-32 of the IEEE 802.11-2016 standard.
338
338
numSymbols =
339
- lrint ( stbc * ceil ((service + size * 8.0 + 6.0 * nes) / (stbc * numDataBitsPerSymbol) ));
339
+ stbc * ceil ((service + size * 8.0 + 6.0 * nes) / (stbc * numDataBitsPerSymbol));
340
340
break ;
341
341
}
342
342
default :
Original file line number Diff line number Diff line change @@ -183,8 +183,7 @@ DsssPhy::GetPayloadDuration(uint32_t size,
183
183
double & /* totalAmpduNumSymbols */ ,
184
184
uint16_t /* staId */ ) const
185
185
{
186
- return MicroSeconds (
187
- lrint (ceil ((size * 8.0 ) / (txVector.GetMode ().GetDataRate (MHz_u{22 }) / 1.0e6 ))));
186
+ return MicroSeconds (ceil ((size * 8.0 ) / (txVector.GetMode ().GetDataRate (MHz_u{22 }) / 1.0e6 )));
188
187
}
189
188
190
189
Ptr<WifiPpdu>
Original file line number Diff line number Diff line change @@ -260,8 +260,7 @@ OfdmPhy::GetPayloadDuration(uint32_t size,
260
260
261
261
// The number of OFDM symbols in the data field when BCC encoding
262
262
// is used is given in equation 19-32 of the IEEE 802.11-2016 standard.
263
- double numSymbols =
264
- lrint (ceil ((GetNumberServiceBits () + size * 8.0 + 6.0 ) / (numDataBitsPerSymbol)));
263
+ double numSymbols = ceil ((GetNumberServiceBits () + size * 8.0 + 6.0 ) / (numDataBitsPerSymbol));
265
264
266
265
Time payloadDuration =
267
266
FemtoSeconds (static_cast <uint64_t >(numSymbols * symbolDuration.GetFemtoSeconds ()));
@@ -617,7 +616,7 @@ OfdmPhy::CalculateDataRate(Time symbolDuration,
617
616
double codingRate)
618
617
{
619
618
double symbolRate = (1e9 / static_cast <double >(symbolDuration.GetNanoSeconds ()));
620
- return lrint ( ceil (symbolRate * usableSubCarriers * numberOfBitsPerSubcarrier * codingRate) );
619
+ return ceil (symbolRate * usableSubCarriers * numberOfBitsPerSubcarrier * codingRate);
621
620
}
622
621
623
622
uint16_t
You can’t perform that action at this time.
0 commit comments