//------------------------------------------------------------------------------ // getHotPartsRadiation() //------------------------------------------------------------------------------ LCreal AircraftIrSignature::getHotPartsRadiation(const IrQueryMsg* const msg) { LCreal currentPla = 1.0f; const Player* targetAircraft = msg->getTarget(); if (targetAircraft != 0) { if (targetAircraft->isClassType(typeid(AirVehicle))) { currentPla = getPLA(static_cast<const AirVehicle*>(targetAircraft)); } } LCreal targetAlt = static_cast<LCreal>(targetAircraft->getAltitudeM()); LCreal targetVel = targetAircraft->getMach(); LCreal targetAzimuth = msg->getAzimuthAoi(); LCreal targetElevation = msg->getElevationAoi(); if (targetAzimuth < 0) targetAzimuth = -targetAzimuth; LCreal irPower = getHotPartsSignature(currentPla, targetVel, targetAlt, targetAzimuth, targetElevation); return irPower; }
//------------------------------------------------------------------------------ // getPlumeRadiation() //------------------------------------------------------------------------------ double AircraftIrSignature::getPlumeRadiation(const IrQueryMsg* const msg) { double irPower = 0; const Player* targetAircraft = msg->getTarget(); if (targetAircraft != nullptr) { double currentPla = 1.0; if (targetAircraft->isClassType(typeid(AirVehicle))) { currentPla = getPLA(static_cast<const AirVehicle*>(targetAircraft)); } const double targetAlt = static_cast<double>(targetAircraft->getAltitudeM()); const double targetVel = targetAircraft->getMach(); double targetAzimuth = msg->getAzimuthAoi(); const double targetElevation = msg->getElevationAoi(); if (targetAzimuth < 0) { targetAzimuth = -targetAzimuth; } irPower = getPlumeSignature(currentPla, targetVel, targetAlt, targetAzimuth, targetElevation); } return irPower; }