|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object courselog.gpsutils.GeoPoint
public class GeoPoint
Base class for a location point on Earth.
Field Summary | |
---|---|
double |
altSeaLevel
Altitude of the location to the Mean Sea Level (m). |
static double |
dummyAng
Dummy angle for initialisation. |
static double |
dummyCoord
Dummy value to put coordinates to recognise that it was not initialise |
static double |
ER
Earth radius in meters. |
double |
lat
Latitude in degrees (positive North). |
double |
lon
Longitude in degrees (Positive East). |
double |
myX
X coordinate of this point (m). |
double |
myY
Y coordinate of this point (m). |
double |
myZ
Z coordinate of this point (m). |
double |
uTMEasting
UTM projection easting distance (m). |
char |
uTMLatZone
UTM projection latitude zone (char). |
int |
uTMLonZone
UTM projection longitude index. |
double |
uTMNorthing
UTM projection Northing distance (m). |
Constructor Summary | |
---|---|
GeoPoint()
Creates a new empty instance of GeoPoint. |
Method Summary | |
---|---|
void |
computeCartesian()
Compute X,Y,Z coordinates of this point from long and lat. |
void |
computeLatLonAlt()
Compute lat,long, alt coordinates of this point from its X,Y,Z. |
void |
computeLatLonToUTMRef()
Convert this GeoPoint latitude and longitude values to a UTM reference. |
void |
computeUTMtoLatLng()
Convert UTM reference (if initialised) to latitude and longitude. |
void |
coordinatesIn(GeoPoint orig,
GeoDirection dNorth,
GeoDirection dEast,
double[] dest)
Compute point coordinates in a given vector. |
void |
copyFrom(java.lang.Object param)
Copy all elements of point param into this instance. |
java.lang.String |
ddmmssLat()
Converts the latitude of this point into a String. |
java.lang.String |
ddmmssLon()
Converts the longitude of this point into a String. |
GeoDirection |
directionTo(GeoPoint pTo,
GeoDirection dest)
Compute direction vector between 2 points. |
double |
distance(GeoPoint pointTo)
Calculate the surface distance in metres from this GeoPoint to the given GeoPoint. |
java.lang.String |
formatAlt()
Formats the altitude of this point. |
int |
formatInBuffer(byte[] buff)
Formats this track point in a buffer so that it can be written to the log. |
java.lang.Object |
getCopy()
Copy all elements of this point in a new instance. |
double |
getLat()
|
double |
getLon()
|
static char |
getUTMLatitudeZoneLetter(double latitude)
Work out the UTM latitude zone from the latitude. |
double |
headingTo(GeoPoint pt)
Compute heading to another point pt in degrees. |
void |
initialise()
Put default (unusable values in this object so that it will be ready for reuse. |
GeoPoint |
moveBy(boolean setAlt0,
GeoDirection d1,
double c1,
GeoDirection d2,
double c2,
GeoPoint dest)
Compute point by translating a first one along 2 vectors. |
boolean |
readFromLogLine(java.lang.String logLine)
Fill in attributes of this point from a string generated by the PositionTracer log function. |
java.lang.String |
toLatLonString()
Get a Lat/Lon String representation of this GeoPoint object. |
java.lang.String |
toString()
Display lat,lon as a string. |
java.lang.String |
toUTMString()
Convert this point UTM reference to a String representation for printing out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double ER
public static double dummyCoord
public static double dummyAng
public double altSeaLevel
public double lat
public double lon
public double myX
computeCartesian()
public double myY
public double myZ
public double uTMEasting
computeUTMtoLatLng()
public double uTMNorthing
public char uTMLatZone
public int uTMLonZone
Constructor Detail |
---|
public GeoPoint()
Method Detail |
---|
public double getLat()
public double getLon()
public void initialise()
public java.lang.Object getCopy()
getCopy
in interface ewe.util.Copyable
Copyable.getCopy()
public void copyFrom(java.lang.Object param)
param
- Point to copy from.public double distance(GeoPoint pointTo)
pointTo
- Point towards the distance is computed.
public void computeUTMtoLatLng()
public static char getUTMLatitudeZoneLetter(double latitude)
latitude
- the latitude to find the UTM latitude zone for
public void computeLatLonToUTMRef()
public void computeLatLonAlt()
public void computeCartesian()
public double headingTo(GeoPoint pt)
pt
- Point for which the direction is computed.
public GeoPoint moveBy(boolean setAlt0, GeoDirection d1, double c1, GeoDirection d2, double c2, GeoPoint dest)
public void coordinatesIn(GeoPoint orig, GeoDirection dNorth, GeoDirection dEast, double[] dest)
public GeoDirection directionTo(GeoPoint pTo, GeoDirection dest)
pTo
- point TO.dest
- GeoDirection reference to put result in. If null
a new object is allocated.
public java.lang.String toUTMString()
public java.lang.String toLatLonString()
public java.lang.String ddmmssLat()
Converters.ddmmss(double,int)
public java.lang.String ddmmssLon()
Converters.ddmmss(double,int)
public java.lang.String formatAlt()
Converters.formatAltitude(double)
public java.lang.String toString()
toString
in class java.lang.Object
public int formatInBuffer(byte[] buff)
buff
- buffer to write in.
public boolean readFromLogLine(java.lang.String logLine)
logLine
- Input string to interpret.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |