MC02 is an complex DDM extension to RPR which creates all sorts of regions for different types of entities.
MC02 Listen is exactly like Listen , but adds HLA MC02 DDM to the mix.
#include <iostream>
int keybrdTick();
int main( int argc, char* argv[] )
{
appInit.setExecName("VR-LinkMC02");
appInit.setFedFileName("VR-LinkMC02.fed");
appInit.parseCmdLine();
try
{
DtBoost::shared_ptr<DtBlueAirRegion> baRegion(
new DtBlueAirRegion(&exConn));
baRegion->notifyRtiOfUpdate();
blueRegion = baRegion;
blueRegSet.insert(blueRegion);
}
{
DtWarn <<
"Caught exception: " << regionException << std::endl;
return 1;
}
int forever = 1;
while (forever)
{
if (keybrdTick() == -1)
break;
if (first)
{
double refLongitude =
DtDeg2Rad(-121.326577);
DtTopoView topoView(esr, refLatitude, refLongitude);
std::cout << "Position of first entity: "
<< topoView.location().string() << std::endl;
std::cout <<
"\tName: " << first->
globalId() << std::endl;
}
}
return 0;
}
int keybrdTick()
{
if (keyPtr && (*keyPtr == 'q' || *keyPtr == 'Q'))
return -1;
else
return 0;
}