|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.astronomy.CompositeConverter
public class CompositeConverter
A coordinate converter that delegates its work to other converters.
Version Info:
$Revision: 1147 $ |
$Date: 2008-03-06 08:50:11 -0700 (Thu, 06 Mar 2008) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
CompositeConverter()
Creates a new composite converter with no component converters. |
Method Summary | |
---|---|
SkyPosition |
createFrom(SkyPosition position,
CelestialCoordinateSystem toSystem,
Epoch toEpoch,
EarthPosition observer,
LocalSiderealTime lst)
Returns a new position that is equivalent to position ,
but in the given coordinate system and epoch. |
SkyPosition |
executeChain(edu.nrao.sss.astronomy.CompositeConverter.CcsEpochChain chain,
SkyPosition position,
EarthPosition observer,
LocalSiderealTime lst)
Executes all the conversions in the chain. |
static CompositeConverter |
getDefaultConverter()
Creates a new converter that is preequipped with component converters. |
void |
setConverter(CelestialCoordinateConverter converter,
CelestialCoordinateSystem fromSystem,
Epoch fromEpoch,
CelestialCoordinateSystem toSystem,
Epoch toEpoch)
Sets the converter to use for the given conversion. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeConverter()
getDefaultConverter()
Method Detail |
---|
public static CompositeConverter getDefaultConverter()
From | To |
---|---|
ECLIPTIC | EQUATORIAL (J2000) |
ECLIPTIC | GALACTIC |
EQUATORIAL (B1950) | EQUATORIAL (J2000) |
EQUATORIAL (J2000) | ECLIPTIC |
EQUATORIAL (J2000) | EQUATORIAL (B1950) |
EQUATORIAL (J2000) | GALACTIC |
EQUATORIAL (J2000) | HORIZONTAL |
GALACTIC | ECLIPTIC |
GALACTIC | EQUATORIAL (J2000) |
public SkyPosition createFrom(SkyPosition position, CelestialCoordinateSystem toSystem, Epoch toEpoch, EarthPosition observer, LocalSiderealTime lst) throws CoordinateConversionException
CelestialCoordinateConverter
position
,
but in the given coordinate system and epoch.
createFrom
in interface CelestialCoordinateConverter
position
- the position to be converted.toSystem
- the coordinate system for the returned position.toEpoch
- the epoch for the returned position. Unless the toSystem is
EQUATORIAL, this value will probably not be used.observer
- the location of the the observer. Unless one of the coordinate systems
is HORIZONTAL, this value will probably not be used.lst
- the local sidereal time at the observer's location.
This value is important when one of the coordinate systems is
HORIZONTAL. However, it can be used for all
systems in order to get the coordinates of position
at a particular point in time. If this value is null
and neither of the coordinate systems is HORIZONTAL,
the coordinates of position will be determined as
of the time on the system clock.
position
,
but is expressed in a coordinate system of toSystem
for epoch toEpoch
.
CoordinateConversionException
- if anything goes wrong during conversion.public SkyPosition executeChain(edu.nrao.sss.astronomy.CompositeConverter.CcsEpochChain chain, SkyPosition position, EarthPosition observer, LocalSiderealTime lst) throws CoordinateConversionException
CoordinateConversionException
public void setConverter(CelestialCoordinateConverter converter, CelestialCoordinateSystem fromSystem, Epoch fromEpoch, CelestialCoordinateSystem toSystem, Epoch toEpoch)
converter
- the converter to use for the given from/to system.fromSystem
- the celestial coordinate system that the given converter
can take as input.fromEpoch
- the epoch that the given converter can take as input.
This is usually important only for the Equatorial coordinate system.toSystem
- the celestial coordinate system that the given converter
can produce as output.toEpoch
- the epoch that the given converter can produce as output.
This is usually important only for the Equatorial coordinate system.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |