edu.nrao.sss.astronomy
Class DopplerTracker

java.lang.Object
  extended by edu.nrao.sss.astronomy.DopplerTracker

public class DopplerTracker
extends Object

A calculator of frequency shifts due to the motion of a point on earth relative to a celestial source.

Version Info:

$Revision: 1994 $
$Date: 2009-02-23 09:03:44 -0700 (Mon, 23 Feb 2009) $
$Author: dharland $ (last person to modify)

Since:
2008-09-09
Author:
David M. Harland

Constructor Summary
DopplerTracker()
          Creates a new Doppler tracker where the observer, sky position, and velocity are all non-null default values.
DopplerTracker(EarthPosition observer)
          Creates a new Doppler tracker for the given earth-bound observer.
DopplerTracker(EarthPosition observer, SkyPosition skyPosition)
          Creates a new Doppler tracker for the given observer and celestial sky position.
DopplerTracker(EarthPosition observer, SkyPosition skyPosition, LinearVelocity sourceVelocity, VelocityFrame sourceFrame, VelocityConvention velocityConvention)
          Creates a new Doppler tracker with the given parameters.
 
Method Summary
 LinearVelocity calculateRelativeVelocity(Date dateTime)
          Calculates and returns the relative velocity between the earth-bound observer and celestial source held by this tracker.
 Frequency calculateShiftedFrequency(Frequency restFreq, Date dateTime)
          Returns a shifted frequency based on restFreq and the relative velocity of the observer to the emitter at dateTime.
 EarthPosition getObserver()
          Returns the position on earth whose velocity will be measured relative to a celestial source.
 SkyPosition getSkyPosition()
          Returns the point on the celestial sphere against which the observer's velocity will be measured.
 LinearVelocity getSourceVelocity()
          Returns the velocity of the celestial source, relative to the rest frame held by this object.
 VelocityConvention getVelocityConvention()
          Returns the velocity convention used when shifting frequencies.
 VelocityFrame getVelocityFrame()
          Returns the rest frame against which velocity values will be calculated.
 void setObserver(EarthPosition newObserver)
          Sets the position on earth whose velocity will be measured relative to a celestial source.
 void setSkyPosition(SkyPosition newPosition)
          Sets the point on the celestial sphere against which the observer's velocity will be measured.
 void setSource(SkyPosition newPosition, LinearVelocity newVelocity, VelocityFrame newFrame, VelocityConvention newConvention)
          A convenience method for setting the position and velocity of a celestial source.
 void setSourceVelocity(LinearVelocity newVelocity)
          Sets the velocity of the celestial source, relative to the rest frame held by this object.
 void setSourceVelocity(LinearVelocity newVelocity, VelocityFrame newFrame, VelocityConvention newConvention)
          A convenience method for setting the source velocity and frame.
 void setVelocityConvention(VelocityConvention newConvention)
          Sets the velocity convention to use when shifting frequencies.
 void setVelocityFrame(VelocityFrame newFrame)
          Sets the rest frame against which velocity values will be calculated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DopplerTracker

public DopplerTracker(EarthPosition observer,
                      SkyPosition skyPosition,
                      LinearVelocity sourceVelocity,
                      VelocityFrame sourceFrame,
                      VelocityConvention velocityConvention)
Creates a new Doppler tracker with the given parameters.

Parameters:
observer - a point on earth whose velocity relative to a celestial source will be used for calculating Doppler frequency shifts. See setObserver(EarthPosition) for handling of a null parameter value.
skyPosition - a point on the celestial sphere where a signal emitting source sits. See setSkyPosition(SkyPosition) for handling of a null parameter value.
sourceVelocity - the velocity of the source at skyPosition as measured against the rest frame given by sourceFrame. See setSourceVelocity(LinearVelocity) for handling of a null parameter value.
sourceFrame - the rest frame against which the sourceVelocity is measured. See setVelocityFrame(VelocityFrame) for handling of a null parameter value.
velocityConvention - the velocity convention used for calculating shifted frequencies. See setVelocityConvention(VelocityConvention) for handling of a null parameter value.

DopplerTracker

public DopplerTracker()
Creates a new Doppler tracker where the observer, sky position, and velocity are all non-null default values.


DopplerTracker

public DopplerTracker(EarthPosition observer)
Creates a new Doppler tracker for the given earth-bound observer. The sky position will be a non-null default value, and the velocity of the source will be zero.

Parameters:
observer - a point on earth whose velocity relative to a celestial source will be used for calculating Doppler frequency shifts. See setObserver(EarthPosition) for handling of a null parameter value.

DopplerTracker

public DopplerTracker(EarthPosition observer,
                      SkyPosition skyPosition)
Creates a new Doppler tracker for the given observer and celestial sky position. The velocity of the source at that position will be zero.

Parameters:
observer - a point on earth whose velocity relative to a celestial source will be used for calculating Doppler frequency shifts. See setObserver(EarthPosition) for handling of a null parameter value.
skyPosition - a point on the celestial sphere where a signal emitting source sits. See setSkyPosition(SkyPosition) for handling of a null parameter value.
Method Detail

setObserver

public final void setObserver(EarthPosition newObserver)
Sets the position on earth whose velocity will be measured relative to a celestial source.

Parameters:
newObserver - a new point on earth. If this value is null it will be replaced by a newly created EarthPosition object.

setSkyPosition

public final void setSkyPosition(SkyPosition newPosition)
Sets the point on the celestial sphere against which the observer's velocity will be measured.

Parameters:
newPosition - a new point on the celestial sphere. If this value is null it will be replaced by a newly created SimpleSkyPosition object.

setVelocityFrame

public final void setVelocityFrame(VelocityFrame newFrame)
Sets the rest frame against which velocity values will be calculated.

Parameters:
newFrame - a new rest frame. If this value is null it will be replaced by VelocityFrame.TOPOCENTRIC.

setVelocityConvention

public final void setVelocityConvention(VelocityConvention newConvention)
Sets the velocity convention to use when shifting frequencies.

Parameters:
newConvention - a new velocity convention. This value is permitted to be null. To see how this affects calculations see SpectralLine.getShiftedFrequency(LinearVelocity, VelocityConvention).

setSourceVelocity

public final void setSourceVelocity(LinearVelocity newVelocity)
Sets the velocity of the celestial source, relative to the rest frame held by this object.

Parameters:
newVelocity - a new velocity for a celestial source. If this value is null it will be replaced by a newly created LinearVelocity object.

setSourceVelocity

public void setSourceVelocity(LinearVelocity newVelocity,
                              VelocityFrame newFrame,
                              VelocityConvention newConvention)
A convenience method for setting the source velocity and frame.

Parameters:
newVelocity - see setSourceVelocity(LinearVelocity).
newFrame - see setVelocityFrame(VelocityFrame).
newConvention - see setVelocityConvention(VelocityConvention).

setSource

public void setSource(SkyPosition newPosition,
                      LinearVelocity newVelocity,
                      VelocityFrame newFrame,
                      VelocityConvention newConvention)
A convenience method for setting the position and velocity of a celestial source.

Parameters:
newPosition - see setSkyPosition(SkyPosition).
newVelocity - see setSourceVelocity(LinearVelocity).
newFrame - see setVelocityFrame(VelocityFrame).
newConvention - see setVelocityConvention(VelocityConvention).

getObserver

public EarthPosition getObserver()
Returns the position on earth whose velocity will be measured relative to a celestial source. This is either the position provided by a client object or a default position if none was provided.

Returns:
the earth position used in the Doppler calculations.

getSkyPosition

public SkyPosition getSkyPosition()
Returns the point on the celestial sphere against which the observer's velocity will be measured. This is either the position provided by a client object or a default position if none was provided.

Returns:
the sky position used in the Doppler calculations.

getVelocityFrame

public VelocityFrame getVelocityFrame()
Returns the rest frame against which velocity values will be calculated. This is either the frame provided by a client object or a default frame if none was provided.

Returns:
the frame of rest used in the Doppler calculations.

getVelocityConvention

public VelocityConvention getVelocityConvention()
Returns the velocity convention used when shifting frequencies. This is either the convention provided by a client object or is based on the units of the velocity if none was provided.

Returns:
the velocity convention used in the Doppler calculations.

getSourceVelocity

public LinearVelocity getSourceVelocity()
Returns the velocity of the celestial source, relative to the rest frame held by this object. This is either the velocity provided by a client object or a default velocity if none was provided.

Returns:
the source velocity used in the Doppler calculations.
See Also:
calculateRelativeVelocity(Date)

calculateRelativeVelocity

public LinearVelocity calculateRelativeVelocity(Date dateTime)
                                         throws CoordinateConversionException
Calculates and returns the relative velocity between the earth-bound observer and celestial source held by this tracker. A positive velocity means the observer and signal source are moving away from each other.

Parameters:
dateTime - the point in time for which the calculation is performed.
Returns:
the relative velocity between observer and signal source.
Throws:
CoordinateConversionException

calculateShiftedFrequency

public Frequency calculateShiftedFrequency(Frequency restFreq,
                                           Date dateTime)
                                    throws CoordinateConversionException
Returns a shifted frequency based on restFreq and the relative velocity of the observer to the emitter at dateTime.

Parameters:
restFreq - a frequency as emitted by a source for which a shifted received frequency is desired.
dateTime - the point in time for which the relative velocity calculation is performed.
Returns:
a Doppler shifted frequency.
Throws:
CoordinateConversionException


Copyright © 2009. All Rights Reserved.