TLELib  0.1.0
tlelib::tle_node Class Reference

Main object of TLELib library. It represents the data, specified in the one measurement in TLE file. More...

#include <tlenode.h>

List of all members.

Public Member Functions

 tle_node ()
 Default constructor.
 tle_node (const std::string &line1, const std::string &line2, const std::string &line3, bool forceParsing=false)
 Constructor.
 tle_node (const std::string &line1, const std::string &line2, bool forceParsing=false)
 Constructor.
virtual ~tle_node ()
 Destructor.
void assign (const std::string &line1, const std::string &line2, const std::string &line3, bool forceParsing=false)
 Assign the TLE lines to tlelib::tle_node object.
void assign (const std::string &line1, const std::string &line2, bool forceParsing=false)
 Assign the TLE lines to tlelib::tle_node object.
std::string & sat_number ()
 Get/set the satellite number (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
std::string & sat_name ()
 Get/set the satellite name, specified in the TLE file.
std::string & designator ()
 Get/set the International Designator (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & n ()
 Get/set the Mean Motion [Revs per day] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & dn ()
 Get/set the First Time Derivative of the Mean Motion (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & d2n ()
 Get/set the Second Time Derivative of the Mean Motion (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & i ()
 Get/set the Inclination [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & Omega ()
 Get/set the Right Ascension of the Ascending Node [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & omega ()
 Get/set the Argument of Perigee [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & M ()
 Get/set the Mean Anomaly [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & BSTAR ()
 Get/set the BSTAR drag term (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & e ()
 Get/set the Eccentricity [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
char & classification ()
 Get/set the Classification (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
char & ephemeris_type ()
 Get/set the Ephemeris type (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
double & precise_epoch ()
 Get/set the precise epoch (including the fractional part of seconds)
std::time_t epoch ()
 Get/set the epoch.
int & element_number ()
 Get/set the Element number (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
int & revolution_number ()
 Get/set the Revolution number [Revs] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)
std::string first_string ()
 Convert this object to the first string of TLE format.
std::string second_string ()
 Convert this object to the second string of TLE format.
std::string third_string ()
 Convert this object to the third string of TLE format.

Protected Member Functions

void init ()
 Initialize members.
void free ()
 Delete members.
void parse_all ()
 Parse all parameters, presented in *(tle_node::m_line1), *(tle_node::m_line2) and *(tle_node::m_line3)
void check_line (const std::string &str) const
 Check whether the line checksum is valid. If the checksum is invalid, the tlelib::tle_checksum_error exception is generated.

Private Attributes

std::string * m_line1
std::string * m_line2
std::string * m_line3
std::string * m_satName
std::string * m_satNumber
std::string * m_designator
double * m_dn
double * m_d2n
double * m_Bstar
double * m_i
double * m_Omega
double * m_omega
double * m_M
double * m_n
double * m_e
double * m_date
char * m_classification
char * m_ephemerisType
int * m_elementNumber
int * m_revolutionNumber

Detailed Description

Main object of TLELib library. It represents the data, specified in the one measurement in TLE file.

Definition at line 41 of file tlenode.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 37 of file tlenode.cpp.

References init().

tle_node::tle_node ( const std::string &  line1,
const std::string &  line2,
const std::string &  line3,
bool  forceParsing = false 
)

Constructor.

Parameters:
line1- first TLE line (satellite name)
line2- second TLE line ("1 ...")
line3- third TLE line ("2 ...")
forceParsing- defines, if the data, specified in the given lines should be immediately parsed.

Definition at line 43 of file tlenode.cpp.

References assign(), and init().

tle_node::tle_node ( const std::string &  line1,
const std::string &  line2,
bool  forceParsing = false 
)

Constructor.

Parameters:
line1- second TLE line ("1 ...")
line2- third TLE line ("2 ...")
forceParsing- defines, if the data, specified in the given lines should be immediately parsed.

Definition at line 50 of file tlenode.cpp.

References assign(), and init().

tle_node::~tle_node ( ) [virtual]

Destructor.

Definition at line 57 of file tlenode.cpp.

References free().


Member Function Documentation

void tle_node::assign ( const std::string &  line1,
const std::string &  line2,
const std::string &  line3,
bool  forceParsing = false 
)

Assign the TLE lines to tlelib::tle_node object.

Parameters:
line1- first TLE line (satellite name)
line2- second TLE line ("1 ...")
line3- third TLE line ("2 ...")
forceParsing- defines, if the data, specified in the given lines should be immediately parsed.

Definition at line 99 of file tlenode.cpp.

References check_line(), free(), m_line1, m_line2, m_line3, and parse_all().

Referenced by tle_node().

void tle_node::assign ( const std::string &  line1,
const std::string &  line2,
bool  forceParsing = false 
)

Assign the TLE lines to tlelib::tle_node object.

Parameters:
line1- second TLE line ("1 ...")
line2- third TLE line ("2 ...")
forceParsing- defines, if the data, specified in the given lines should be immediately parsed.

Definition at line 114 of file tlenode.cpp.

References check_line(), free(), m_line2, m_line3, and parse_all().

double & tle_node::BSTAR ( )

Get/set the BSTAR drag term (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the BSTAR drag term.

Definition at line 273 of file tlenode.cpp.

References m_Bstar, m_line2, and tlelib::parseDouble().

Referenced by parse_all(), and second_string().

void tle_node::check_line ( const std::string &  str) const [protected]

Check whether the line checksum is valid. If the checksum is invalid, the tlelib::tle_checksum_error exception is generated.

Definition at line 138 of file tlenode.cpp.

References tlelib::checksum(), and CHECKSUM_INDEX.

Referenced by assign().

Get/set the Classification (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of 'char' type, representing the Classification.

Definition at line 295 of file tlenode.cpp.

References m_classification, m_line2, and tlelib::parseChar().

Referenced by parse_all(), and second_string().

double & tle_node::d2n ( )

Get/set the Second Time Derivative of the Mean Motion (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Second Time Derivative of the Mean Motion.

Definition at line 218 of file tlenode.cpp.

References m_d2n, m_line2, and tlelib::parseDouble().

Referenced by parse_all(), and second_string().

std::string & tle_node::designator ( )

Get/set the International Designator (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the std::string object, representing the international designator.

Definition at line 185 of file tlenode.cpp.

References m_designator, m_line2, tlelib::parseString(), and tlelib::trim().

Referenced by parse_all(), and second_string().

double & tle_node::dn ( )

Get/set the First Time Derivative of the Mean Motion (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the First Time Derivative of the Mean Motion.

Definition at line 207 of file tlenode.cpp.

References m_dn, m_line2, and tlelib::parseDouble().

Referenced by parse_all(), and second_string().

double & tle_node::e ( )

Get/set the Eccentricity [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Eccentricity.

Definition at line 284 of file tlenode.cpp.

References m_e, m_line3, and tlelib::parseDouble().

Referenced by parse_all(), and third_string().

Get/set the Element number (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of 'int' type, representing the Element number.

Definition at line 317 of file tlenode.cpp.

References m_elementNumber, m_line2, and tlelib::parseInt().

Referenced by parse_all(), and second_string().

Get/set the Ephemeris type (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of 'char' type, representing the Ephemeris type.

Definition at line 306 of file tlenode.cpp.

References m_ephemerisType, m_line2, and tlelib::parseChar().

Referenced by parse_all(), and second_string().

std::time_t tle_node::epoch ( )

Get/set the epoch.

Returns:
The reference to the value of 'std::time_t' type, representing the epoch - number of seconds from Jan 1, UNIX_FIRST_YEAR.

Definition at line 351 of file tlenode.cpp.

References precise_epoch().

std::string tle_node::first_string ( )

Convert this object to the first string of TLE format.

Returns:
First TLE string.

Definition at line 357 of file tlenode.cpp.

References sat_name().

void tle_node::free ( ) [protected]
double & tle_node::i ( )

Get/set the Inclination [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Inclination.

Definition at line 229 of file tlenode.cpp.

References m_i, m_line3, and tlelib::parseDouble().

Referenced by parse_all(), and third_string().

void tle_node::init ( ) [protected]
double & tle_node::M ( )

Get/set the Mean Anomaly [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Mean Anomaly.

Definition at line 262 of file tlenode.cpp.

References m_line3, m_M, and tlelib::parseDouble().

Referenced by parse_all(), and third_string().

double & tle_node::n ( )

Get/set the Mean Motion [Revs per day] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Mean Motion.

Definition at line 196 of file tlenode.cpp.

References m_line3, m_n, and tlelib::parseDouble().

Referenced by parse_all(), and third_string().

double & tle_node::Omega ( )

Get/set the Right Ascension of the Ascending Node [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Right Ascension of the Ascending Node.

Definition at line 240 of file tlenode.cpp.

References m_line3, m_Omega, and tlelib::parseDouble().

Referenced by parse_all(), and third_string().

double & tle_node::omega ( )

Get/set the Argument of Perigee [Degrees] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of double type, representing the Argument of Perigee.

Definition at line 251 of file tlenode.cpp.

References m_line3, m_omega, and tlelib::parseDouble().

Referenced by parse_all(), and third_string().

void tle_node::parse_all ( ) [protected]

Get/set the precise epoch (including the fractional part of seconds)

Returns:
The reference to the value of 'double' type, representing the epoch - number of seconds from Jan 1, UNIX_FIRST_YEAR.

Definition at line 339 of file tlenode.cpp.

References m_date, m_line2, tlelib::parseString(), and tlelib::string2date().

Referenced by epoch(), parse_all(), and second_string().

Get/set the Revolution number [Revs] (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the value of 'int' type, representing the Revolution number.

Definition at line 328 of file tlenode.cpp.

References m_line3, m_revolutionNumber, and tlelib::parseInt().

Referenced by parse_all(), and third_string().

std::string & tle_node::sat_name ( )

Get/set the satellite name, specified in the TLE file.

Returns:
The reference to the std::string object, representing the satellite name.

Definition at line 167 of file tlenode.cpp.

References m_line1, m_satName, tlelib::parseString(), and tlelib::trim().

Referenced by first_string(), and parse_all().

std::string & tle_node::sat_number ( )

Get/set the satellite number (see http://celestrak.com/NORAD/documentation/tle-fmt.asp)

Returns:
The reference to the std::string object, representing the satellite number.

Definition at line 150 of file tlenode.cpp.

References m_line2, m_line3, m_satNumber, tlelib::parseString(), and tlelib::trim().

Referenced by parse_all(), second_string(), and third_string().

std::string tle_node::second_string ( )

Convert this object to the second string of TLE format.

Returns:
Second TLE string.

Definition at line 365 of file tlenode.cpp.

References BSTAR(), tlelib::checksum(), classification(), d2n(), tlelib::date2string(), designator(), dn(), tlelib::double2string(), element_number(), ephemeris_type(), tlelib::int2string(), precise_epoch(), sat_number(), and tlelib::string2string().

std::string tle_node::third_string ( )

Convert this object to the third string of TLE format.

Returns:
Third TLE string.

Definition at line 388 of file tlenode.cpp.

References tlelib::checksum(), tlelib::double2string(), e(), i(), tlelib::int2string(), M(), n(), Omega(), omega(), revolution_number(), sat_number(), and tlelib::string2string().


Member Data Documentation

double * tlelib::tle_node::m_Bstar [private]

Definition at line 45 of file tlenode.h.

Referenced by BSTAR(), free(), and init().

Definition at line 46 of file tlenode.h.

Referenced by classification(), free(), and init().

double * tlelib::tle_node::m_d2n [private]

Definition at line 45 of file tlenode.h.

Referenced by d2n(), free(), and init().

double * tlelib::tle_node::m_date [private]

Definition at line 45 of file tlenode.h.

Referenced by free(), init(), and precise_epoch().

std::string * tlelib::tle_node::m_designator [private]

Definition at line 44 of file tlenode.h.

Referenced by designator(), free(), and init().

double* tlelib::tle_node::m_dn [private]

Definition at line 45 of file tlenode.h.

Referenced by dn(), free(), and init().

double * tlelib::tle_node::m_e [private]

Definition at line 45 of file tlenode.h.

Referenced by e(), free(), and init().

Definition at line 47 of file tlenode.h.

Referenced by element_number(), free(), and init().

Definition at line 46 of file tlenode.h.

Referenced by ephemeris_type(), free(), and init().

double * tlelib::tle_node::m_i [private]

Definition at line 45 of file tlenode.h.

Referenced by free(), i(), and init().

std::string* tlelib::tle_node::m_line1 [private]

Definition at line 43 of file tlenode.h.

Referenced by assign(), free(), init(), and sat_name().

std::string * tlelib::tle_node::m_line3 [private]

Definition at line 43 of file tlenode.h.

Referenced by assign(), e(), free(), i(), init(), M(), n(), Omega(), omega(), revolution_number(), and sat_number().

double * tlelib::tle_node::m_M [private]

Definition at line 45 of file tlenode.h.

Referenced by free(), init(), and M().

double * tlelib::tle_node::m_n [private]

Definition at line 45 of file tlenode.h.

Referenced by free(), init(), and n().

double * tlelib::tle_node::m_omega [private]

Definition at line 45 of file tlenode.h.

Referenced by free(), init(), and omega().

double * tlelib::tle_node::m_Omega [private]

Definition at line 45 of file tlenode.h.

Referenced by free(), init(), and Omega().

Definition at line 47 of file tlenode.h.

Referenced by free(), init(), and revolution_number().

std::string* tlelib::tle_node::m_satName [private]

Definition at line 44 of file tlenode.h.

Referenced by free(), init(), and sat_name().

std::string * tlelib::tle_node::m_satNumber [private]

Definition at line 44 of file tlenode.h.

Referenced by free(), init(), and sat_number().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Defines