public class ProjectionHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
EARTH_RADIUS
Earth radius in meters
|
static double |
EARTHSCALE
Earth radius in Nauticals Miles (1852 m).
|
static double |
FT_TO_METERS
Conversion constant from Feet to meters (used for altitude)
|
static double |
NM_TO_METERS
Conversion constant from Nautical Miles to meters (used for distance)
|
Constructor and Description |
---|
ProjectionHelper() |
Modifier and Type | Method and Description |
---|---|
double |
getBearing(MapPosition vector)
Compute the angle between two points given their relative position in meters.
|
double |
getBearing(MapPosition point1,
MapPosition point2)
Compute the bearing between two points given their positions.
|
double |
getBearing(MapPosition vector,
short unit)
Compute the angle between two points given their relative position in meters.
|
double |
getBearingFromLatLong(MapPosition point1,
MapPosition point2)
Compute the bearing between two points given their position in latitude / longitude.
|
double |
getBearingFromLatLong(MapPosition point1,
MapPosition point2,
short unit)
Compute the bearing between two points given their position in latitude / longitude.
|
double |
getBearingFromNorthEast(MapPosition point1,
MapPosition point2)
Compute the bearing between two points given their position in meter.
|
double |
getBearingFromNorthEast(MapPosition point1,
MapPosition point2,
short unit)
Compute the bearing between two points given their position in meter.
|
double |
getDistance(MapPosition vector)
Compute the distance between two points given their relative position.
|
double |
getDistanceTo(double radians) |
double |
getDistanceTo(double lat1,
double lon1,
double lat2,
double lon2,
short unit)
Compute the distance between two points from (latitude, longitude).
|
double |
getDistanceTo(MapPosition point1,
MapPosition point2)
Compute the distance between two points from (latitude, longitude).
|
MapPosition |
getEastNorthPosition(double lat,
double lon)
Compute the projection from (latitude, longitude) coordinates to (east, north) using the Lambert approximation formulas.
|
MapPosition |
getEastNorthPosition(double lat,
double lon,
short unit)
Compute the projection from (latitude, longitude) coordinates to (east, north) using the Lambert approximation formulas.
|
MapPosition |
getEastNorthPosition(MapPosition latlongPosition)
Compute the projection from (latitude, longitude) coordinates to (east, north) using the Lambert approximation formulas.
|
MapPosition |
getEastNorthPosition(MapPosition latlongPosition,
short unit)
Compute the projection from (latitude, longitude) coordinates to (east, north) using the Lambert approximation formulas.
|
MapPosition |
getLatLongPosition(double eastNM,
double northNM)
Compute the reverse projection from (east, north) coordinates to (Latitude, Longitude) using the Lambert approximation formulas.
|
MapPosition |
getLatLongPosition(double latDEG,
double longDEG,
float eastNM,
float northNM)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPosition(double eastNM,
double northNM,
short unit)
Compute the reverse projection from (east, north) coordinates to (Latitude, Longitude) using the Lambert approximation formulas.
|
MapPosition |
getLatLongPosition(MapPosition eastNorthPosition)
Compute the reverse projection from (east, north) coordinates to (Latitude, Longitude) using the Lambert approximation formulas.
|
MapPosition |
getLatLongPosition(MapPosition refPoint,
double distanceMM,
double bearing)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPosition(MapPosition refPoint,
double distanceMM,
double bearing,
short unit)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPosition(MapPosition refPoint,
MapPosition relativePosition)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPositionFromMM(double latDEG,
double longDEG,
long xMM,
long yMM)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPositionFromMM(long xMM,
long yMM)
Compute the reverse projection from (x, y) coordinates from the reference of the MapHorz (the PRP) to (Latitude, Longitude) using the
Lambert approximation formulas.
|
MapPosition |
getLatLongPositionFromMM(MapPosition refpoint,
double distanceMM,
double bearing)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPositionFromMM(MapPosition refpoint,
double distanceMM,
double bearing,
short unit)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPositionFromMM(MapPosition refpoint,
MapPosition mmPosition)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
MapPosition |
getLatLongPositionFromMM(MapPosition refpoint,
MapPosition mmPosition,
short unit)
Return the (latitude, longitude) position of a point which is at a (east, north) position relative to a reference point.
|
double |
getOrientation()
Return the North orientation defined in degrees.
|
MapPosition |
getVector(double latDEG1,
double longDEG1,
double latDEG2,
double longDEG2)
Compute the projection from (latitude, longitude) coordinates to (east, north) using the Lambert approximation formulas.
|
MapPosition |
getVector(MapPosition point1,
MapPosition point2)
Compute the projection from (latitude, longitude) coordinates to (east, north) using the Lambert approximation formulas.
|
void |
setOrientation(double orientation)
Set the North orientation defined.
|
void |
setOrientation(double orientation,
short unit)
Set the North orientation defined.
|
void |
setPRP(double refPRPX,
double refPRPY)
Set the reference world position for the projection (latitude and longitude only in the current version of the standard).
|
void |
setPRP(double refPRPX,
double refPRPY,
short unit)
Set the reference world position for the projection (latitude and longitude only in the current version of the standard).
|
void |
setRange(double range,
int rangeMM)
Set the range.
|
public static final double EARTH_RADIUS
public static final double NM_TO_METERS
public static final double FT_TO_METERS
public static final double EARTHSCALE
public void setPRP(double refPRPX, double refPRPY)
refPRPX
- PRP X coordinate for the projection (latitude in the current version of the standard)refPRPY
- PRP Y coordinate for the projection (longitude in the current version of the standard)public void setPRP(double refPRPX, double refPRPY, short unit)
refPRPX
- PRP X coordinate for the projection (latitude in the current version of the standard)refPRPY
- PRP Y coordinate for the projection (longitude in the current version of the standard)unit
- the angle unitpublic final void setOrientation(double orientation)
orientation
- the North orientationpublic final void setOrientation(double orientation, short unit)
orientation
- the North orientationunit
- the angle unitpublic double getOrientation()
public void setRange(double range, int rangeMM)
range
- the range in nautical milesrangeMM
- the range in 100th MMpublic MapPosition getLatLongPosition(MapPosition refPoint, MapPosition relativePosition)
refPoint
- the reference position in (latitude, longitude)relativePosition
- the relative position in nautical miles (relative to the reference position)public MapPosition getLatLongPosition(MapPosition refPoint, double distanceMM, double bearing)
refPoint
- the reference position in (latitude, longitude)distanceMM
- the distance in 100th of mmbearing
- the bearingpublic MapPosition getLatLongPosition(MapPosition refPoint, double distanceMM, double bearing, short unit)
refPoint
- the reference position in (latitude, longitude)distanceMM
- the distance in 100th of mmbearing
- the bearingunit
- the bearing unitpublic MapPosition getLatLongPosition(double latDEG, double longDEG, float eastNM, float northNM)
latDEG
- the latitude of the reference point in degreeslongDEG
- the longitude of the reference point in degreeseastNM
- the east position in nautical miles of the relative pointnorthNM
- the north position in nautical miles of the relative pointpublic MapPosition getLatLongPositionFromMM(MapPosition refpoint, MapPosition mmPosition)
refpoint
- the reference point in latitude, longitudemmPosition
- the relative position in 100th of mmpublic MapPosition getLatLongPositionFromMM(MapPosition refpoint, MapPosition mmPosition, short unit)
refpoint
- the reference point in latitude, longitudemmPosition
- the relative position in 100th of mmunit
- the angles unitpublic MapPosition getLatLongPositionFromMM(MapPosition refpoint, double distanceMM, double bearing)
refpoint
- the referecne point in latitude, longitudedistanceMM
- the relative distance in 100th of mmbearing
- the relative bearingpublic MapPosition getLatLongPositionFromMM(MapPosition refpoint, double distanceMM, double bearing, short unit)
refpoint
- the reference point in latitude, longitudedistanceMM
- the relative distance in 100th of mmbearing
- the relative bearingunit
- the bearing unitpublic MapPosition getLatLongPositionFromMM(double latDEG, double longDEG, long xMM, long yMM)
latDEG
- the latitude of the reference point in degreeslongDEG
- the longitude of the reference point in degreesxMM
- x position in 100th of mmyMM
- y position in 100th of mmpublic MapPosition getVector(double latDEG1, double longDEG1, double latDEG2, double longDEG2)
latDEG1
- latitude in degrees of the first pointlongDEG1
- longitude in degrees of the first pointlatDEG2
- latitude in degrees of the second pointlongDEG2
- longitude in degrees of the second pointpublic MapPosition getVector(MapPosition point1, MapPosition point2)
point1
- the first pointpoint2
- the second pointpublic double getDistance(MapPosition vector)
vector
- the vectorpublic double getDistanceTo(double lat1, double lon1, double lat2, double lon2, short unit)
lat1
- latitude in degrees of the first pointlon1
- longitude in degrees of the first pointlat2
- latitude in degrees of the second pointlon2
- longitude in degrees of the second pointunit
- the angle unitspublic double getDistanceTo(MapPosition point1, MapPosition point2)
point1
- the first pointpoint2
- the second pointpublic double getDistanceTo(double radians)
public double getBearingFromLatLong(MapPosition point1, MapPosition point2)
point1
- the first pointpoint2
- the second pointpublic double getBearingFromLatLong(MapPosition point1, MapPosition point2, short unit)
point1
- the first pointpoint2
- the second pointunit
- the unitpublic double getBearingFromNorthEast(MapPosition point1, MapPosition point2)
point1
- the first pointpoint2
- the second pointpublic double getBearing(MapPosition point1, MapPosition point2)
point1
- the first pointpoint2
- the second pointpublic double getBearingFromNorthEast(MapPosition point1, MapPosition point2, short unit)
point1
- the first pointpoint2
- the second pointunit
- the bearing unitpublic double getBearing(MapPosition vector)
vector
- the vectorpublic double getBearing(MapPosition vector, short unit)
vector
- the vectorunit
- the bearing unitpublic MapPosition getEastNorthPosition(MapPosition latlongPosition)
latlongPosition
- the latitude and longitude position in degreespublic MapPosition getEastNorthPosition(MapPosition latlongPosition, short unit)
latlongPosition
- the latitude and longitude position in degreesunit
- the unit for the latitude and longitudepublic MapPosition getEastNorthPosition(double lat, double lon)
lat
- latitudelon
- longitudepublic MapPosition getEastNorthPosition(double lat, double lon, short unit)
lat
- latitudelon
- longitudeunit
- the unit for the latitude and longitudepublic MapPosition getLatLongPosition(MapPosition eastNorthPosition)
eastNorthPosition
- the (east, north) position in meterspublic MapPosition getLatLongPosition(double eastNM, double northNM)
eastNM
- east coordinate in NMnorthNM
- north coordinate in NMpublic MapPosition getLatLongPosition(double eastNM, double northNM, short unit)
eastNM
- east coordinate in NMnorthNM
- north coordinate in NMunit
- the angle unitpublic MapPosition getLatLongPositionFromMM(long xMM, long yMM)
xMM
- x position in 100th of mmyMM
- y position in 100th of mmCopyright ©2017-2024 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence