org.jscience.astronomy.solarsystem.coordinates
Class AstronomicalPosition

java.lang.Object
  extended by org.jscience.astronomy.solarsystem.coordinates.AstronomicalPosition

public class AstronomicalPosition
extends java.lang.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.


Constructor Summary
AstronomicalPosition(double l, double b)
          Define a position object in the standard (J2000) frame
AstronomicalPosition(double l, double b, java.lang.String frame)
          Define a position object used a specified frame
 
Method Summary
 java.lang.String formatted(java.lang.String coords, int precision, boolean sexagesimal)
           
 double[] getCoordinates()
          Get the coordinates in the standard (J2000) frame.
 double[] getCoordinates(java.lang.String frame)
          Get the coordinates in a specified frame.
static void main(java.lang.String[] args)
          Test the Position class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AstronomicalPosition

public AstronomicalPosition(double l,
                            double b)
                     throws TransformationException
Define a position object in the standard (J2000) frame

Throws:
TransformationException

AstronomicalPosition

public AstronomicalPosition(double l,
                            double b,
                            java.lang.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(java.lang.String frame)
                        throws TransformationException
Get the coordinates in a specified frame. Used to be called getPosition.

Throws:
TransformationException

formatted

public java.lang.String formatted(java.lang.String coords,
                                  int precision,
                                  boolean sexagesimal)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test the Position class

Throws:
java.lang.Exception