Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv4223
Modified Files:
VirtualBattlefield.h TerrainObject.h ScreenInfoManager.h
ScreenInfo.h FLCS.h CSPSim.h Colorspace.h AeroDynamics.h
Log Message:
no message
Index: VirtualBattlefield.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/VirtualBattlefield.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** VirtualBattlefield.h 21 Feb 2003 08:00:31 -0000 1.5
--- VirtualBattlefield.h 12 Mar 2003 21:37:34 -0000 1.6
***************
*** 27,34 ****
#include <list>
- #include <string>
-
- #include <osg/FrameStamp>
- #include <osg/Group>
#include <osgUtil/SceneView>
--- 27,30 ----
***************
*** 36,43 ****
#include "BaseController.h"
#include "DynamicObject.h"
- #include "ObjectRangeInfo.h"
#include "TerrainObject.h"
- #include <SimData/Types.h>
--- 32,37 ----
***************
*** 72,76 ****
simdata::Pointer<DynamicObject> getObjectFromID( unsigned int ID);
simdata::Pointer<DynamicObject> getObjectFromName( std::string name );
! BaseController * getControllerFromID(unsigned int ID);
void removeObjectWithID( unsigned int ID);
void removeObjectsMarkedForDelete();
--- 66,70 ----
simdata::Pointer<DynamicObject> getObjectFromID( unsigned int ID);
simdata::Pointer<DynamicObject> getObjectFromName( std::string name );
! BaseController* getControllerFromID(unsigned int ID);
void removeObjectWithID( unsigned int ID);
void removeObjectsMarkedForDelete();
***************
*** 144,148 ****
static unsigned int latest_object_id;
std::list<string> objectListHistory;
! list<BaseController *> controllerList;
float m_ViewDistance;
--- 138,142 ----
static unsigned int latest_object_id;
std::list<string> objectListHistory;
! std::list<BaseController *> controllerList;
float m_ViewDistance;
Index: TerrainObject.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/TerrainObject.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TerrainObject.h 21 Feb 2003 08:00:30 -0000 1.3
--- TerrainObject.h 12 Mar 2003 21:37:35 -0000 1.4
***************
*** 131,135 ****
Demeter::Terrain* m_pTerrain;
! Demeter::TerrainLattice* m_pTerrainLattice;
Demeter::DemeterDrawable* m_pDrawable;
--- 131,135 ----
Demeter::Terrain* m_pTerrain;
! mutable osg::ref_ptr<Demeter::TerrainLattice> m_pTerrainLattice;
Demeter::DemeterDrawable* m_pDrawable;
Index: ScreenInfoManager.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/ScreenInfoManager.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScreenInfoManager.h 19 Feb 2003 23:02:27 -0000 1.1
--- ScreenInfoManager.h 12 Mar 2003 21:37:35 -0000 1.2
***************
*** 26,30 ****
#define __SCREENINFOMANAGER_H__
- #include <osg/NodeVisitor>
#include <osg/Projection>
--- 26,29 ----
***************
*** 35,45 ****
public:
ScreenInfoManager(int ScreenWidth, int ScreenHeight);
! virtual ~ScreenInfoManager(){;};
void setStatus(std::string const & name, bool bvisible);
bool ScreenInfoManager::getStatus(std::string const & name);
private:
osg::MatrixTransform* m_modelview_abs;
! ScreenInfo * getScreenInfo(std::string const & name);
! void set2dScene(osg::Group* rootNode, int ScreenWidth, int ScreenHeight);
};
--- 34,44 ----
public:
ScreenInfoManager(int ScreenWidth, int ScreenHeight);
! virtual ~ScreenInfoManager(){}
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;
! ScreenInfo* getScreenInfo(std::string const & name);
};
Index: ScreenInfo.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/ScreenInfo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScreenInfo.h 19 Feb 2003 23:02:27 -0000 1.1
--- ScreenInfo.h 12 Mar 2003 21:37:35 -0000 1.2
***************
*** 35,44 ****
std::string m_TTFPath;
int m_FontSize;
! osgText::BitmapFont * m_BitmapFont;
! osgText::Text * m_Text;
public:
ScreenInfo(int posx,int posy, std::string const & name, std::string const & text = "");
! virtual ~ScreenInfo() {;};
! virtual void update(){;};
void setStatus(bool const bvisible) {if (bvisible) setNodeMask(1); else setNodeMask(0);};
bool getStatus() const {return getNodeMask() != 0;};
--- 35,44 ----
std::string m_TTFPath;
int m_FontSize;
! osgText::BitmapFont* m_BitmapFont;
! osgText::Text* m_Text;
public:
ScreenInfo(int posx,int posy, std::string const & name, std::string const & text = "");
! virtual ~ScreenInfo() {}
! virtual void update(){}
void setStatus(bool const bvisible) {if (bvisible) setNodeMask(1); else setNodeMask(0);};
bool getStatus() const {return getNodeMask() != 0;};
***************
*** 49,55 ****
{
float m_minFps, m_maxFps;
! osgText::Text * m_Date;
public:
Framerate(int posx,int posy);
virtual void update();
};
--- 49,56 ----
{
float m_minFps, m_maxFps;
! osgText::Text* m_Date;
public:
Framerate(int posx,int posy);
+ virtual ~Framerate(){}
virtual void update();
};
***************
*** 58,68 ****
class GeneralStats: public ScreenInfo
{
! osgText::Text * m_LocalPosition;
! osgText::Text * m_GlobalPosition;
! osgText::Text * m_Velocity;
public:
GeneralStats(int posx,int posy);
virtual void update();
! virtual ~GeneralStats() {;};
};
--- 59,69 ----
class GeneralStats: public ScreenInfo
{
! osgText::Text* m_LocalPosition;
! osgText::Text* m_GlobalPosition;
! osgText::Text* m_Velocity;
public:
GeneralStats(int posx,int posy);
virtual void update();
! virtual ~GeneralStats(){}
};
***************
*** 71,79 ****
{
// input device informations
! std::vector<osgText::Text *> m_ObjectStats;
public:
ObjectStats(int posx,int posy);
virtual void update();
! virtual ~ObjectStats() {;};
};
--- 72,80 ----
{
// input device informations
! std::vector<osgText::Text*> m_ObjectStats;
public:
ObjectStats(int posx,int posy);
virtual void update();
! virtual ~ObjectStats(){}
};
Index: FLCS.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/FLCS.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FLCS.h 26 Jan 2003 23:34:13 -0000 1.2
--- FLCS.h 12 Mar 2003 21:37:35 -0000 1.3
***************
*** 29,35 ****
#include "SimObject.h"
#include "HID.h"
- #include "AeroDynamics.h"
-
- //#include "AeroDynamics.h"
class FlightControlSystem: public simdata::Object
--- 29,32 ----
Index: CSPSim.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/CSPSim.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CSPSim.h 22 Feb 2003 02:32:04 -0000 1.6
--- CSPSim.h 12 Mar 2003 21:37:35 -0000 1.7
***************
*** 79,83 ****
void setActiveObject(simdata::Pointer<DynamicObject> object);
! simdata::Pointer<DynamicObject> const getActiveObject() const;
VirtualBattlefield * const getBattlefield() const;
--- 79,83 ----
void setActiveObject(simdata::Pointer<DynamicObject> object);
! simdata::Pointer<DynamicObject const> const getActiveObject() const;
VirtualBattlefield * const getBattlefield() const;
Index: Colorspace.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/Colorspace.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Colorspace.h 19 Feb 2003 11:41:56 -0000 1.3
--- Colorspace.h 12 Mar 2003 21:37:35 -0000 1.4
***************
*** 30,38 ****
#define __COLORSPACE_H__
- #include <cmath>
- #include <ostream>
- #include <assert.h>
-
-
/*
* Colorspace conversions and corrections.
--- 30,33 ----
Index: AeroDynamics.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/AeroDynamics.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AeroDynamics.h 19 Feb 2003 11:41:56 -0000 1.3
--- AeroDynamics.h 12 Mar 2003 21:37:36 -0000 1.4
***************
*** 32,35 ****
--- 32,37 ----
#include <SimData/InterfaceRegistry.h>
+ #include "DynamicalSystem.h"
+
class AircraftObject;
***************
*** 45,49 ****
Physics() { }
virtual ~Physics() {}
-
virtual void initialize() = 0;
virtual void doSimStep(double dt) = 0;
--- 47,50 ----
***************
*** 54,58 ****
*
*/
! class AeroDynamics: public simdata::Object, public Physics
{
public:
--- 55,59 ----
*
*/
! class AeroDynamics: public simdata::Object, public Physics, protected DynamicalSystem
{
public:
***************
*** 107,110 ****
--- 108,112 ----
virtual void initialize();
virtual void doSimStep(double dt);
+ virtual void doSimStep2(double dt);
protected:
***************
*** 141,144 ****
--- 143,148 ----
double m_CD_a; // CDa is the drag curve slope
double m_CD_de; // CDde is the drag due to elevator
+ double m_CD_i; // CD_i is induced drag coefficient = 1 / (e * pi * lambda) where lamdba = Span^2 / Area
+ // and e is Osswald coefficient
double m_CL0; // CLo is the reference lift at zero angle of attack
***************
*** 147,150 ****
--- 151,155 ----
double m_CL_q;
double m_CL_de; // CLde is the lift due to elevator
+ double m_CL; // total lift coefficient; used by induced drag = CD_i * Cl^2
double m_CM0; // CMo is the pitch moment coefficient
***************
*** 156,162 ****
double m_CY_beta; // CLb - the dihedral effect
double m_CY_p; // Clp - roll damping
! double m_CY_r; // CLdr - roll due to rudder
! double m_CY_da; // CLr - roll due to yaw rate// Clda - roll due to aileron
! double m_CY_dr;
double m_CI_beta;
--- 161,167 ----
double m_CY_beta; // CLb - the dihedral effect
double m_CY_p; // Clp - roll damping
! double m_CY_r; // CLr - roll due to yaw rate
! double m_CY_da; // Clda - roll due to aileron
! double m_CY_dr; // CLdr - roll due to rudder
double m_CI_beta;
***************
*** 191,197 ****
protected:
! simdata::Vector3 CalculateForces(double const p_qBarS); // update gforce too
! simdata::Vector3 CalculateMoments(double const p_qBarS) const;
double CalculateLiftCoefficient() const;
double CalculateDragCoefficient() const;
--- 196,205 ----
protected:
+ std::vector<double> const &f(double x, std::vector<double> &y);
+ void bindToBody(std::vector<double> const &y);
! simdata::Vector3 const& CalculateForces(double const p_qBarS); // update gforce too
! simdata::Vector3 const& CalculateMoments(double const p_qBarS) const;
! void updateAngles(double dt);
double CalculateLiftCoefficient() const;
double CalculateDragCoefficient() const;
***************
*** 209,217 ****
simdata::Vector3 LocalToBody(const simdata::Vector3 & vec);
simdata::Vector3 BodyToLocal(const simdata::Vector3 & vec);
simdata::Matrix3 MakeAngularVelocityMatrix(simdata::Vector3 u);
! simdata::Vector3 LiftVector() const;
! simdata::Vector3 DragVector() const;
! simdata::Vector3 SideVector() const;
/*
--- 217,227 ----
simdata::Vector3 LocalToBody(const simdata::Vector3 & vec);
simdata::Vector3 BodyToLocal(const simdata::Vector3 & vec);
+ void BodyToLocal();
+
simdata::Matrix3 MakeAngularVelocityMatrix(simdata::Vector3 u);
! simdata::Vector3 const& LiftVector();
! simdata::Vector3 const& DragVector() const;
! simdata::Vector3 const& SideVector() const;
/*
***************
*** 239,243 ****
// calculated forces
! simdata::Vector3 m_ForceBody;
simdata::Vector3 m_CurrentForceTotal;
simdata::Vector3 m_GravityForce;
--- 249,254 ----
// calculated forces
! double m_qBarFactor;
!
simdata::Vector3 m_CurrentForceTotal;
simdata::Vector3 m_GravityForce;
***************
*** 247,256 ****
// derived quantities
! double m_alpha; // angle of attack
double m_alphaDot; // AOA rate
double m_beta; // side slip angle
double m_gForce; // current g acceleration
! double m_Gravity; // current gravitational acceleration
simdata::Vector3 m_GravityWorld; // current gravity vector in earth coordinates
--- 258,268 ----
// derived quantities
! double m_alpha; // current angle of attack
! double m_alpha0; // discrete AOA
double m_alphaDot; // AOA rate
double m_beta; // side slip angle
double m_gForce; // current g acceleration
! double m_Gravity; // current gravitational acceleration
simdata::Vector3 m_GravityWorld; // current gravity vector in earth coordinates
***************
*** 264,267 ****
--- 276,280 ----
simdata::Vector3 m_MomentsBody; // (L,M,N) total moment (torque) in body coordinates
+ simdata::Vector3 m_PositionBody; // position after integration step in body coordinates
simdata::Vector3 m_AngularAccelBody; // (Pdot, Qdot, Rdot)
simdata::Vector3 m_AngularAccelLocal; // angular acceleration in local coordinates
|