Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv19209
Modified Files:
SimObject.h ScreenInfoManager.h ScreenInfo.h NumericalMethod.h
CSPSim.h AircraftObject.h AeroDynamics.h
Log Message:
no message
Index: SimObject.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/SimObject.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SimObject.h 18 Apr 2003 12:06:48 -0000 1.6
--- SimObject.h 18 Apr 2003 20:29:12 -0000 1.7
***************
*** 74,84 ****
void setFreezeFlag(bool flag) { setFlags(F_FREEZE, flag); }
! bool getFreezeFlag() const { return getFlags(F_FREEZE); }
void setDeleteFlag(bool flag) { setFlags(F_DELETE, flag); }
! bool getDeleteFlag() const { return getFlags(F_DELETE); }
void setGroundFlag(bool flag) { setFlags(F_GROUND, flag); }
! bool getGroundFlag() const { return getFlags(F_GROUND); }
virtual simdata::Vector3 getViewPoint() const;
--- 74,84 ----
void setFreezeFlag(bool flag) { setFlags(F_FREEZE, flag); }
! bool getFreezeFlag() const { return getFlags(F_FREEZE) != 0; }
void setDeleteFlag(bool flag) { setFlags(F_DELETE, flag); }
! bool getDeleteFlag() const { return getFlags(F_DELETE) != 0; }
void setGroundFlag(bool flag) { setFlags(F_GROUND, flag); }
! bool getGroundFlag() const { return getFlags(F_GROUND) != 0; }
virtual simdata::Vector3 getViewPoint() const;
Index: ScreenInfoManager.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/ScreenInfoManager.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScreenInfoManager.h 12 Mar 2003 21:37:35 -0000 1.2
--- ScreenInfoManager.h 18 Apr 2003 20:29:12 -0000 1.3
***************
*** 37,41 ****
void setStatus(std::string const & name, bool bvisible);
bool ScreenInfoManager::getStatus(std::string const & name);
! void changeObjectStats(int ScreenWidth, int ScreenHeight);
private:
osg::MatrixTransform* m_modelview_abs;
--- 37,41 ----
void setStatus(std::string const & name, bool bvisible);
bool ScreenInfoManager::getStatus(std::string const & name);
! void changeObjectStats(int ScreenWidth, int ScreenHeight,simdata::Pointer<DynamicObject> const& activeObject);
private:
osg::MatrixTransform* m_modelview_abs;
Index: ScreenInfo.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/ScreenInfo.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScreenInfo.h 12 Mar 2003 21:37:35 -0000 1.2
--- ScreenInfo.h 18 Apr 2003 20:29:13 -0000 1.3
***************
*** 30,33 ****
--- 30,37 ----
#include <osgText/Text>
+ #include <simdata/Types.h>
+
+ #include "DynamicObject.h"
+
class ScreenInfo:public osg::Geode
{
***************
*** 41,45 ****
virtual ~ScreenInfo() {}
virtual void update(){}
! void setStatus(bool const bvisible) {if (bvisible) setNodeMask(1); else setNodeMask(0);};
bool getStatus() const {return getNodeMask() != 0;};
};
--- 45,49 ----
virtual ~ScreenInfo() {}
virtual void update(){}
! void setStatus(bool const bvisible) {if (bvisible) setNodeMask(0x1); else setNodeMask(0x0);};
bool getStatus() const {return getNodeMask() != 0;};
};
***************
*** 74,78 ****
std::vector<osgText::Text*> m_ObjectStats;
public:
! ObjectStats(int posx,int posy);
virtual void update();
virtual ~ObjectStats(){}
--- 78,82 ----
std::vector<osgText::Text*> m_ObjectStats;
public:
! ObjectStats(int posx,int posy, simdata::Pointer<DynamicObject> const& activeObject);
virtual void update();
virtual ~ObjectStats(){}
Index: NumericalMethod.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/NumericalMethod.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NumericalMethod.h 12 Apr 2003 10:17:05 -0000 1.3
--- NumericalMethod.h 18 Apr 2003 20:29:13 -0000 1.4
***************
*** 50,64 ****
unsigned short m_dimension;
VectorField* vectorField;
! bool m_bfailed;
public:
NumericalMethod(bool deleteVF = true):
m_bdeleteVF(deleteVF),
vectorField(0),
! m_bfailed(false) {
}
NumericalMethod(VectorField* pf, bool deleteVF = true):
m_bdeleteVF(deleteVF),
vectorField(pf),
! m_bfailed(false) {
if (vectorField)
m_dimension = vectorField->getDimension();
--- 50,64 ----
unsigned short m_dimension;
VectorField* vectorField;
! bool m_failed;
public:
NumericalMethod(bool deleteVF = true):
m_bdeleteVF(deleteVF),
vectorField(0),
! m_failed(false) {
}
NumericalMethod(VectorField* pf, bool deleteVF = true):
m_bdeleteVF(deleteVF),
vectorField(pf),
! m_failed(false) {
if (vectorField)
m_dimension = vectorField->getDimension();
***************
*** 81,85 ****
};
! class RungeKutta: public NumericalMethod
{
std::vector<double> const & rk4(std::vector<double> const & y,
--- 81,85 ----
};
! class RungeKutta2: public NumericalMethod
{
std::vector<double> const & rk4(std::vector<double> const & y,
***************
*** 87,94 ****
double x, double h) const;
std::vector<double> const & rkqc(std::vector<double> &y,
! std::vector<double> &dyx,
double &x, double htry, double eps,
std::vector<double> const &yscal,
! double &hdid, double &hnext) const;
std::vector<double> const &odeint(std::vector<double> const & ystart,
double x1, double x2,
--- 87,94 ----
double x, double h) const;
std::vector<double> const & rkqc(std::vector<double> &y,
! std::vector<double> &dydx,
double &x, double htry, double eps,
std::vector<double> const &yscal,
! double &hdid, double &hnext);
std::vector<double> const &odeint(std::vector<double> const & ystart,
double x1, double x2,
***************
*** 109,113 ****
std::vector<double> const& quickSolve(std::vector<double>& y0, double t0, double dt) const;
std::vector<double> const& enhancedSolve(std::vector<double>& y0, double t0, double dt);
! RungeKutta(
VectorField* vectorField = 0,
bool deleteVF = true,
--- 109,113 ----
std::vector<double> const& quickSolve(std::vector<double>& y0, double t0, double dt) const;
std::vector<double> const& enhancedSolve(std::vector<double>& y0, double t0, double dt);
! RungeKutta2(
VectorField* vectorField = 0,
bool deleteVF = true,
***************
*** 121,124 ****
--- 121,165 ----
{}
};
+
+ class RungeKuttaCK: public NumericalMethod
+ {
+ std::vector<double> const & rkck(std::vector<double> const & y,
+ std::vector<double> const & dyx,
+ double x, double h, std::vector<double>& yerr) const;
+ std::vector<double> const & rkqs(std::vector<double> &y,
+ std::vector<double> &dydx,
+ double &x, double htry, double eps,
+ std::vector<double> const &yscal,
+ double &hdid, double &hnext);
+ std::vector<double> const &odeint(std::vector<double> const & ystart,
+ double x1, double x2,
+ double eps, double h1, double hmin,
+ unsigned int &nok, unsigned int &nbad);
+
+ static double const PGROW ;
+ static double const PSHRNK;
+
+ static double const SAFETY;
+ static double const ERRCON;
+
+ static unsigned int const MAXSTP;
+ static double const TINY;
+ double m_precision, m_hmin, m_hestimate;
+ public:
+ std::vector<double> const& quickSolve(std::vector<double>& y0, double t0, double dt) const;
+ std::vector<double> const& enhancedSolve(std::vector<double>& y0, double t0, double dt);
+ RungeKuttaCK(
+ VectorField* vectorField = 0,
+ bool deleteVF = true,
+ double Precision = 1.e-3, //1.e-4
+ double Hmin = std::numeric_limits<float>::epsilon(),
+ double Hestimate = 1.e-2):
+ NumericalMethod(vectorField, deleteVF),
+ m_precision(Precision),
+ m_hmin(Hmin),
+ m_hestimate(Hestimate)
+ {}
+ };
+
#endif // __NUMERICALMETHOD_H__
Index: CSPSim.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/CSPSim.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** CSPSim.h 18 Apr 2003 12:06:47 -0000 1.11
--- CSPSim.h 18 Apr 2003 20:29:13 -0000 1.12
***************
*** 34,45 ****
#include <SimData/DataManager.h>
#include "DynamicObject.h"
#include "TerrainObject.h"
#include "Atmosphere.h"
#include "Shell.h"
#include <Python.h>
- class VirtualBattlefield;
class VirtualScene;
class VirtualHID;
--- 34,46 ----
#include <SimData/DataManager.h>
+
#include "DynamicObject.h"
#include "TerrainObject.h"
#include "Atmosphere.h"
#include "Shell.h"
+ #include "VirtualBattlefield.h"
#include <Python.h>
class VirtualScene;
class VirtualHID;
Index: AircraftObject.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/AircraftObject.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AircraftObject.h 18 Apr 2003 12:06:47 -0000 1.8
--- AircraftObject.h 18 Apr 2003 20:29:13 -0000 1.9
***************
*** 94,107 ****
void doFCS(double dt);
- void getStats(std::vector<std::string> &stats);
-
void setAttitude(double pitch, double roll, double heading);
void setComplexPhysics(bool flag) { m_ComplexPhysics = flag; }
! double getAngleOfAttack() { return m_FlightModel->getAngleOfAttack(); }
! double getSideSlip() { return m_FlightModel->getSideSlip(); }
! virtual double getGForce() { return m_FlightModel->getGForce();};
! virtual double getSpeed() { return m_FlightModel->getSpeed();};
// void initializeHud();
--- 94,107 ----
void doFCS(double dt);
void setAttitude(double pitch, double roll, double heading);
void setComplexPhysics(bool flag) { m_ComplexPhysics = flag; }
! double getAngleOfAttack() const { return m_FlightModel->getAngleOfAttack(); }
! double getSideSlip() const { return m_FlightModel->getSideSlip(); }
! virtual double getGForce() const { return m_FlightModel->getGForce();}
! virtual double getSpeed() const { return m_FlightModel->getSpeed();}
!
! void getStats(std::vector<std::string> &stats) const;
// void initializeHud();
Index: AeroDynamics.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/AeroDynamics.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AeroDynamics.h 3 Apr 2003 10:40:22 -0000 1.7
--- AeroDynamics.h 18 Apr 2003 20:29:13 -0000 1.8
***************
*** 136,141 ****
float m_DrMin;
! float m_GMin;
! float m_GMax;
/**
--- 136,142 ----
float m_DrMin;
! // the folowing parameters are both structural and controlled in nature
! float m_GMin; // min number of G that this aircraft model can support (in general < 0)
! float m_GMax; // max ... (in general > 3)
/**
|