File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -5117,7 +5117,10 @@ protected double CalibrateTimeStamp(double timeStamp)
51175117 //if (timeDifference > (1 / ((clockConstant / ADCRawSamplingRateValue) - 1)) * 1000)
51185118 if ( timeDifference > adjustedETD )
51195119 {
5120- PacketLossCount = PacketLossCount + 1 ;
5120+ //calculate the estimated packet loss within that time period
5121+ int numberOfLostPackets = ( int ) Math . Ceiling ( timeDifference / adjustedETD ) ;
5122+ PacketLossCount = PacketLossCount + numberOfLostPackets ;
5123+ //PacketLossCount = PacketLossCount + 1;
51215124 long mTotalNumberofPackets = ( long ) ( ( calibratedTimeStamp - CalTimeStart ) / ( 1 / ( clockConstant / ADCRawSamplingRateValue ) * 1000 ) ) ;
51225125 PacketReceptionRate = ( double ) ( ( mTotalNumberofPackets - PacketLossCount ) / ( double ) mTotalNumberofPackets ) * 100 ;
51235126
You can’t perform that action at this time.
0 commit comments