TLELib  0.1.0
tlenode.h
Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------------+
00002  | TLELib                                                                      |
00003  | Copyright 2011 Sergei V. Fundaev                                            |
00004  +-----------------------------------------------------------------------------+
00005  | This file is part of TLELib.                                                |
00006  |                                                                             |
00007  | TLELib is free software: you can redistribute it and/or modify              |
00008  | it under the terms of the GNU Lesser General Public License as published by |
00009  | the Free Software Foundation, either version 3 of the License, or           |
00010  | (at your option) any later version.                                         |
00011  |                                                                             |
00012  | TLELib is distributed in the hope that it will be useful,                   |
00013  | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00014  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00015  | GNU Lesser General Public License for more details.                         |
00016  |                                                                             |
00017  | You should have received a copy of the GNU Lesser General Public License    |
00018  | along with TLELib. If not, see <http://www.gnu.org/licenses/>.              |
00019  +----------------------------------------------------------------------------*/
00026 #ifndef TLENODE_H
00027 #define TLENODE_H
00028 
00029 #include <string>
00030 #include <ctime>
00031 
00032 #include <tlelib/tlefunc.h>
00033 
00034 namespace tlelib
00035 {
00036 
00041 class tle_node
00042 {
00043     std::string *m_line1, *m_line2, *m_line3;
00044     std::string *m_satName, *m_satNumber, *m_designator;
00045     double *m_dn, *m_d2n, *m_Bstar, *m_i, *m_Omega, *m_omega, *m_M, *m_n, *m_e, *m_date; 
00046     char *m_classification, *m_ephemerisType;
00047     int *m_elementNumber, *m_revolutionNumber;
00048 
00049 protected:
00050     void init(); 
00051     void free(); 
00052     void parse_all(); 
00053 
00058     void check_line(const std::string &str) const;
00059 
00060 public:
00061     tle_node(); 
00062 
00069     tle_node(const std::string& line1, const std::string& line2, const std::string& line3, bool forceParsing = false);
00070 
00077     tle_node(const std::string& line1, const std::string& line2, bool forceParsing = false);
00078 
00079     virtual ~tle_node(); 
00080 
00088     void assign(const std::string& line1, const std::string& line2, const std::string& line3, bool forceParsing = false);
00089 
00096     void assign(const std::string& line1, const std::string& line2, bool forceParsing = false);
00097 
00102     std::string &sat_number();
00103 
00108     std::string &sat_name();
00109 
00114     std::string &designator();
00115 
00120     double &n();
00121 
00126     double &dn();
00127 
00132     double &d2n();
00133 
00138     double &i();
00139 
00144     double &Omega();
00145 
00150     double &omega();
00151 
00156     double &M();
00157 
00162     double &BSTAR();
00163 
00168     double &e();
00169 
00174     char &classification();
00175 
00180     char &ephemeris_type();
00181 
00187     double &precise_epoch();
00188 
00194     std::time_t epoch();
00195 
00200     int &element_number();
00201 
00206     int &revolution_number();
00207 
00212     std::string first_string();
00213 
00218     std::string second_string();
00219 
00224     std::string third_string();
00225 };
00226 
00227 } // namespace
00228 
00229 #endif // TLENODE_H
 All Classes Namespaces Files Functions Variables Defines