Package it.unibo.alchemist.utils
Class Maps
-
- All Implemented Interfaces:
public final class Maps
-
-
Method Summary
Modifier and Type Method Description static double
getDistance(GeoPosition p1, GeoPosition p2)
Returns the distance in meters. static double
initialBearing(GeoPosition start, GeoPosition end)
static LatLongPosition
getDestinationLocation(GeoPosition start, double initialBearing, double dist)
static LatLongPosition
getDestinationLocation(GeoPosition start, GeoPosition end, double dist)
static LatLng
toLatLng(GeoPosition p)
Converts GeoPosition to LatLng. static LatLongPosition
toLatLong(LatLng p)
Converts LatLng to LatLongPosition. -
-
Method Detail
-
getDistance
static double getDistance(GeoPosition p1, GeoPosition p2)
Returns the distance in meters.
- Parameters:
p1
- First pointp2
- Second point- Returns:
the distance in meters
-
initialBearing
static double initialBearing(GeoPosition start, GeoPosition end)
- Parameters:
start
- initial positionend
- final position- Returns:
the initial bearing
-
getDestinationLocation
static LatLongPosition getDestinationLocation(GeoPosition start, double initialBearing, double dist)
- Parameters:
start
- initial positioninitialBearing
- the initial bearingdist
- maximum walkable length- Returns:
the actual destination
-
getDestinationLocation
static LatLongPosition getDestinationLocation(GeoPosition start, GeoPosition end, double dist)
- Parameters:
start
- initial positionend
- final positiondist
- maximum walkable length- Returns:
the actual destination
-
toLatLng
static LatLng toLatLng(GeoPosition p)
Converts GeoPosition to LatLng.
- Parameters:
p
- the GeoPosition- Returns:
a LatLng
-
toLatLong
static LatLongPosition toLatLong(LatLng p)
Converts LatLng to LatLongPosition.
- Parameters:
p
- LatLng- Returns:
-
-
-
-