[Gcblue-commits] gcb_wx/src/database tcGenericDBObject.cpp, 1.26, 1.27 tcRadarDBObject.cpp, 1.18, 1
Status: Alpha
Brought to you by:
ddcforge
From: Dewitt C. <ddc...@us...> - 2006-10-24 01:34:35
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8446/src/database Modified Files: tcGenericDBObject.cpp tcRadarDBObject.cpp Log Message: Index: tcRadarDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcRadarDBObject.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcRadarDBObject.cpp 23 Mar 2006 01:11:02 -0000 1.18 --- tcRadarDBObject.cpp 24 Oct 2006 01:34:03 -0000 1.19 *************** *** 207,210 **** --- 207,211 ---- columnString += "DetectsSurface number(1),"; columnString += "DetectsAir number(1),"; + columnString += "DetectsMissile number(1),"; columnString += "DetectsGround number(1)"; } *************** *** 220,223 **** --- 221,225 ---- mbDetectsSurface = entry.GetInt("DetectsSurface") != 0; mbDetectsAir = entry.GetInt("DetectsAir") != 0; + mbDetectsMissile = entry.GetInt("DetectsMissile") != 0; mbDetectsGround = entry.GetInt("DetectsGround") != 0; *************** *** 238,241 **** --- 240,244 ---- s << (long)mbDetectsSurface << ","; s << (long)mbDetectsAir << ","; + s << (long)mbDetectsMissile << ","; s << (long)mbDetectsGround; *************** *** 255,258 **** --- 258,262 ---- mbDetectsSurface = true; mbDetectsAir = true; + mbDetectsMissile = true; mbDetectsGround = true; isSemiactive = false; *************** *** 261,273 **** tcRadarDBObject::tcRadarDBObject(tcRadarDBObject& obj) ! : tcSensorDBObject(obj) { ! mnClassID = DTYPE_RADAR; ! mfERP_dBW = obj.mfERP_dBW; ! mbDetectsSurface = obj.mbDetectsSurface; ! mbDetectsAir = obj.mbDetectsAir; ! mbDetectsGround = obj.mbDetectsGround; ! isSemiactive = obj.isSemiactive; ! isCommandReceiver = obj.isCommandReceiver; } --- 265,280 ---- tcRadarDBObject::tcRadarDBObject(tcRadarDBObject& obj) ! : ! tcSensorDBObject(obj), ! mfERP_dBW(obj.mfERP_dBW), ! mbDetectsSurface(obj.mbDetectsSurface), ! mbDetectsAir(obj.mbDetectsAir), ! mbDetectsMissile(obj.mbDetectsMissile), ! mbDetectsGround(obj.mbDetectsGround), ! isSemiactive(obj.isSemiactive), ! isCommandReceiver(obj.isCommandReceiver) { ! mnClassID = DTYPE_RADAR; ! } Index: tcGenericDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** tcGenericDBObject.cpp 18 Jun 2006 00:44:59 -0000 1.26 --- tcGenericDBObject.cpp 24 Oct 2006 01:34:02 -0000 1.27 *************** *** 56,60 **** void tcGenericDBObject::CalculateParams() { ! fuelConsumptionConstant = mfMaxSpeed_kts > 0 ? (mfFuelRate_kgps / mfMaxSpeed_kts) : 0; } --- 56,62 ---- void tcGenericDBObject::CalculateParams() { ! fuelConsumptionConstant = (mfMaxSpeed_kts > 0) ? (mfFuelRate_kgps / mfMaxSpeed_kts) : 0; ! ! invMaxSpeed = (mfMaxSpeed_kts > 0) ? (1.0f / mfMaxSpeed_kts) : 0; } *************** *** 72,78 **** } ! float tcGenericDBObject::GetFuelConsumptionConstant() const { ! return fuelConsumptionConstant; } --- 74,91 ---- } ! float tcGenericDBObject::GetFuelConsumptionConstant(float speed_kts) const { ! // Fuel burn penalty: ! // penalty = 0 for speed <= 2/3 max, above 2/3 penalty increases to 2 at max speed ! float excess_speed_penalty = 6.0 * ((speed_kts * invMaxSpeed) - 0.67f); ! ! if (excess_speed_penalty < 0) ! { ! return fuelConsumptionConstant; ! } ! else ! { ! return fuelConsumptionConstant * (1.0 + excess_speed_penalty); ! } } *************** *** 702,706 **** tcGenericDBObject::tcGenericDBObject() : tcDatabaseObject(), tcSensorPlatformDBObject(), ! fuelConsumptionConstant(0) { mnClassID = DTYPE_GENERIC; --- 715,720 ---- tcGenericDBObject::tcGenericDBObject() : tcDatabaseObject(), tcSensorPlatformDBObject(), ! fuelConsumptionConstant(0), ! invMaxSpeed(0) { mnClassID = DTYPE_GENERIC; |