1
0
Fork 0

Updates from Jon.

This commit is contained in:
curt 1999-07-31 04:55:23 +00:00
parent 8d58f64257
commit a1b2152d7f
7 changed files with 101 additions and 80 deletions

View file

@ -399,7 +399,9 @@ void FGAircraft::FAero(void)
void FGAircraft::FGear(void)
{
if (GearUp) {
// crash routine
} else {
}
}

View file

@ -51,8 +51,8 @@ FGControls::~FGControls() {
// $Log$
// Revision 1.3 1999/06/28 15:39:23 curt
// Updates contributed by Jon Berndt.
// Revision 1.4 1999/07/31 02:55:24 curt
// Updates from Jon.
//
// Revision 1.1 1999/02/13 01:12:03 curt
// Initial Revision.

View file

@ -177,8 +177,8 @@ extern FGControls controls;
// $Log$
// Revision 1.3 1999/06/28 15:39:24 curt
// Updates contributed by Jon Berndt.
// Revision 1.4 1999/07/31 02:55:24 curt
// Updates from Jon.
//
// Revision 1.1 1999/02/13 01:12:03 curt
// Initial Revision.

View file

@ -93,7 +93,7 @@ FGFDMExec::FGFDMExec(void)
Rotation = new FGRotation(this);
Position = new FGPosition(this);
Auxiliary = new FGAuxiliary(this);
Output = new FGOutput(this);
// Output = new FGOutput(this);
State = new FGState(this);
@ -106,7 +106,7 @@ FGFDMExec::FGFDMExec(void)
if (!Rotation->InitModel()) {cerr << "Rotation model init failed"; Error+=16;}
if (!Position->InitModel()) {cerr << "Position model init failed"; Error+=32;}
if (!Auxiliary->InitModel()) {cerr << "Auxiliary model init failed"; Error+=64;}
if (!Output->InitModel()) {cerr << "Output model init failed"; Error+=128;}
// if (!Output->InitModel()) {cerr << "Output model init failed"; Error+=128;}
Schedule(Atmosphere, 5);
Schedule(FCS, 1);
@ -115,7 +115,7 @@ FGFDMExec::FGFDMExec(void)
Schedule(Translation, 1);
Schedule(Position, 1);
Schedule(Auxiliary, 1);
Schedule(Output, 1);
// Schedule(Output, 1);
terminate = false;
frozen = false;

View file

@ -196,7 +196,8 @@ void FGOutput::DelimitedOutput(void)
cout << "N";
cout << endl;
FirstPass = false;
} else {
}
cout << State->Getsim_time() << ",";
cout << State->Geth() << ",";
cout << Rotation->Getphi() << ",";
@ -224,5 +225,5 @@ void FGOutput::DelimitedOutput(void)
cout << Aircraft->GetM() << ",";
cout << Aircraft->GetN() << "";
cout << endl;
}
}

View file

@ -107,6 +107,28 @@ bool FGState::Reset(string path, string fname)
resetfile >> h;
resetfile.close();
Initialize(U, V, W, phi, tht, psi, latitude, longitude, h);
return true;
} else {
cerr << "Unable to load reset file " << fname << endl;
return false;
}
}
void FGState::Initialize(float U, float V, float W,
float phi, float tht, float psi,
float Latitude, float Longitude, float H)
{
float alpha, beta, gamma;
float Q0, Q1, Q2, Q3;
float T[4][4];
latitude = Latitude;
longitude = Longitude;
h = H;
// Change all angular measurements from degrees (as in config file) to radians
gamma = 0.0;
@ -152,12 +174,7 @@ bool FGState::Reset(string path, string fname)
FDMExec->GetPosition()->SetT(T[1][1], T[1][2], T[1][3],
T[2][1], T[2][2], T[2][3],
T[3][1], T[3][2], T[3][3]);
return true;
} else {
cerr << "Unable to load reset file " << fname << endl;
return false;
}
DisplayData();
}

View file

@ -78,6 +78,7 @@ public:
~FGState(void);
bool Reset(string, string);
void Initialize(float, float, float, float, float, float, float, float, float);
bool StoreData(string);
bool DumpData(string);
bool DisplayData(void);