VieSched++
VieVS VLBI Scheduling Software
VieVS::Station Class Reference

representation of a VLBI station More...

#include <Station.h>

Inheritance diagram for VieVS::Station:
Collaboration diagram for VieVS::Station:

Classes

struct  Event
 changes in parameters More...
 
class  Parameters
 station parameters More...
 
struct  Statistics
 statistics More...
 

Public Types

enum  AzelModel { AzelModel::simple, AzelModel::rigorous }
 azimuth elevation calculation model More...
 

Public Member Functions

 Station (std::string sta_name, std::string tlc, std::shared_ptr< AbstractAntenna > sta_antenna, std::shared_ptr< AbstractCableWrap > sta_cableWrap, std::shared_ptr< Position > sta_position, std::shared_ptr< Equipment > sta_equip, std::shared_ptr< AbstractHorizonMask > sta_mask, unsigned long nSources)
 constructor More...
 
const ParametersgetPARA () const
 getter for parameters More...
 
ParametersreferencePARA ()
 reference to current parameters More...
 
const AbstractCableWrapgetCableWrap () const noexcept
 getter for cable wrap More...
 
AbstractCableWrapreferenceCableWrap () noexcept
 reference to cable wrap More...
 
unsigned int getCurrentTime () const noexcept
 getter for last time this antenna was mentioned in scheduling More...
 
const EquipmentgetEquip () const noexcept
 getter for equipment information More...
 
bool hasHorizonMask () const
 check if station has horizon mask More...
 
const AbstractHorizonMaskgetMask () const
 getter for horizon mask More...
 
const AbstractAntennagetAntenna () const noexcept
 getter for antenna More...
 
std::shared_ptr< const PositiongetPosition () const noexcept
 getter for position More...
 
int getNObs () const noexcept
 getter for number of baselines which were already observed with this station More...
 
void increaseNObs () noexcept
 increase number of observations by one More...
 
int getNScans () const noexcept
 get number of scans More...
 
int getNTotalScans () const noexcept
 get number of total scans More...
 
const PointingVectorgetCurrentPointingVector () const noexcept
 getter for current pointing vector More...
 
double distance (const Station &other) const noexcept
 distance between two stations More...
 
bool isVisible (const PointingVector &p, double minElevationSource=0) const noexcept
 checks if a source is visible for this station More...
 
boost::optional< unsigned int > slewTime (const PointingVector &pointingVector) const noexcept
 calculate slew time between current pointing vector and this pointing vector More...
 
void calcAzEl_rigorous (const std::shared_ptr< const AbstractSource > &source, PointingVector &p) noexcept
 calculation of azimuth, elevation, hour angle and declination with rigorouse model More...
 
void calcAzEl_simple (std::shared_ptr< const AbstractSource > source, PointingVector &p) const noexcept
 calculation of azimuth, elevation, hour angle and declination with lookup tables More...
 
void setCurrentPointingVector (const PointingVector &pointingVector) noexcept
 change current pointing vector More...
 
void setEVENTS (std::vector< Event > &EVENTS) noexcept
 sets all upcoming events More...
 
ParametersrefParaForMultiScheduling ()
 reference parameters to add multi-scheduling setup More...
 
bool checkForTagalongMode (unsigned int time) const noexcept
 check for tagalong mode More...
 
bool checkForNewEvent (unsigned int time, bool &hardBreak) noexcept
 this function checks if it is time to change the parameters More...
 
unsigned int maximumAllowedObservingTime (Timestamp ts) const noexcept
 maxium allowed observing time More...
 
void applyNextEvent (std::ofstream &of) noexcept
 changes parameters to next setup More...
 
void setNextEvent (unsigned int idx) noexcept
 set next event index More...
 
void update (unsigned long nbl, const PointingVector &end, bool addToStatistics) noexcept
 update station if used for a scan More...
 
void clearObservations ()
 clear all observations More...
 
void setStatistics (const Statistics &stat)
 set station statistics More...
 
const StatisticsgetStatistics () const
 get station statistics More...
 
std::pair< std::vector< double >, std::vector< double > > getHorizonMask () const noexcept
 get horizon mask More...
 
void toVexStationBlock (std::ofstream &of) const
 writes station defining block in vex format More...
 
void toVexSiteBlock (std::ofstream &of) const
 writes site defining block in vex format More...
 
void toVexAntennaBlock (std::ofstream &of) const
 writes antenna defining block in vex format More...
 
const std::string & getElectronics_rack_type_ () const
 getter for electronics rack type_ More...
 
const std::string & getRecord_transport_type () const
 getter for record transport type More...
 
const std::string & getRecording_system_id () const
 getter for recording system id More...
 
void addAdditionalParameters (std::string occupation_code, std::string record_transport_type, std::string electronics_rack_type, std::string recording_system_ID)
 adds additional parameters such as hardware names and occupation code More...
 
bool listDownTimes (std::ofstream &of, bool skdFormat=false) const
 lists downtime for this station More...
 
bool listTagalongTimes (std::ofstream &of, bool skdFormat=false) const
 lists tagalong for this station More...
 
unsigned int getTotalObservingTime () const
 get total scheduled observing time up to this point More...
 
void addObservingTime (unsigned int additionalTime)
 adds observing time to counter More...
 
- Public Member Functions inherited from VieVS::VieVS_NamedObject
 VieVS_NamedObject (std::string name, unsigned long id)
 constructor More...
 
 VieVS_NamedObject (std::string name, std::string alternativeName, unsigned long id)
 constructor More...
 
const std::string & getName () const
 get object name More...
 
const std::string & getAlternativeName () const
 get object alternative name More...
 
bool hasAlternativeName () const
 check if object has alternative name More...
 
bool hasName (const std::string &name) const
 check if object has name More...
 
void changeName (const std::string &newName)
 change name of object More...
 
- Public Member Functions inherited from VieVS::VieVS_Object
 VieVS_Object (unsigned long id)
 constructor More...
 
const unsigned long getId () const
 get object id More...
 
bool hasValidId () const
 check if id is valid More...
 
bool hasId (unsigned long id) const
 check if object has specific id More...
 
void setId (unsigned long id)
 set object id More...
 
std::string printId () const
 object id string More...
 

Private Attributes

std::shared_ptr< AbstractAntennaantenna_
 station antenna More...
 
std::shared_ptr< AbstractCableWrapcableWrap_
 station cable wrap More...
 
std::shared_ptr< Positionposition_
 station position More...
 
std::shared_ptr< Equipmentequip_
 station equipment More...
 
std::shared_ptr< AbstractHorizonMaskmask_
 station horizon mask More...
 
std::vector< Eventevents_
 list of all events More...
 
std::string oneLetterCode_ = "_"
 one letter code for skd file More...
 
std::string electronics_rack_type_ = "unknown"
 electronics rack type (e.g.: "DBBC") More...
 
std::string record_transport_type_ = "unknown"
 record transport_type (e.g.: "MARK5B") More...
 
std::string recording_system_id_ = "unknown"
 recoring system id (e.g.: "Ke") More...
 
std::string occupation_code_ = "unknown"
 occupation code (e.g.: "72425901") More...
 
Statistics statistics_
 station statistics More...
 
std::vector< std::vector< PointingVector > > azelPrecalc_
 pre calculated azimuth elevation lookup table More...
 
Parameters parameters_
 station parameters More...
 
PointingVector currentPositionVector_
 current pointing vector More...
 
unsigned int nextEvent_ { 0 }
 index of next event More...
 
int nScans_ { 0 }
 number of participated scans More...
 
int nTotalScans_ { 0 }
 number of total scans More...
 
int nObs_ { 0 }
 number of observed baselines More...
 
unsigned int totalObsTime_ { 0 }
 total observing time in seconds More...
 

Static Private Attributes

static unsigned long nextId = 0
 next id for this object type More...
 

Detailed Description

representation of a VLBI station

First all station objects must be created, usually via the VLBI_initializer::createStationsFromCatalogs() Afterwards stations need to be initialized via VLBI_initializer::initializeStations()

Author
Matthias Schartner
Date
21.06.2017

Member Enumeration Documentation

azimuth elevation calculation model

Author
Matthias Schartner
Enumerator
simple 

simple model without nutation

rigorous 

rigorous model

Constructor & Destructor Documentation

Station::Station ( std::string  sta_name,
std::string  tlc,
std::shared_ptr< AbstractAntenna sta_antenna,
std::shared_ptr< AbstractCableWrap sta_cableWrap,
std::shared_ptr< Position sta_position,
std::shared_ptr< Equipment sta_equip,
std::shared_ptr< AbstractHorizonMask sta_mask,
unsigned long  nSources 
)

constructor

Author
Matthias Schartner
Parameters
sta_namestation name
tlctwo letter code
sta_antennastation antenna
sta_cableWrapstation cable wrap
sta_positionstation position
sta_equipstation equipment
sta_maskstation horizon mask
nSourcesnumber of sources

Member Function Documentation

void Station::addAdditionalParameters ( std::string  occupation_code,
std::string  record_transport_type,
std::string  electronics_rack_type,
std::string  recording_system_ID 
)

adds additional parameters such as hardware names and occupation code

Author
Matthias Schartner
Parameters
occupation_codeoccupation code
record_transport_typerecord transport type
electronics_rack_typeelectronics rack type
recording_system_IDrecording system ID

Here is the caller graph for this function:

void VieVS::Station::addObservingTime ( unsigned int  additionalTime)
inline

adds observing time to counter

Author
Matthias Schartner

Here is the caller graph for this function:

void Station::applyNextEvent ( std::ofstream &  of)
noexcept

changes parameters to next setup

Author
Matthias Schartner
Parameters
ofoutput stream object

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::calcAzEl_rigorous ( const std::shared_ptr< const AbstractSource > &  source,
PointingVector p 
)
noexcept

calculation of azimuth, elevation, hour angle and declination with rigorouse model

Author
Matthias Schartner
Parameters
sourceobserved source
ppointing vector

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::calcAzEl_simple ( std::shared_ptr< const AbstractSource source,
PointingVector p 
) const
noexcept

calculation of azimuth, elevation, hour angle and declination with lookup tables

Author
Matthias Schartner
Parameters
sourceobserved source
ppointing vector

Here is the caller graph for this function:

bool Station::checkForNewEvent ( unsigned int  time,
bool &  hardBreak 
)
noexcept

this function checks if it is time to change the parameters

Parameters
timecurrent time in seconds since start
hardBreakflag if a hard break was found

Here is the call graph for this function:

Here is the caller graph for this function:

bool Station::checkForTagalongMode ( unsigned int  time) const
noexcept

check for tagalong mode

Author
Matthias Schartner
Parameters
timetime
Returns
true if tagalong mode required

Here is the caller graph for this function:

void Station::clearObservations ( )

clear all observations

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

double Station::distance ( const Station other) const
noexcept

distance between two stations

Author
Matthias Schartner
Parameters
otherother station
Returns
distance between this two stations

Here is the caller graph for this function:

const AbstractAntenna& VieVS::Station::getAntenna ( ) const
inlinenoexcept

getter for antenna

Author
Matthias Schartner
Returns
antenna object

Here is the caller graph for this function:

const AbstractCableWrap& VieVS::Station::getCableWrap ( ) const
inlinenoexcept

getter for cable wrap

Author
Matthias Schartner
Returns
cable wrap of this station

Here is the caller graph for this function:

const PointingVector& VieVS::Station::getCurrentPointingVector ( ) const
inlinenoexcept

getter for current pointing vector

Author
Matthias Schartner
Returns
current pointing vector

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int VieVS::Station::getCurrentTime ( ) const
inlinenoexcept

getter for last time this antenna was mentioned in scheduling

Author
Matthias Schartner
Returns
last station usage time in seconds since session start

Here is the call graph for this function:

Here is the caller graph for this function:

const std::string& VieVS::Station::getElectronics_rack_type_ ( ) const
inline

getter for electronics rack type_

Author
Matthias Schartner
const Equipment& VieVS::Station::getEquip ( ) const
inlinenoexcept

getter for equipment information

Author
Matthias Schartner
Returns
equipment objecct

Here is the caller graph for this function:

std::pair< std::vector< double >, std::vector< double > > Station::getHorizonMask ( ) const
noexcept

get horizon mask

Author
Matthias Schartner
Returns
horizon mask

Here is the caller graph for this function:

const AbstractHorizonMask& VieVS::Station::getMask ( ) const
inline

getter for horizon mask

Author
Matthias Schartner
Returns
horizon mask object
int VieVS::Station::getNObs ( ) const
inlinenoexcept

getter for number of baselines which were already observed with this station

Author
Matthias Schartner
Returns
number of already observed baselines

Here is the caller graph for this function:

int VieVS::Station::getNScans ( ) const
inlinenoexcept

get number of scans

Author
Matthias Schartner
Returns
number of scans
int VieVS::Station::getNTotalScans ( ) const
inlinenoexcept

get number of total scans

Author
Matthias Schartner
Returns
number of total scans
const Parameters& VieVS::Station::getPARA ( ) const
inline

getter for parameters

Author
Matthias Schartner
Returns
currently used parameters

Here is the caller graph for this function:

std::shared_ptr<const Position> VieVS::Station::getPosition ( ) const
inlinenoexcept

getter for position

Author
Matthias Schartner
Returns
position object

Here is the caller graph for this function:

const std::string& VieVS::Station::getRecord_transport_type ( ) const
inline

getter for record transport type

Author
Matthias Schartner

Here is the caller graph for this function:

const std::string& VieVS::Station::getRecording_system_id ( ) const
inline

getter for recording system id

Author
Matthias Schartner

Here is the call graph for this function:

const Statistics& VieVS::Station::getStatistics ( ) const
inline

get station statistics

Author
Matthias Schartner
Returns
station statistics

Here is the call graph for this function:

unsigned int VieVS::Station::getTotalObservingTime ( ) const
inline

get total scheduled observing time up to this point

Author
Matthias Schartner
Returns
total scheduled observing time

Here is the caller graph for this function:

bool VieVS::Station::hasHorizonMask ( ) const
inline

check if station has horizon mask

Author
Matthias Schartner
Returns
flag if horizon mask is defined

Here is the caller graph for this function:

void VieVS::Station::increaseNObs ( )
inlinenoexcept

increase number of observations by one

Author
Matthias Schartner

Here is the caller graph for this function:

bool Station::isVisible ( const PointingVector p,
double  minElevationSource = 0 
) const
noexcept

checks if a source is visible for this station

Author
Matthias Schartner
Parameters
ppointing vector which holds time information and will be filled with azimuth and elevation information
minElevationSourceminimum elevation for this source
Returns
true if station is visible

Here is the call graph for this function:

Here is the caller graph for this function:

bool Station::listDownTimes ( std::ofstream &  of,
bool  skdFormat = false 
) const

lists downtime for this station

Author
Matthias Schartner
Parameters
ofoutput file
skdFormatdisplay output in skd format
Returns
true if there are down times

Here is the call graph for this function:

Here is the caller graph for this function:

bool Station::listTagalongTimes ( std::ofstream &  of,
bool  skdFormat = false 
) const

lists tagalong for this station

Author
Matthias Schartner
Parameters
ofoutput file
skdFormatdisplay output in skd format
Returns
true if tagalong mode was used

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Station::maximumAllowedObservingTime ( Timestamp  ts) const
noexcept

maxium allowed observing time

Author
Matthias Schartner
Parameters
tstime stamp
Returns
maxium allowed observing time

Here is the caller graph for this function:

AbstractCableWrap& VieVS::Station::referenceCableWrap ( )
inlinenoexcept

reference to cable wrap

Author
Matthias Schartner
Returns
cable wrap of this station
Parameters& VieVS::Station::referencePARA ( )
inline

reference to current parameters

Author
Matthias Schartner
Returns
reference of current parameters

Here is the caller graph for this function:

Parameters& VieVS::Station::refParaForMultiScheduling ( )
inline

reference parameters to add multi-scheduling setup

Author
Matthias Schartner
Returns
reference to parameters object

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::setCurrentPointingVector ( const PointingVector pointingVector)
noexcept

change current pointing vector

Author
Matthias Schartner
Parameters
pointingVectornew current pointing vector

Here is the caller graph for this function:

void VieVS::Station::setEVENTS ( std::vector< Event > &  EVENTS)
inlinenoexcept

sets all upcoming events

Author
Matthias Schartner
Parameters
EVENTSall upcoming events

Here is the caller graph for this function:

void VieVS::Station::setNextEvent ( unsigned int  idx)
inlinenoexcept

set next event index

Author
Matthias Schartner
Parameters
idxnext event index

Here is the call graph for this function:

void VieVS::Station::setStatistics ( const Statistics stat)
inline

set station statistics

Author
Matthias Schartner
Parameters
statstation statistics
boost::optional< unsigned int > Station::slewTime ( const PointingVector pointingVector) const
noexcept

calculate slew time between current pointing vector and this pointing vector

Author
Matthias Schartner

If this is the first scan of this station the slew time is zero.

Parameters
pointingVectorslew end position
Returns
slew time in seconds

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::toVexAntennaBlock ( std::ofstream &  of) const

writes antenna defining block in vex format

Author
Matthias Schartner
Parameters
ofvex file

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::toVexSiteBlock ( std::ofstream &  of) const

writes site defining block in vex format

Author
Matthias Schartner
Parameters
ofvex file

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::toVexStationBlock ( std::ofstream &  of) const

writes station defining block in vex format

Author
Matthias Schartner
Parameters
ofvex file

Here is the call graph for this function:

Here is the caller graph for this function:

void Station::update ( unsigned long  nbl,
const PointingVector end,
bool  addToStatistics 
)
noexcept

update station if used for a scan

Author
Matthias Schartner
Parameters
nblnumber of observed baselines
endpointing vector at end time
addToStatisticsflag if scan should have an influence on the further scheduling process

Here is the caller graph for this function:

Member Data Documentation

std::shared_ptr<AbstractAntenna> VieVS::Station::antenna_
private

station antenna

std::vector<std::vector<PointingVector> > VieVS::Station::azelPrecalc_
private

pre calculated azimuth elevation lookup table

std::shared_ptr<AbstractCableWrap> VieVS::Station::cableWrap_
private

station cable wrap

PointingVector VieVS::Station::currentPositionVector_
private

current pointing vector

std::string VieVS::Station::electronics_rack_type_ = "unknown"
private

electronics rack type (e.g.: "DBBC")

std::shared_ptr<Equipment> VieVS::Station::equip_
private

station equipment

std::vector<Event> VieVS::Station::events_
private

list of all events

std::shared_ptr<AbstractHorizonMask> VieVS::Station::mask_
private

station horizon mask

unsigned int VieVS::Station::nextEvent_ { 0 }
private

index of next event

unsigned long VieVS::Station::nextId = 0
staticprivate

next id for this object type

int VieVS::Station::nObs_ { 0 }
private

number of observed baselines

int VieVS::Station::nScans_ { 0 }
private

number of participated scans

int VieVS::Station::nTotalScans_ { 0 }
private

number of total scans

std::string VieVS::Station::occupation_code_ = "unknown"
private

occupation code (e.g.: "72425901")

std::string VieVS::Station::oneLetterCode_ = "_"
private

one letter code for skd file

Parameters VieVS::Station::parameters_
private

station parameters

std::shared_ptr<Position> VieVS::Station::position_
private

station position

std::string VieVS::Station::record_transport_type_ = "unknown"
private

record transport_type (e.g.: "MARK5B")

std::string VieVS::Station::recording_system_id_ = "unknown"
private

recoring system id (e.g.: "Ke")

Statistics VieVS::Station::statistics_
private

station statistics

unsigned int VieVS::Station::totalObsTime_ { 0 }
private

total observing time in seconds


The documentation for this class was generated from the following files: