Spacecraft.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: Spacecraft.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002 
00008 #ifndef GPSTK_SPACECRAFT_HPP
00009 #define GPSTK_SPACECRAFT_HPP
00010 
00011 //============================================================================
00012 //
00013 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
00028 //
00029 //  Wei Yan - Chinese Academy of Sciences . 2009, 2010
00030 //
00031 //============================================================================
00032 
00033 #include <iostream>
00034 #include <string>
00035 #include "Vector.hpp"
00036 #include "Matrix.hpp"
00037 #include "UTCTime.hpp"
00038 
00039 namespace gpstk
00040 {
00041    using namespace std;
00042 
00045 
00050    class Spacecraft
00051    {
00052    public:
00053 
00055       Spacecraft(std::string name = "spacecraft");
00056 
00058       ~Spacecraft() {};
00059 
00061       Vector<double> R() {return r;}
00062       Vector<double> V() {return v;}
00063       Vector<double> P() {return p;}
00064       
00066       Vector<double> dR_dR0() {return dr_dr0;}
00067       Vector<double> dR_dV0() {return dr_dv0;}
00068       Vector<double> dR_dP0() {return dr_dp0;}
00069       Vector<double> dV_dR0() {return dv_dr0;}
00070       Vector<double> dV_dV0() {return dv_dv0;}
00071       Vector<double> dV_dP0() {return dv_dp0;}
00072 
00074       int getNumOfP()
00075       { return p.size(); }
00076       
00078       void initStateVector(Vector<double> rv, Vector<double> dp = Vector<double>(0,0.0));
00079       
00081       Vector<double> getStateVector();
00082       void setStateVector(Vector<double> y);
00083 
00085       Matrix<double> getTransitionMatrix();
00086       void setTransitionMatrix(Matrix<double> phiMatrix);
00087       
00089       Matrix<double> getStateTransitionMatrix();
00090 
00092       Matrix<double> getSensitivityMatrix();
00093 
00094 
00095          // Methods to handle SC physical parameters
00096       
00097       std::string getName()
00098       { return scName; }
00099 
00100 
00101       Spacecraft& setName(std::string satName)
00102       { scName = satName; return (*this);}
00103 
00104 
00105       double getReflectCoeff()
00106       { return reflectCoeff; }
00107 
00108 
00109       Spacecraft& setReflectCoeff(double Cr)
00110       { reflectCoeff = Cr; return (*this); }
00111 
00112       double getDragCoeff()
00113       { return dragCoeff; }
00114 
00115 
00116       Spacecraft& setDragCoeff(double Cd)
00117       { dragCoeff = Cd; return (*this);}
00118       
00119 
00120       double getDragArea()
00121       { return crossArea; }
00122 
00123       Spacecraft& setDragArea(double satArea)
00124       { crossArea = satArea; return (*this);}
00125       
00126 
00127       double getSRPArea()
00128       { return crossArea; }
00129 
00130 
00131       Spacecraft& setSRPArea(double satArea)
00132       { crossArea = satArea; return (*this);}
00133       
00134 
00135       double getDryMass()
00136       {return dryMass;}
00137 
00138 
00139       Spacecraft& setDryMass(double satMass)
00140       { dryMass = satMass; return (*this);}
00141       
00142 
00143 
00145       void test();
00146 
00147 
00148    protected:
00149 
00150       void resetState();
00151       
00153       string scName;
00154       
00156       UTCTime utc;
00157 
00159       Vector<double> r;         // 3 Position
00160       Vector<double> v;         // 3 Velocity
00161       Vector<double> p;         // n dynamical parameters [this is important]
00162 
00163       Vector<double> dr_dr0;      // 3*3  I
00164       Vector<double> dr_dv0;      // 3*3  0
00165       Vector<double> dr_dp0;      // 3*n  0
00166       Vector<double> dv_dr0;      // 3*3  0
00167       Vector<double> dv_dv0;      // 3*3  I
00168       Vector<double> dv_dp0;      // 3*n  0
00169 
00171       double reflectCoeff;
00172 
00174       double dragCoeff;
00175 
00177       double crossArea;
00178 
00180       double dryMass;
00181 
00182    }; // End of class 'Spacecraft'
00183 
00184 
00191    std::ostream& operator<<( std::ostream& s,
00192                              const gpstk::Spacecraft& sc );
00193       // @}
00194 
00195 }  // End of namespace 'gpstk'
00196 
00197 #endif   // GPSTK_SPACECRAFT_HPP
00198 

Generated on Wed May 22 03:31:14 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1