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
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ private Position(double longitude, double latitude, double altitude) {
this.latitude = latitude;
this.altitude = altitude;

if (latitude < -90 || latitude > 90) {
if (latitude != Double.POSITIVE_INFINITY && (latitude < -90 || latitude > 90)) {
// Checks the latitude value is within range or provide a warning otherwise
logger.warning(String.format(Constants.DEFAULT_LOCALE,
"Latitude value seems to be out of range (found: %f, expected: [-90, 90]). "
+ "Did you accidentally reverse the longitude/latitude order?",
latitude));
}

if (longitude < -180 || longitude > 180) {
if (longitude != Double.POSITIVE_INFINITY && (longitude < -180 || longitude > 180)) {
// Checks the longitude value is within range or provide a warning otherwise
logger.warning(String.format(Constants.DEFAULT_LOCALE,
"Longitude value seems to be out of range (found: %f, expected: [-180, 180]). "
Expand Down