![]() |
VieSched++
VieVS VLBI Scheduling Software
|
Functions | |
unsigned long | getNumberOfStations (const boost::property_tree::ptree &xml) |
get number of stations from xml file More... | |
std::vector< std::string > | getStationNames (const boost::property_tree::ptree &xml) |
get station names from xml file More... | |
std::string | ra2dms (double angle) |
convert right ascension to string More... | |
std::string | ra2dms_astFormat (double angle) |
convert right ascension to string More... | |
std::string | dc2hms (double angle) |
convert declination to string More... | |
std::string | dc2hms_astFormat (double angle) |
convert declination to string More... | |
double | freqency2wavelenth (double frequency) |
transforms frequency to wavelength More... | |
double | wavelength2frequency (double wavelength) |
transforms wavelength to frequency More... | |
double | wrap2twoPi (double angle) |
wrap angle to interval [0, 2*pi) More... | |
double | wrap2pi (double angle) |
wrap angle to interval [-pi, pi) More... | |
int | duration (const boost::posix_time::ptime &start, const boost::posix_time::ptime &end) |
calculate duration between two time points More... | |
std::string | version () |
software version number More... | |
template<typename T > | |
T | absDiff (const T &a, const T &b) |
absolute difference between two points More... | |
template<typename T > | |
std::vector< int > | sortIndexes (const std::vector< T > &v) |
indices of sorted vector elements More... | |
template<typename K , typename V > | |
bool | valueExists (std::map< K, V > mapOfElemen, V value) |
checks if a value already exists in a map More... | |
void | outputObjectList (const std::string &title, const std::vector< std::string > &names, std::ofstream &of, unsigned long indents=4) |
outputs list of objects More... | |
std::string | weekDay2string (int weekday) |
convert weekday integer to string More... | |
std::string | month2string (int month) |
convert month integer to string More... | |
template<typename A , typename B > | |
std::pair< B, A > | flip_pair (const std::pair< A, B > &p) |
flip pair More... | |
template<typename A , typename B > | |
std::map< B, A > | flip_map (const std::map< A, B > &src) |
flip map More... | |
char | numberOfScans2char (long n) |
converts number of scans (within 900 sec) to character for output tables More... | |
std::string | numberOfScans2char_header () |
translation table for number of scans (within 900 sec) to character for output tables More... | |
void | simplify_inline (std::string &str) |
simplifies the string inline More... | |
std::string | simplify (const std::string &str) |
generates simplified version of string More... | |
std::string | milliseconds2string (long long int usec, bool forceSeconds=false) |
converts microseconds to string More... | |
std::string | version2prefix (int version) |
version number to prefix More... | |
T VieVS::util::absDiff | ( | const T & | a, |
const T & | b | ||
) |
absolute difference between two points
prevents underflow errors for unsigned types
T | template type |
a | first value |
b | second value |
string VieVS::util::dc2hms | ( | double | angle | ) |
convert declination to string
example output: +00° 00' 00.00"
angle | declination angle in radians |
string VieVS::util::dc2hms_astFormat | ( | double | angle | ) |
convert declination to string
example output: +00° 00' 00.00"
angle | declination angle in radians |
int VieVS::util::duration | ( | const boost::posix_time::ptime & | start, |
const boost::posix_time::ptime & | end | ||
) |
calculate duration between two time points
start | start time point |
end | end time point |
std::map<B, A> VieVS::util::flip_map | ( | const std::map< A, B > & | src | ) |
flip map
src | map to flip |
std::pair<B, A> VieVS::util::flip_pair | ( | const std::pair< A, B > & | p | ) |
flip pair
p | pair to flip |
double VieVS::util::freqency2wavelenth | ( | double | frequency | ) |
transforms frequency to wavelength
assuming speed of light wave velocity
frequency | frequency in Hz |
unsigned long VieVS::util::getNumberOfStations | ( | const boost::property_tree::ptree & | xml | ) |
get number of stations from xml file
xml | property tree |
std::vector< std::string > VieVS::util::getStationNames | ( | const boost::property_tree::ptree & | xml | ) |
get station names from xml file
xml | property tree |
std::string VieVS::util::milliseconds2string | ( | long long int | usec, |
bool | forceSeconds = false |
||
) |
converts microseconds to string
usec | microseconds |
forceSeconds | set format to seconds only |
std::string VieVS::util::month2string | ( | int | month | ) |
convert month integer to string
1 = JAN 2 = FEB...
month | month in integer format |
char VieVS::util::numberOfScans2char | ( | long | n | ) |
converts number of scans (within 900 sec) to character for output tables
n | number of scans (within 900 sec) |
std::string VieVS::util::numberOfScans2char_header | ( | ) |
translation table for number of scans (within 900 sec) to character for output tables
void VieVS::util::outputObjectList | ( | const std::string & | title, |
const std::vector< std::string > & | names, | ||
std::ofstream & | of, | ||
unsigned long | indents = 4 |
||
) |
outputs list of objects
title | output title |
names | object names |
of | outstream object |
indents | number of indents |
string VieVS::util::ra2dms | ( | double | angle | ) |
convert right ascension to string
example output: 00h 00m 00.00s
angle | right ascension angle in radians |
std::string VieVS::util::ra2dms_astFormat | ( | double | angle | ) |
convert right ascension to string
example output: 00:00:00.000
angle | right ascension angle in radians |
std::string VieVS::util::simplify | ( | const std::string & | str | ) |
generates simplified version of string
simplify meaning that multiple whitespaces are converted to only one whitespace
str | string that should be processed |
void VieVS::util::simplify_inline | ( | std::string & | str | ) |
simplifies the string inline
simplify meaning that multiple whitespaces are converted to only one whitespace
str | string that should be processed |
std::vector<int> VieVS::util::sortIndexes | ( | const std::vector< T > & | v | ) |
indices of sorted vector elements
Example: input {2.1, 1.3, 0.3, 5.3} would return {2, 1, 0, 3}
T | vector type |
v | vector |
bool VieVS::util::valueExists | ( | std::map< K, V > | mapOfElemen, |
V | value | ||
) |
checks if a value already exists in a map
K | key type |
V | value type |
mapOfElemen | current map |
value | target value |
string VieVS::util::version | ( | ) |
software version number
std::string VieVS::util::version2prefix | ( | int | version | ) |
version number to prefix
version | version number |
double VieVS::util::wavelength2frequency | ( | double | wavelength | ) |
transforms wavelength to frequency
assuming speed of light wave velocity
wavelength | wavelength in m |
std::string VieVS::util::weekDay2string | ( | int | weekday | ) |
convert weekday integer to string
0 = SUN 1 = MON 2 = TUE...
weekday | weekday in integer format |
double VieVS::util::wrap2pi | ( | double | angle | ) |
wrap angle to interval [-pi, pi)
angle | input angle in radians |
double VieVS::util::wrap2twoPi | ( | double | angle | ) |
wrap angle to interval [0, 2*pi)
angle | input angle in radians |