Package skyview.geometry
Class Position
- java.lang.Object
-
- skyview.geometry.Position
-
public class Position extends Object
This class represents a position in the sky. This class is used to pass a position that may be represented in different frames in different parts of a program. However since it creates CoordinateSystem objects for each transformation it should not be used to do coordinate transformations for large arrays of positions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
formatted(String coords, int precision, boolean sexagesimal)
double[]
getCoordinates()
Get the coordinates in the standard (J2000) frame.double[]
getCoordinates(String frame)
Get the coordinates in a specified frame.static void
main(String[] args)
Test the Position class
-
-
-
Constructor Detail
-
Position
public Position(double l, double b) throws TransformationException
Define a position object in the standard (J2000) frame- Throws:
TransformationException
-
Position
public Position(double l, double b, String frame) throws TransformationException
Define a position object used a specified frame- Throws:
TransformationException
-
-
Method Detail
-
getCoordinates
public double[] getCoordinates() throws TransformationException
Get the coordinates in the standard (J2000) frame. Used to be called getPosition.- Throws:
TransformationException
-
getCoordinates
public double[] getCoordinates(String frame) throws TransformationException
Get the coordinates in a specified frame. Used to be called getPosition.- Throws:
TransformationException
-
-