Fixed a bug where a structural to Body frame conversion was being doen twice for tanks.
This commit is contained in:
parent
5e3ec6209c
commit
1d33664067
1 changed files with 3 additions and 4 deletions
|
@ -66,7 +66,7 @@ using namespace std;
|
|||
|
||||
namespace JSBSim {
|
||||
|
||||
static const char *IdSrc = "$Id: FGPropulsion.cpp,v 1.61 2012/04/14 18:10:44 bcoconni Exp $";
|
||||
static const char *IdSrc = "$Id: FGPropulsion.cpp,v 1.62 2012/07/19 03:50:19 jberndt Exp $";
|
||||
static const char *IdHdr = ID_PROPULSION;
|
||||
|
||||
extern short debug_lvl;
|
||||
|
@ -620,7 +620,6 @@ double FGPropulsion::GetTanksWeight(void) const
|
|||
|
||||
const FGMatrix33& FGPropulsion::CalculateTankInertias(void)
|
||||
{
|
||||
const FGMatrix33 Ts2b(-inchtoft, 0., 0., 0., inchtoft, 0., 0., 0., -inchtoft);
|
||||
unsigned int size;
|
||||
|
||||
size = Tanks.size();
|
||||
|
@ -629,10 +628,10 @@ const FGMatrix33& FGPropulsion::CalculateTankInertias(void)
|
|||
tankJ = FGMatrix33();
|
||||
|
||||
for (unsigned int i=0; i<size; i++) {
|
||||
FGColumnVector3 vTankBodyVec = Ts2b * (in.vXYZcg - Tanks[i]->GetXYZ());
|
||||
FGColumnVector3 vTankStructVec = in.vXYZcg - Tanks[i]->GetXYZ();
|
||||
|
||||
tankJ += FDMExec->GetMassBalance()->GetPointmassInertia( lbtoslug * Tanks[i]->GetContents(),
|
||||
vTankBodyVec);
|
||||
vTankStructVec);
|
||||
tankJ(1,1) += Tanks[i]->GetIxx();
|
||||
tankJ(2,2) += Tanks[i]->GetIyy();
|
||||
tankJ(3,3) += Tanks[i]->GetIzz();
|
||||
|
|
Loading…
Reference in a new issue