diff --git a/src/main/java/org/orekit/propagation/analytical/gnss/GPSPropagator.java b/src/main/java/org/orekit/propagation/analytical/gnss/GPSPropagator.java index 652c6acaed..4ae5875db1 100644 --- a/src/main/java/org/orekit/propagation/analytical/gnss/GPSPropagator.java +++ b/src/main/java/org/orekit/propagation/analytical/gnss/GPSPropagator.java @@ -356,7 +356,7 @@ private DerivativeStructure eMeSinE(final DerivativeStructure E) { DerivativeStructure term = E; DerivativeStructure d = E.getField().getZero(); // the inequality test below IS intentional and should NOT be replaced by a check with a small tolerance - for (DerivativeStructure x0 = d.add(Double.NaN); x.getValue() != x0.getValue();) { + for (DerivativeStructure x0 = d.add(Double.NaN); !x.getValue().equals(x0.getValue());) { d = d.add(2); term = term.multiply(mE2.divide(d.multiply(d.add(1)))); x0 = x;