#ifndef effZero
#define effZero 1.0E-30
#endif
const char* name, const char* markings,
mySysPub( 0 )
{
#if DtHLA
#elif DtDIS
#else
#error "Please Choose Protocol!"
#endif
myESR = myEntityPub->entityStateRep();
myESR->setEntityType( type );
myESR->setGuise( type );
myESR->setMarkingText( markings );
myESR->setAlgorithm( alg );
myESR->setEntityId( id );
myTopoView =
new DtTopoView( myESR, refLat, refLon );
myRel = rel;
myFire = 0;
myDetonateTime = 0.0;
myTimeDestroyed = -1.0;
myIsDestroyed = false;
myEmissionsEnabled = false;
myHaveArtParts = haveArtParts;
}
{
}
double initHeading, double initTRad,
double initPitch, bool autoRoll, double initRoll )
{
myTurnRate = ( ( initTRad != 0.0 ) ? ( initSpeed / initTRad ) : 0.0 );
double roll = ( autoRoll ) ?
double cosPsi = cos( psi );
double sinPsi = sin( psi );
double cosPhi = cos( phi );
double sinPhi = sin( phi );
{
}
}
{
double psi =
for( int i=0; i<3; ++i )
{
}
{
}
}
{
{
}
else
{
}
{
}
else
{
}
}
{
std::cout << "Received Detonation!" << std::endl;
{
}
}
{
double distance;
{
{
{
DtInfo <<
"Direct hit! Going down!" << std::endl;
return 1;
}
}
{
{
DtInfo <<
"Indirect hit only " << distance <<
" m away! Going down!"
<< std::endl;
return 1;
}
else
{
return 0;
}
}
default:
{
return 0;
}
}
}
{
myTurnRate= 0.0;
}
{
{
DtInfo <<
"Emissions enabled." << std::endl;
}
}
{
{
DtInfo <<
"Emissions disabled." << std::endl;
}
}
{
{
}
else
{
}
}
{
{
}
}
{
double minDistSqr = 0.0;
entity;
entity = entity->
next() )
{
if ( entity->id() == me ) continue;
entity->entityStateRep()->location(), geocPos );
if ( distSqr < minDistSqr || !nearest )
{
nearest = entity;
minDistSqr = distSqr;
}
}
return nearest;
}
{
if ( nearest )
{
}
}
{
{
return;
}
#if DtHLA
#endif
DtInfo <<
"Sending fire interaction" << std::endl;
}
{
{
return;
}
det.setMunitionType(sidewinder);
det.setVelocity(
DtVector( 0.0, 0, 0 ) );
det.setEntityLocation(
DtVector( 0.0, 0.0, 0.0 ) );
if ( ent )
{
det.setVelocity(velocity);
}
else
{
}
DtInfo <<
"Sending detonation interaction" << std::endl;
}
{
{
}
}
{
}
{
}
{
}
{
}
{
}