Class Coordinate
- java.lang.Object
-
- zext.plantuml.com.ctreber.acearth.util.Coordinate
-
public class Coordinate extends java.lang.ObjectLatitude and longitude coordinate. Can be used as declination and right ascension as well.
© 2002 Christian Treber, ct@ctreber.com
-
-
Constructor Summary
Constructors Constructor Description Coordinate()Coordinate(double pLat, double pLong)Construct a location specfied by two angles.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Coordinate lOther)Add position to this position, make sure coordinates are valid.booleancheck()CoordinateeclipticToEquatorial()Convert from ecliptic to equatorial coordinates (after duffett-smith, section 27)doublegetDE()doublegetLat()doublegetLong()Point3DgetPoint3D()Point3DgetPoint3DRads()Assumes coordinate is not in degrees but rads.doublegetRA()voidrenderAsXML(java.io.Writer writer)java.lang.StringtoString()voidwrap()Warp coordinates exceeding valid values.
-
-
-
Method Detail
-
renderAsXML
public void renderAsXML(java.io.Writer writer) throws java.io.IOException- Throws:
java.io.IOException
-
getPoint3D
public Point3D getPoint3D()
-
getPoint3DRads
public Point3D getPoint3DRads()
Assumes coordinate is not in degrees but rads.
- Returns:
-
eclipticToEquatorial
public Coordinate eclipticToEquatorial()
Convert from ecliptic to equatorial coordinates (after duffett-smith, section 27)
-
add
public void add(Coordinate lOther)
Add position to this position, make sure coordinates are valid.
-
wrap
public void wrap()
Warp coordinates exceeding valid values. Happens when latitudes and longitudes are added or substracted.
-
getLat
public double getLat()
-
getDE
public double getDE()
-
getLong
public double getLong()
-
getRA
public double getRA()
-
check
public boolean check()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-