[Gcblue-commits] gcb_wx/src/sim tcLauncher.cpp,1.32,1.33 tcLauncherState.cpp,1.35,1.36 tcMissileObje
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-12-18 18:48:30
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17709/src/sim Modified Files: tcLauncher.cpp tcLauncherState.cpp tcMissileObject.cpp tcPlatformObject.cpp Log Message: mission editor mode changes Index: tcLauncher.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncher.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** tcLauncher.cpp 18 Dec 2005 04:10:33 -0000 1.32 --- tcLauncher.cpp 18 Dec 2005 18:48:17 -0000 1.33 *************** *** 353,356 **** --- 353,364 ---- /** + * @return pointing elevation in radians + */ + float tcLauncher::GetPointingElevation() const + { + return pointingElevation; + } + + /** * */ Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** tcPlatformObject.cpp 12 Dec 2005 02:37:01 -0000 1.58 --- tcPlatformObject.cpp 18 Dec 2005 18:48:17 -0000 1.59 *************** *** 1064,1070 **** if (nLauncherKey != -1) { ! float launcherAz_deg = mpDBObject->GetLauncherAz(nLauncher); ! mcLauncherState.AddFullLauncher(nLauncherKey, C_PIOVER180*launcherAz_deg, ! mpDBObject->launcherName[nLauncher]); } else --- 1064,1070 ---- if (nLauncherKey != -1) { ! osg::Vec2 attitude = mpDBObject->GetLauncherAttitude(nLauncher); ! mcLauncherState.AddFullLauncher(nLauncherKey, C_PIOVER180*attitude._v[0], ! C_PIOVER180*attitude._v[1], mpDBObject->launcherName[nLauncher]); } else Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** tcLauncherState.cpp 10 Sep 2005 21:47:38 -0000 1.35 --- tcLauncherState.cpp 18 Dec 2005 18:48:17 -0000 1.36 *************** *** 51,55 **** * @param displayName name to display in GUI controls, e.g. "Tube 1" */ ! void tcLauncherState::AddFullLauncher(tnPoolIndex anKey, float azimuth_rad, const std::string& displayName) { --- 51,55 ---- * @param displayName name to display in GUI controls, e.g. "Tube 1" */ ! void tcLauncherState::AddFullLauncher(tnPoolIndex anKey, float azimuth_rad, float elevation_rad, const std::string& displayName) { *************** *** 75,79 **** new_launcher->pointingAngle = azimuth_rad; ! new_launcher->pointingElevation = 0; new_launcher->displayName = displayName; --- 75,79 ---- new_launcher->pointingAngle = azimuth_rad; ! new_launcher->pointingElevation = elevation_rad; new_launcher->displayName = displayName; Index: tcMissileObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMissileObject.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** tcMissileObject.cpp 17 Jul 2005 12:58:05 -0000 1.31 --- tcMissileObject.cpp 18 Dec 2005 18:48:17 -0000 1.32 *************** *** 153,165 **** mcKin.mfHeading_rad = obj->mcKin.mfHeading_rad; if (dynamic_cast<tcAirObject*>(obj)) { mcKin.mfPitch_rad = obj->mcKin.mfPitch_rad; } else { ! // point surface launched missiles up ! mcKin.mfPitch_rad = 0.45f * C_PI; } --- 153,166 ---- mcKin.mfHeading_rad = obj->mcKin.mfHeading_rad; + const tcLauncher* pLauncher = obj->GetLauncher(nLauncher); if (dynamic_cast<tcAirObject*>(obj)) { + // assume air launch always aligned with velocity vector of parent platform mcKin.mfPitch_rad = obj->mcKin.mfPitch_rad; } else { ! mcKin.mfPitch_rad = obj->mcKin.mfPitch_rad + pLauncher->GetPointingElevation(); } *************** *** 175,179 **** ! const tcLauncher* pLauncher = obj->GetLauncher(nLauncher); mfGoalHeading_rad = obj->mcKin.mfHeading_rad + pLauncher->pointingAngle; --- 176,180 ---- ! mfGoalHeading_rad = obj->mcKin.mfHeading_rad + pLauncher->pointingAngle; *************** *** 205,212 **** - // add pitch initializer eventually, have to deal with launcher elevation mfStatusTime = obj->mfStatusTime; mcKin.mfHeading_rad += pLauncher->pointingAngle; - mcKin.mfPitch_rad += pLauncher->pointingElevation; mcKin.mfClimbAngle_rad = mcKin.mfPitch_rad; --- 206,211 ---- |