JSBSim sync.
This commit is contained in:
parent
0d2d153914
commit
58aa15ece9
3 changed files with 7 additions and 2 deletions
src/FDM/JSBSim
|
@ -260,6 +260,10 @@ public:
|
||||||
inline void SetLocationY(double y) {vXYZn(2) = y;}
|
inline void SetLocationY(double y) {vXYZn(2) = y;}
|
||||||
inline void SetLocationZ(double z) {vXYZn(3) = z;}
|
inline void SetLocationZ(double z) {vXYZn(3) = z;}
|
||||||
inline void SetLocation(FGColumnVector3 vv) { vXYZn = vv; }
|
inline void SetLocation(FGColumnVector3 vv) { vXYZn = vv; }
|
||||||
|
|
||||||
|
inline double GetLocationX( void ) { return vXYZn(1);}
|
||||||
|
inline double GetLocationY( void ) { return vXYZn(2);}
|
||||||
|
inline double GetLocationZ( void ) { return vXYZn(3);}
|
||||||
FGColumnVector3& GetLocation(void) { return vXYZn; }
|
FGColumnVector3& GetLocation(void) { return vXYZn; }
|
||||||
|
|
||||||
//these angles are relative to body axes, not earth!!!!!
|
//these angles are relative to body axes, not earth!!!!!
|
||||||
|
|
|
@ -158,8 +158,8 @@ double FGPropeller::Calculate(double PowerAvailable)
|
||||||
if (P_Factor > 0.0001) {
|
if (P_Factor > 0.0001) {
|
||||||
alpha = fdmex->GetTranslation()->Getalpha();
|
alpha = fdmex->GetTranslation()->Getalpha();
|
||||||
beta = fdmex->GetTranslation()->Getbeta();
|
beta = fdmex->GetTranslation()->Getbeta();
|
||||||
SetLocationY(P_Factor*alpha*fabs(Sense)/Sense);
|
SetLocationY( GetLocationY() + P_Factor*alpha*fabs(Sense)/Sense);
|
||||||
SetLocationZ(P_Factor*beta*fabs(Sense)/Sense);
|
SetLocationZ( GetLocationZ() + P_Factor*beta*fabs(Sense)/Sense);
|
||||||
} else if (P_Factor < 0.000) {
|
} else if (P_Factor < 0.000) {
|
||||||
cerr << "P-Factor value in config file must be greater than zero" << endl;
|
cerr << "P-Factor value in config file must be greater than zero" << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,7 @@ bool FGPropulsion::GetSteadyState(void)
|
||||||
Engines[i]->SetTrimMode(true);
|
Engines[i]->SetTrimMode(true);
|
||||||
Thrusters[i]->SetdeltaT(dt*rate);
|
Thrusters[i]->SetdeltaT(dt*rate);
|
||||||
steady=false;
|
steady=false;
|
||||||
|
steady_count=0;
|
||||||
while (!steady && j < 6000) {
|
while (!steady && j < 6000) {
|
||||||
PowerAvailable = Engines[i]->Calculate(Thrusters[i]->GetPowerRequired());
|
PowerAvailable = Engines[i]->Calculate(Thrusters[i]->GetPowerRequired());
|
||||||
lastThrust = currentThrust;
|
lastThrust = currentThrust;
|
||||||
|
|
Loading…
Add table
Reference in a new issue