- for (IndexPathPairSemanticMap::const_iterator i = _indexPathPairSemanticMap.begin();
- i != _indexPathPairSemanticMap.end(); ++i) {
- switch (i->second) {
- case LatitudeDeg:
- attributePathElementMap[i->first.first][i->first.second] = location->getLatitudeDegDataElement();
- break;
- case LatitudeRad:
- attributePathElementMap[i->first.first][i->first.second] = location->getLatitudeRadDataElement();
- break;
- case LongitudeDeg:
- attributePathElementMap[i->first.first][i->first.second] = location->getLongitudeDegDataElement();
- break;
- case LongitudeRad:
- attributePathElementMap[i->first.first][i->first.second] = location->getLongitudeRadDataElement();
- break;
- case ElevationM:
- attributePathElementMap[i->first.first][i->first.second] = location->getElevationMDataElement();
- break;
- case ElevationFt:
- attributePathElementMap[i->first.first][i->first.second] = location->getElevationFtDataElement();
- break;
- case HeadingDeg:
- attributePathElementMap[i->first.first][i->first.second] = location->getHeadingDegDataElement();
- break;
- case HeadingRad:
- attributePathElementMap[i->first.first][i->first.second] = location->getHeadingRadDataElement();
- break;
- case PitchDeg:
- attributePathElementMap[i->first.first][i->first.second] = location->getPitchDegDataElement();
- break;
- case PitchRad:
- attributePathElementMap[i->first.first][i->first.second] = location->getPitchRadDataElement();
- break;
- case RollDeg:
- attributePathElementMap[i->first.first][i->first.second] = location->getRollDegDataElement();
- break;
- case RollRad:
- attributePathElementMap[i->first.first][i->first.second] = location->getRollRadDataElement();
- break;
- case GroundTrackDeg:
- attributePathElementMap[i->first.first][i->first.second] = location->getGroundTrackDegDataElement();
- break;
- case GroundTrackRad:
- attributePathElementMap[i->first.first][i->first.second] = location->getGroundTrackRadDataElement();
- break;
- case GroundSpeedKnots:
- attributePathElementMap[i->first.first][i->first.second] = location->getGroundSpeedKnotsDataElement();
- break;
- case GroundSpeedFtPerSec:
- attributePathElementMap[i->first.first][i->first.second] = location->getGroundSpeedFtPerSecDataElement();
- break;
- case GroundSpeedMPerSec:
- attributePathElementMap[i->first.first][i->first.second] = location->getGroundSpeedMPerSecDataElement();
- break;
- case VerticalSpeedFtPerSec:
- attributePathElementMap[i->first.first][i->first.second] = location->getVerticalSpeedFtPerSecDataElement();
- break;
- case VerticalSpeedFtPerMin:
- attributePathElementMap[i->first.first][i->first.second] = location->getVerticalSpeedFtPerMinDataElement();
- break;
- case VerticalSpeedMPerSec:
- attributePathElementMap[i->first.first][i->first.second] = location->getVerticalSpeedMPerSecDataElement();
- break;
- }
+ for (IndexSemanticMap::const_iterator i = _indexSemanticMap.begin();
+ i != _indexSemanticMap.end(); ++i) {
+ HLAGeodeticLocation::Semantic semantic = HLAGeodeticLocation::Semantic(i->second);
+ objectInstance.setAttributeDataElement(i->first, location->getDataElement(semantic));