CARMA C++
|
Source checker returns info on the location in the sky of a source at a given time, e.g. More...
#include <carma/services/SourceChecker.h>
Public Member Functions | |
bool | canBeTrackedOnNegativeWrap () |
If the source azimuth can be represented by a value between negative wrap limit and zero, then it can be tracked on the negative wrap. More... | |
services::AzWrapType | computeOptimumWrapValue (services::AntennaType antType, double antAzDegrees, double timeToTrack) |
services::Neighbor | createNeighbor (const Source &neighborSource, const coordSysType coordSys, Ephemeris &localEphemeris) |
Make a Neighbor object using the current object in this SourceChecker instance as the reference and the input object to the method. More... | |
carma::services::Angle | getAzimuth () |
Angle | getAzNegativeWrapLimit () const |
Angle | getAzPositiveWrapLimit () const |
carma::services::Angle | getElevation () |
Angle | getElevLimit () const |
Get the current elevation limit for source rise and set times. More... | |
Angle | getElevUpperLimit () const |
double | getMJD () |
DEBUG. More... | |
services::NeighborSet | getNearest (const ::std::set< ::std::string > &sourceList, bool include, unsigned short numReturn, bool ignoreNorthSouth, coordSysType coordSys, sourcePntType pType, float fluxLimit) |
Must be called after setSource, set elev limits, setFrequency, and setMJD. More... | |
TelescopeStatus | getTelescopeStatus () |
std::string | info () |
bool | isUp () |
std::string | localTime () |
double | lst () |
double | minutesSinceRise () |
double | minutesSinceSet () |
double | minutesUntilAzLimit () |
double | minutesUntilAzWrapLimit () |
double | minutesUntilBlind () |
double | minutesUntilRise () |
double | minutesUntilSet () |
double | minutesUntilTransit () |
double | riseTime () |
void | setAzNegativeWrapLimit (const Angle &azimuth) |
Set the azimuth limit on the negative wrap. More... | |
void | setAzPositiveWrapLimit (const Angle &azimuth) |
Set the azimuth limit on the positive wrap. More... | |
void | setElevLimit (double elevDegrees) |
Set the elevation lower limit for source rise and set times. More... | |
void | setElevLimit (const Angle &elevation) |
Set the elevation lower limit for source rise and set times. More... | |
void | setElevUpperLimit (double elevDegrees) |
Set the upper elevation limit for azimuth wrap calculation If the limit is less than zero, it will be set to zero. More... | |
void | setElevUpperLimit (const Angle &elevation) |
Set the elevation limit for azimuth wrap calculation If the limit is less than zero, it will be set to zero. More... | |
void | setFrequency (double frequency) |
Set the frequency for the observation. More... | |
void | setLocation (const Location &location) |
Set the location for source checking. More... | |
void | setMJD (double mjd=carma::util::Time::MJD()) |
Set the MJD for subsequent queries. More... | |
void | setSource (const Source &source) |
Set the source to check. More... | |
void | setSource (const std::string &source, const std::string &catalog="") |
Set the source from a catalog. More... | |
double | setTime () |
void | showHeader (bool showit) |
Call to toggle whether or not the info() command prints out the column headers. More... | |
bool | slewWouldCrossNorthSouthBoundary (const Source &neighborSource) |
SourceChecker () | |
Default Constructor. More... | |
void | useJ2000 (bool j2000) |
Use J2000 in when printing RA/DEC coordinates. More... | |
void | useSexagesimal (bool sexa) |
Use sexagesimal in when printing angular data. More... | |
std::string | ut () |
virtual | ~SourceChecker () |
Destructor. More... | |
Source checker returns info on the location in the sky of a source at a given time, e.g.
rise and set times. Note all calculations are with respect to the date set in SourceChecker::setMJD(double)!
Definition at line 37 of file SourceChecker.h.
carma::services::SourceChecker::SourceChecker | ( | ) |
Default Constructor.
|
virtual |
Destructor.
bool carma::services::SourceChecker::canBeTrackedOnNegativeWrap | ( | ) |
If the source azimuth can be represented by a value between negative wrap limit and zero, then it can be tracked on the negative wrap.
services::AzWrapType carma::services::SourceChecker::computeOptimumWrapValue | ( | services::AntennaType | antType, |
double | antAzDegrees, | ||
double | timeToTrack | ||
) |
antType | - antenna type, OVRO or BIMA (they have different azimuth and elevation wrap limits) |
antAzDegrees | - antenna current azimuth, degrees |
timeToTrack | - required minimum time to track without a wrap chage. |
services::Neighbor carma::services::SourceChecker::createNeighbor | ( | const Source & | neighborSource, |
const coordSysType | coordSys, | ||
Ephemeris & | localEphemeris | ||
) |
Make a Neighbor object using the current object in this SourceChecker instance as the reference and the input object to the method.
neighborSource | The neighboring object |
coordSys | This parameter tells the method how to do the distance computation. COORDSYS_RADEC - spherical trigonometric distance, COORDSYS_AZEL - slew-based distance, e.g. if the spherical trig distance went 'over the top' in elevation, the slewing distance would actually be longer since the antennas can't go over the top. |
localEphemeris | An ephemeris created solely for Neighbor creation. This is to speed up creation of many Neighbors in loops. Do NOT use SourceChecker's internal Ephemeris ephem_ here!! |
carma::services::Angle carma::services::SourceChecker::getAzimuth | ( | ) |
Angle carma::services::SourceChecker::getAzNegativeWrapLimit | ( | ) | const |
Angle carma::services::SourceChecker::getAzPositiveWrapLimit | ( | ) | const |
carma::services::Angle carma::services::SourceChecker::getElevation | ( | ) |
Angle carma::services::SourceChecker::getElevLimit | ( | ) | const |
Get the current elevation limit for source rise and set times.
Angle carma::services::SourceChecker::getElevUpperLimit | ( | ) | const |
double carma::services::SourceChecker::getMJD | ( | ) |
DEBUG.
services::NeighborSet carma::services::SourceChecker::getNearest | ( | const ::std::set< ::std::string > & | sourceList, |
bool | include, | ||
unsigned short | numReturn, | ||
bool | ignoreNorthSouth, | ||
coordSysType | coordSys, | ||
sourcePntType | pType, | ||
float | fluxLimit | ||
) |
Must be called after setSource, set elev limits, setFrequency, and setMJD.
sourceList | - must be all UPPER case |
util::IllegalStateException | if setSource not called first. |
TelescopeStatus carma::services::SourceChecker::getTelescopeStatus | ( | ) |
std::string carma::services::SourceChecker::info | ( | ) |
bool carma::services::SourceChecker::isUp | ( | ) |
std::string carma::services::SourceChecker::localTime | ( | ) |
double carma::services::SourceChecker::lst | ( | ) |
double carma::services::SourceChecker::minutesSinceRise | ( | ) |
double carma::services::SourceChecker::minutesSinceSet | ( | ) |
double carma::services::SourceChecker::minutesUntilAzLimit | ( | ) |
NOTE: For BIMA antennas, using only this method for determining if a source can be tracked for a given period of time is insufficient because those antennas can wrap past az=360. For such a limit, this method essentially treats the limit as (limit-360) because trigonometric functions can't tell the difference. Specifically, tan(theta) == tan(theta+PI). So for antennas with azPositiveWrapLimit > 360, the test must be ( minutesUntilAzLimit() < timeLimit && posLimit - currentAz < 180 . )
double carma::services::SourceChecker::minutesUntilAzWrapLimit | ( | ) |
double carma::services::SourceChecker::minutesUntilBlind | ( | ) |
If (getTelescopeStatus().isInZenithBlindSpot() == false ) then the return value is the time until enter. If (getTelescopeStatus().isInZenithBlindSpot() == true) then the return value is the time until exit,
Calling this method only makes sense if ( getTelescopeStatus().canEnterZenithBlindSpot() == true ). if that value is false, this method returns zero.
double carma::services::SourceChecker::minutesUntilRise | ( | ) |
double carma::services::SourceChecker::minutesUntilSet | ( | ) |
double carma::services::SourceChecker::minutesUntilTransit | ( | ) |
double carma::services::SourceChecker::riseTime | ( | ) |
void carma::services::SourceChecker::setAzNegativeWrapLimit | ( | const Angle & | azimuth | ) |
Set the azimuth limit on the negative wrap.
void carma::services::SourceChecker::setAzPositiveWrapLimit | ( | const Angle & | azimuth | ) |
Set the azimuth limit on the positive wrap.
void carma::services::SourceChecker::setElevLimit | ( | double | elevDegrees | ) |
Set the elevation lower limit for source rise and set times.
If the limit is less than zero, it will be set to zero. If the limit is greater than 180, it will be set to (180 - elevDegrees).
elevDegrees | The elevation limit in degrees. |
void carma::services::SourceChecker::setElevLimit | ( | const Angle & | elevation | ) |
Set the elevation lower limit for source rise and set times.
If the limit is less than zero, it will be set to zero. If the limit is greater than 180, it will be set to (180 - elevDegrees).
elevation | The elevation limit as an Angle |
void carma::services::SourceChecker::setElevUpperLimit | ( | double | elevDegrees | ) |
Set the upper elevation limit for azimuth wrap calculation If the limit is less than zero, it will be set to zero.
elevDegrees | The elevation limit in degrees. |
void carma::services::SourceChecker::setElevUpperLimit | ( | const Angle & | elevation | ) |
Set the elevation limit for azimuth wrap calculation If the limit is less than zero, it will be set to zero.
elevation | The elevation limit as an Angle |
void carma::services::SourceChecker::setFrequency | ( | double | frequency | ) |
Set the frequency for the observation.
This is used to calculate the refraction correction. The default frequency is 100 GHz, which is good enough for most uses. You only need call this method if you want to use optical refraction.
frequency | The frequency in Hertz |
void carma::services::SourceChecker::setLocation | ( | const Location & | location | ) |
Set the location for source checking.
Location | object indicating latitude, longitude and altitude for source checking computation. The default location if this method is never called is CARMA's reference position. |
void carma::services::SourceChecker::setMJD | ( | double | mjd = carma::util::Time::MJD() | ) |
Set the MJD for subsequent queries.
If this method has not been called queries will default to the current time.
mjd | The time of interest, expressed as Modified Julian Day |
void carma::services::SourceChecker::setSource | ( | const Source & | source | ) |
Set the source to check.
source | Source object to represent |
void carma::services::SourceChecker::setSource | ( | const std::string & | source, |
const std::string & | catalog = "" |
||
) |
Set the source from a catalog.
sourceName | source name |
catalogName | catalog name, defaults to CARMA/conf/catalogs/SystemSource.cat |
double carma::services::SourceChecker::setTime | ( | ) |
void carma::services::SourceChecker::showHeader | ( | bool | showit | ) |
bool carma::services::SourceChecker::slewWouldCrossNorthSouthBoundary | ( | const Source & | neighborSource | ) |
void carma::services::SourceChecker::useJ2000 | ( | bool | j2000 | ) |
Use J2000 in when printing RA/DEC coordinates.
j2000 | True to use sexagesimal, false for decimal. |
Definition at line 131 of file SourceChecker.h.
void carma::services::SourceChecker::useSexagesimal | ( | bool | sexa | ) |
Use sexagesimal in when printing angular data.
sex | True to use sexagesimal, false for decimal. |
Definition at line 122 of file SourceChecker.h.
std::string carma::services::SourceChecker::ut | ( | ) |