|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamUtils.LatLong
public class LatLong
Class for handling and formatting latitude and longitude data. Only contains two variables, which are assumed to be in decimal degrees. Also contains a number of other static variables for formatting other lat long data.
| Field Summary | |
|---|---|
static int |
FORMAT_DECIMALMINUTES
|
static int |
FORMAT_MINUTESSECONDS
|
private static int |
formatStyle
|
protected double |
latitude
latitude in decimal degrees (North is positive; -90 <= latitude <= +90) |
protected double |
longitude
longitude in decimal degrees (East is positive; -180 < longitude <= +180) |
static double |
MetersPerMile
|
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
LatLong()
|
|
LatLong(double latitude,
double longitude)
|
|
| Method Summary | |
|---|---|
LatLong |
addDistanceMeters(double addX,
double addY)
|
double |
bearingTo(LatLong destination)
|
LatLong |
clone()
|
double |
distanceToMetres(LatLong destination)
Calculate the distance from this positions to some other position in metres. |
double |
distanceToMetresX(LatLong destination)
|
double |
distanceToMetresY(LatLong destination)
|
double |
distanceToMiles(LatLong destination)
Calculate the distance from this positions to some other position in miles. |
static java.lang.String |
doubleDegrees2StringDegs(double latlong)
|
static java.lang.String |
doubleDegrees2StringMins(double latlong)
|
boolean |
equals(LatLong ll)
|
java.lang.String |
formatLatitude()
formats the latitude string |
static java.lang.String |
formatLatitude(double latlong)
convert a double decimal degrees into a formatted latlong string |
private static java.lang.String |
formatLatLong(double latlong)
|
private static java.lang.String |
formatLatLong(double latLong,
int style)
|
private static java.lang.String |
formatLatLongDDM(double latlong)
|
private static java.lang.String |
formatLatLongDMS(double latLong)
|
java.lang.String |
formatLongitude()
formats the longitude as a string |
static java.lang.String |
formatLongitude(double latlong)
convert a double decimal degrees into a formatted latlong string |
double |
getCrossTrackError(LatLong latLong1,
LatLong latLong2)
Clculate the perpendicular distance from this LatLong to a line joining latLong1 and latLong2 |
static double |
getDecimalMinutes(double latLong)
|
static int |
getFormatStyle()
|
static int |
getIntegerMinutes(double latLong)
|
double |
getLatitude()
|
private double |
getLongDistanceCorr(double latitude)
|
private double |
getLongDistanceCorr(double latitude1,
double latitude2)
|
double |
getLongitude()
|
static double |
getSeconds(double latLong)
|
static int |
getSignedDegrees(double latLong)
|
(package private) double |
metersToDegreeLatitude(double meters)
|
(package private) double |
metersToDegreeLongitude(double meters,
double latitudeDegrees)
|
static void |
setFormatStyle(int formatStyle)
|
void |
setLatitude(double latitude)
|
void |
setLongitude(double longitude)
|
LatLong |
travelDistanceMeters(double trueHeading,
double distance)
|
LatLong |
TravelDistanceMiles(double trueHeading,
double distance)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final transient double MetersPerMile
protected double latitude
protected double longitude
public static final int FORMAT_DECIMALMINUTES
public static final int FORMAT_MINUTESSECONDS
private static int formatStyle
| Constructor Detail |
|---|
public LatLong(double latitude,
double longitude)
public LatLong()
| Method Detail |
|---|
public static int getFormatStyle()
public static void setFormatStyle(int formatStyle)
formatStyle - The formatStyle to set.public LatLong clone()
clone in class java.lang.Objectpublic double getLatitude()
public void setLatitude(double latitude)
latitude - The latitude to set.public double getLongitude()
public void setLongitude(double longitude)
longitude - The longitude to set.public java.lang.String formatLatitude()
public static java.lang.String formatLatitude(double latlong)
latlong -
public java.lang.String formatLongitude()
public static java.lang.String formatLongitude(double latlong)
latlong -
private static java.lang.String formatLatLong(double latLong,
int style)
private static java.lang.String formatLatLongDMS(double latLong)
private static java.lang.String formatLatLongDDM(double latlong)
private static java.lang.String formatLatLong(double latlong)
public static java.lang.String doubleDegrees2StringDegs(double latlong)
public static java.lang.String doubleDegrees2StringMins(double latlong)
public static int getSignedDegrees(double latLong)
public static double getDecimalMinutes(double latLong)
public static int getIntegerMinutes(double latLong)
public static double getSeconds(double latLong)
public LatLong travelDistanceMeters(double trueHeading,
double distance)
trueHeading - Heading relative to True Northdistance - Distance to travel in meters.
public LatLong TravelDistanceMiles(double trueHeading,
double distance)
trueHeading - Heading relative to True Northdistance - Distance to travel in nautical miles.
double metersToDegreeLatitude(double meters)
double metersToDegreeLongitude(double meters,
double latitudeDegrees)
public LatLong addDistanceMeters(double addX,
double addY)
public double distanceToMiles(LatLong destination)
destination - destiantion position
public double distanceToMetres(LatLong destination)
destination - destiantion position
public double distanceToMetresX(LatLong destination)
public double distanceToMetresY(LatLong destination)
public boolean equals(LatLong ll)
public double bearingTo(LatLong destination)
private double getLongDistanceCorr(double latitude)
private double getLongDistanceCorr(double latitude1,
double latitude2)
public double getCrossTrackError(LatLong latLong1,
LatLong latLong2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||