Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/main/java/de/serosystems/lib1090/Position.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void setAltitudeType(AltitudeType altitudeType) {
/**
* Calculates the two-dimensional great circle distance (haversine)
* @param other position to which we calculate the distance
* @return distance between the this and other position in meters
* @return distance between this and other position in meters
*/
public Double haversine(Position other) {
double lon0r = toRadians(this.longitude);
Expand Down Expand Up @@ -200,7 +200,7 @@ public static Position fromECEF (double x, double y, double z) {
// correct for numerical instability in altitude near exact poles:
// after this correction, error is about 2 millimeters, which is about
// the same as the numerical precision of the overall function
if (abs(x) < 1 & abs(y) < 1)
if (abs(x) < 1 && abs(y) < 1)
alt = abs(z) - b;

return new Position(toDegrees(lon), toDegrees(lat), Tools.meters2Feet(alt), AltitudeType.ABOVE_WGS84_ELLIPSOID);
Expand Down