Ejemplo n.º 1
0
void AirframeClass::ReInitialize()
{
	// float e10, e20, e30, e40;
	float qptchc;
	//mlTrig trigMu, trigSig, trigGam;

	/*--------------------------------------------------*/
	/* initial angles for 1-g straight and level flight */
	/*--------------------------------------------------*/
	beta  = 0.0f;
	ResetOrientation();
	Trigenometry();

	xdot  =  vt*platform->platformAngles.cosgam *
		platform->platformAngles.cossig;
	ydot  =  vt*platform->platformAngles.cosgam *
		platform->platformAngles.sinsig;
	zdot  = -vt*platform->platformAngles.singam ;

	ShiAssert(!_isnan(xdot));
	ShiAssert(!_isnan(ydot));
	ShiAssert(!_isnan(zdot));
	   
	/*------------------------------------*/
	/* initial earth coordinate positions */
	/*------------------------------------*/
	if(!IsSet(InAir))
	{
		Tpoint normal;
		float groundZ = OTWDriver.GetGroundLevel(x, y, &normal);
		if (z > groundZ - CheckHeight() + 0.01F)
			z = groundZ - CheckHeight();
	}
  
	/*-------------------------*/
	/* pitch command path lags */
	/*-------------------------*/
	oldp01[0] = 0.0;
	oldp01[1] = 0.0;
	oldp01[2] = 0.0;
	oldp01[3] = 0.0;

	/*------------------------*/
	/* pitch integral pathway */
	/*------------------------*/
	oldp02[0] = alpha;
	oldp02[1] = alpha;
	oldp02[2] = 0.0;
	oldp02[3] = 0.0;

	/*------------------*/
	/* aoa filter model */
	/*------------------*/
	oldp03[0] = alpha;
	oldp03[1] = alpha;
	oldp03[2] = alpha;
	oldp03[3] = alpha;
	oldp03[4] = alpha;
	oldp03[5] = alpha;

	/*-----------------*/
	/* alpha dot model */
	/*-----------------*/
	oldp04[0] = 0.0;
	oldp04[1] = 0.0;
	oldp04[2] = 0.0;
	oldp04[3] = alpha;
	oldp04[4] = alpha;
	oldp04[5] = alpha;

	/*------------------------------*/
	/* pitch rate correction filter */
	/*------------------------------*/
	if (vt)
	{
		//qptchc = GRAVITY*nzcgs/(vt*platform->platformAngles.cosbet);
		qptchc = GRAVITY*nzcgs/vt;
		oldp05[0] = qptchc;
		oldp05[1] = qptchc;
		oldp05[2] = qptchc;
		oldp05[3] = qptchc;
	}
	else
	{
		oldp05[0] = 0.0;
		oldp05[1] = 0.0;
		oldp05[2] = 0.0;
		oldp05[3] = 0.0;
	}

	/*--------------------------------------------*/
	/* initialize roll axis flight control system */
	/*--------------------------------------------*/
	/* roll rate response model */
	/*--------------------------*/
	oldr01[0] = 0.0;
	oldr01[1] = 0.0;
	oldr01[2] = 0.0;
	oldr01[3] = 0.0;

	/*------------------------------------------*/
	/* intialize yaw axis flight control system */
	/*------------------------------------------*/
	/* yaw integral pathway */
	/*----------------------*/
	oldy01[0] = 0.0;
	oldy01[1] = 0.0;
	oldy01[2] = 0.0;
	oldy01[3] = 0.0;

	/*-------------------*/
	/* beta filter model */
	/*-------------------*/
	//oldy02[0] = 0.0;
	//oldy02[1] = 0.0;
	//oldy02[2] = 0.0;
	//oldy02[3] = 0.0;

	/*----------------*/
	/* beta dot model */
	/*----------------*/
	oldy03[0] = 0.0;
	oldy03[1] = 0.0;
	oldy03[2] = 0.0;
	oldy03[3] = 0.0;

	//oldy04[0] = 0.0;
	//oldy04[1] = 0.0;
	//oldy04[2] = 0.0;
	//oldy04[3] = 0.0;

	Aerodynamics();
	Gains();
}
Ejemplo n.º 2
0
void FSimpleHMD::ResetOrientationAndPosition(float yaw)
{
	ResetOrientation(yaw);
	ResetPosition();
}
Ejemplo n.º 3
0
void FSteamVRHMD::ResetOrientationAndPosition(float yaw)
{
	ResetOrientation(yaw);
	ResetPosition();
}