コード例 #1
0
ファイル: C_WorkDataCapture.cpp プロジェクト: jjayne/nSIGHTS
void WorkingCaptureData2DUnconfined::ApplySpec(const double&            testTime,
                                   const SC_DoubleArray&    uncThickness,
                                   const SC_DoubleMatrix&   node2DPressure,
                                   const SeqBoundVals&      tsData)
{
    double deltaT = GetDeltaT(testTime);;
    for (int i = 0; i < capturedSpec.Size(); i++)
    {
        // get ref
        SC_DoubleArray& currVec = (*currCapturedData)[i+1];

        double lastVal = 0.0;   // no production at start
        if (!currVec.IsEmpty())
            lastVal = currVec.LastIndex();

        capturedVals[i] = capturedSpec[i].ApplySpec(uncThickness, node2DPressure, lastVal, deltaT, tsData);
    }

    WorkingCaptureDataBase::ApplySpec(testTime);


    // slight kluge -- update profiles
    SC_DoubleArray dummy;
    profileOutputFO.CaseAddTimeStep(testTime, dummy, uncThickness, node2DPressure);
}
コード例 #2
0
ファイル: imu.c プロジェクト: imTim12138/Nev-Rocker
void GetEulerAngle(void)
{
	float deltaT;
	Struct_3f gy,ac;

	GetMPU6050Data();
	imuAccIIRLPFilter(&mpu_info.acc, &accelLPF, &accelStoredFilterValues,imuAccLpfAttFactor);
	gy.x = mpu_info.gyro.x * Gyro2Radian;
	gy.y = mpu_info.gyro.y * Gyro2Radian;
	gy.z = mpu_info.gyro.z * Gyro2Radian;
	ac.x = accelLPF.x;
	ac.y = accelLPF.y;
	ac.z = accelLPF.z;
	deltaT = GetDeltaT(GetSysTime_us());
	DCM_CF(gy,ac,deltaT);
}