Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1361,21 +1361,20 @@ public DCASwimStopper(SwimTrajectory swimTraj) {

@Override
public boolean stopIntegration(double t, double[] y) {

Point3D dcaCand = new Point3D(y[0],y[1],y[2]);
double maxDoca = Double.POSITIVE_INFINITY;

for(Line3D l : polylines) {
if(l.distance(dcaCand).length()<maxDoca) {
maxDoca=l.distance(dcaCand).length();
int nlines = polylines.size();
for(int i=0; i<nlines; i++) {
double doca = polylines.get(i).distance(dcaCand).length();
if (doca < maxDoca) {
maxDoca = doca;
}
}
if(maxDoca<_doca) {
if (maxDoca < _doca) {
_doca = maxDoca;
return false;
}
return true;

}

/**
Expand Down
Loading