Fixed dead time calculation formula
This commit is contained in:
parent
c57d1e26ef
commit
48170cd353
@ -28,7 +28,6 @@ import java.util.Map;
|
||||
import static java.lang.Math.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Darksnake
|
||||
*/
|
||||
public class TritiumUtils {
|
||||
@ -113,8 +112,10 @@ public class TritiumUtils {
|
||||
double res;
|
||||
if (deadTime > 0) {
|
||||
double total = p.getEventsCount();
|
||||
double time = p.getLength();
|
||||
res = wind / (1 - total * deadTime / time);
|
||||
// double time = p.getLength();
|
||||
// res = wind / (1 - total * deadTime / time);
|
||||
double timeRatio = deadTime / p.getLength();
|
||||
res = wind / total * (1d - Math.sqrt(1d - 4d * total * timeRatio)) / 2d / timeRatio;
|
||||
} else {
|
||||
res = wind;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user