LuciadCPillar  2020.0.04
luciad::MilitarySymbol Class Referenceabstract

Allows retrieving and manipulating modifiers of a military symbol, without having to worry whether the properties are encoded in the symbol code or in textual modifiers. More...

Classes

class  Modifiers
 Provides additional functionality around the Modifier enum class. More...
 

Public Types

enum  Affiliation {
  Affiliation::Pending, Affiliation::Unknown, Affiliation::AssumedFriend, Affiliation::Friend,
  Affiliation::AssumedNeutral, Affiliation::Neutral, Affiliation::Suspect, Affiliation::Hostile,
  Affiliation::ExercisePending, Affiliation::ExerciseUnknown, Affiliation::ExerciseAssumedFriend, Affiliation::ExerciseFriend,
  Affiliation::ExerciseAssumedNeutral, Affiliation::ExerciseNeutral, Affiliation::Joker, Affiliation::Faker
}
 The affiliation of a military symbol. More...
 
enum  Modifier {
  Modifier::Affiliation, Modifier::Status, Modifier::OrderOfBattle, Modifier::Sector1,
  Modifier::Sector2, Modifier::StandardIdentity1, Modifier::StandardIdentity2, Modifier::Echelon,
  Modifier::Mobility, Modifier::Leadership, Modifier::HqTaskForceDummy, Modifier::Quantity,
  Modifier::ReinforcedOrReduced, Modifier::StaffComments, Modifier::AdditionalInformation, Modifier::EvaluationRating,
  Modifier::CombatEffectiveness, Modifier::SignatureEquipment, Modifier::HigherFormation, Modifier::Hostile,
  Modifier::IffSif, Modifier::MobilityIndicator, Modifier::UniqueDesignation, Modifier::TypeLabel,
  Modifier::DateTimeGroup, Modifier::AltitudeDepth, Modifier::LocationLabel, Modifier::SpeedLabel,
  Modifier::SpecialHeadquarters, Modifier::PlatformType, Modifier::TeardownTime, Modifier::CommonIdentifier,
  Modifier::EffectiveTime, Modifier::MovementDirection, Modifier::Country, Modifier::TrackNumber,
  Modifier::Name, Modifier::PositionAndMovement, Modifier::Capacity, Modifier::HeadquartersElement,
  Modifier::InstallationComposition, Modifier::SpecialDesignator, Modifier::GuardedUnit, Modifier::TargetDesignator,
  Modifier::TargetNumberExtension, Modifier::Attitude, Modifier::Length, Modifier::Width
}
 Enumeration type for all available MIL-STD 2525 and APP-6 symbol modifiers. More...
 

Public Member Functions

virtual ~MilitarySymbol ()=default
 
virtual std::shared_ptr< MilitarySymbolcopyAndChangeCode (std::string newCode) const =0
 Creates a new military symbol based on the given code. More...
 
virtual Feature copyToFeature (luciad::FeatureId id, std::shared_ptr< luciad::Geometry > geometry) const =0
 Creates a new feature based on this military symbol. More...
 
virtual Affiliation getAffiliation () const =0
 Returns the affiliation of this symbol. More...
 
virtual const std::string & getCode () const =0
 Returns the SIDC code of the symbol. More...
 
virtual std::unordered_set< ModifiergetModifiers () const =0
 
virtual std::optional< std::vector< std::string > > getPossibleValues (Modifier modifier) const =0
 Returns the possible values for a given modifier, if applicable. More...
 
virtual MilitarySymbology::Standard getStandard () const =0
 
virtual std::optional< std::string > getValue (Modifier modifier) const =0
 Returns the value for the given modifier. More...
 
virtual void putValue (Modifier modifier, std::string value)=0
 Sets the given (modifier,value) pair. More...
 
virtual void resetValue (Modifier modifier)=0
 Resets the value associated with the given modifier. More...
 

Static Public Member Functions

static std::shared_ptr< MilitarySymbolcreate (MilitarySymbology::Standard standard, std::string sidc)
 Creates an returns a military symbol with the given standard and SIDC. More...
 
static std::shared_ptr< MilitarySymbolcreate (const Feature &feature)
 Creates an editable military symbol based on the given Feature. More...
 

Detailed Description

Allows retrieving and manipulating modifiers of a military symbol, without having to worry whether the properties are encoded in the symbol code or in textual modifiers.

The modifiers of a military symbol are partly encoded in its symbol code (e.g. the MIL-STD 2525b symbology encodes the affiliation in the second digit of the symbol code) and partly encoded as additional metadata called text modifiers (usually a key-value map). This class exposes all these modifiers and a generic way to retrieve and set modifier values.

Example usages

// 1) create a MIL-STD 2525b "rescue" symbol based on the code from the specification or a MilitarySymbologyNode
auto codedRescueSymbol = MilitarySymbol::create(standard, "G*G*GPAR--****X");
// codedRescueSymbol has properties for all applicable code and text modifiers.
// Mask characters have been replaced from the symbol code. Hence, the following statement is true:
EXPECT_TRUE(codedRescueSymbol->getCode() == "GUG-GPAR------X");
// 2) query the available modifiers
std::cout << "available modifiers:" << std::endl;
for (MilitarySymbol::Modifier modifier : codedRescueSymbol->getModifiers()) {
std::cout << to_string(modifier) << std::endl; // this outputs, among others, MilitarySymbol::Modifier::Affiliation and "AdditionalInformation".
}
// 3) query the possible values of the MilitarySymbol::Modifier::Affiliation modifier
codedRescueSymbol->getPossibleValues(MilitarySymbol::Modifier::Affiliation); // returns an array containing, among others, the value "Friend"
// 4) change the MilitarySymbol::Modifier::Affiliation modifier.
codedRescueSymbol->putValue(MilitarySymbol::Modifier::Affiliation, "Friend");
// The properties of a MilitarySymbol object are read-write and immediately update the values for the code and
// text modifiers. The MilitarySymbol::Modifier::Affiliation modifier is encoded in the symbol code, so the following statement is true:
EXPECT_TRUE(codedRescueSymbol->getCode() == "GFG-GPAR------X");
// 5) change the "additional information" modifier.
codedRescueSymbol->putValue(MilitarySymbol::Modifier::AdditionalInformation, "This is an example symbol.");
// the "additional information" modifier is stored as a text modifier

Member Enumeration Documentation

◆ Affiliation

The affiliation of a military symbol.

Enumerator
Pending 

A track which has not been subjected to the identification process.

Unknown 

An evaluated track which has not been identified.

AssumedFriend 

A track which is assumed to be a friend because of its characteristics, behavior, or origin.

Friend 

A track belonging to a declared friendly nation.

AssumedNeutral 

A track which is assumed to be neither supporting nor opposing friendly forces because of its characteristics, behavior, or origin.

Neutral 

A track or contact whose characteristics, behavior, origin, or nationality indicate that it is neither supporting nor opposing friendly forces.

Suspect 

A track which is potentially hostile because of its characteristics, behavior, origin, or nationality.

Hostile 

A track declared to belong to any opposing nation, party, group, or entity, which by virtue of its behavior or information collected on it such as characteristics, origin or nationality contributes to the threat to friendly forces.

ExercisePending 

A friendly track acting as not being subjected to the identification process.

ExerciseUnknown 

A friendly track acting as a evaluated, but non-identified track for exercise purposes.

ExerciseAssumedFriend 

A friendly track acting as an assumed friend for exercise purposes.

ExerciseFriend 

A friendly track acting as a friend for exercise purposes.

ExerciseAssumedNeutral 

A friendly track acting as assumed to be neither a supporting nor opposing track for exercise purposes.

ExerciseNeutral 

A friendly track acting as neutral for exercise purposes.

Joker 

A friendly track acting as a suspect for exercise purposes.

Faker 

A friendly track acting as a hostile for exercise purposes.

◆ Modifier

Enumeration type for all available MIL-STD 2525 and APP-6 symbol modifiers.

Refer to the respective standard specifications for a detailed description of the symbol modifiers. Use MilitarySymbol to find out which modifiers are applicable to a specific symbol. Depending on the standard, a specific modifier needs its value to be encoded in the SIDC code (we call this an SIDC modifier) or as a separate value (we call this a text modifier).

Enumerator
Affiliation 

Affiliation (SIDC modifier).

Status 

Status (SIDC modifier).

OrderOfBattle 

Order Of Battle (SIDC modifier).

Sector1 

Sector 1 (SIDC modifier).

Applies only to APP-6C and APP-6D.

Sector2 

Sector 2 (SIDC modifier).

Applies only to APP-6C and APP-6D.

StandardIdentity1 

Standard Identity 1 (SIDC modifier).

Applies only to APP-6C and APP-6D.

StandardIdentity2 

Standard Identity 2 (SIDC modifier).

Applies only to APP-6C and APP-6D.

Echelon 

Echelon (SIDC modifier).

Mobility 

Mobility (SIDC modifier).

Applies only to APP-6C and APP-6D. The APP6 field(s):

R
Leadership 

Leadership (SIDC modifier).

Applies to APP-6D The APP6 field(s):

D
HqTaskForceDummy 

Headquarters/Task Force/Dummy (SIDC modifier).

Applies only to APP-6C and APP-6D.

Quantity 

The number of items present in an equipment symbol (text modifier).

ReinforcedOrReduced 

Whether or not a symbol is reinforced and/or reduced (test modifier).

Possible values are 'R' for reinforced, 'D' for reduced, 'RD' for reinforced and reduced. The label will display (+), (-) and (土) respectively.

StaffComments 

Staff comments for units, equipment and installations (text modifier).

AdditionalInformation 

Additional information for units, equipment and installations (text modifier).

EvaluationRating 

Reliability and credibility rating for units, equipment, and installations (text modifier).

Possible values consist of the following:

  • Reliability rating: 'A' (completely reliable), 'B' (usually reliable), 'C' (fairly reliable), 'D' (not usually reliable)
  • Credibility rating: '1' (confirmed by other sources), '2' (probably true), '3' (possibly true), '4' (doubtfully true), '5' (improbable), '6' (truth cannot be judged).

Although both letters and numerals are used to indicate the evaluation of an item of information, they are independent of each other.

CombatEffectiveness 

Unit effectiveness or installation capability (text modifier).

SignatureEquipment 

Signature for hostile equipment (text modifier).

"!" indicates detectable electronic signatures.

HigherFormation 

Number or title of higher echelon command for a unit (text modifier).

Hostile 

Hostile indicator for equipment.

The letters "ENY" denote hostile symbols.

IffSif 

IFF/SIF Identification modes and codes (text modifier).

MobilityIndicator 

Mobility for equipment (SIDC modifier).

UniqueDesignation 

Uniquely identifies a particular unit, equipment, or installation, or identifies the acquisition number when used with SIGINT symbology (text modifier).

TypeLabel 

Type of equipment (text modifier).

DateTimeGroup 

Date/time for units, equipment and installations (text modifier).

Values are according to the Date/Time Group format "DDHHMMSSZMONYY".

AltitudeDepth 

Altitude portion of GPS; flight level for aircraft; depth for submerged objects; height in feet of equipment or structures on the ground (text modifier for units, equipment, and installations).

LocationLabel 

A symbol's location in degrees, minutes, and seconds (or in UTM or other applicable display format) (text modifier for units, equipment, and installations).

SpeedLabel 

Velocity as set forth in MIL-STD-6040 (text modifier for units, equipment, and installations).

SpecialHeadquarters 

The name of the special C2 headquarters (text modifier for units).

PlatformType 

Platform type (text modifier).

Possible values are 'ELNOT' or 'CENOT'.

TeardownTime 

Equipment teardown time in minutes (text modifier).

CommonIdentifier 

Example: "Hawk" for Hawk SAM system (text modifier).

EffectiveTime 

Effective time (text modifier).

MovementDirection 

Direction of movement or intended movement of an object (text modifier for units, equipment, and installations).

Country 

Country.

For MIL-STD 2525b/c, this is an SIDC modifier, for other symbologies this is a text modifier with as possible value a three-letter code.

The APP6 field(s):

"AC"

The MS2525 field(s):

"AS"
TrackNumber 

Track number.

Text modifier that applies to APP-6C air, maritime and space units.

Name 

Name.

Text modifier that applies to APP-6C air, maritime and space units.

PositionAndMovement 

Course [degrees] /Speed [knots] and/or Bearing [degrees] / Distance [nautical miles] Applies to APP-6C air, maritime and space units.

Capacity 

Capacity of installation displayed.

Text modifier that applies to APP-6C land installations.

The APP6 field(s):

"K"
HeadquartersElement 

Headquarters element that is being represented, such as TOC, MAIN (text modifier).

The APP6 field(s):

"AH"
InstallationComposition 

Component type of APP-6C land installations (text modifier).

One of:

  • Development
  • Research
  • Production
  • Service
  • Storage
  • Utility

The APP6 field(s):

"AI"
SpecialDesignator 

Special designator (text modifier).

One of 'NRT' or 'SIG'.

The APP6 field(s):

"AR"

The MS2525 field(s):

"AR"
GuardedUnit 

Undefined or BG.

The APP6 field(s):

"AQ"

The MS2525 field(s):

"AQ"
TargetDesignator 

Used in Fire Support operations to uniquely designate targets in accordance with STANAG 2147.

6-character text modifier, where characters 1 and 2 are alphabetic, and characters 3-6 are numeric: 'AANNNN'.

The MS2525 field(s):

"AP"
TargetNumberExtension 

A sequentially assigned number identifying the individual elements in a target (STANAG 5519).

A 2-3 character text modifier, where character 1 is a dash and characters 2-3 are numeric, from 1 through 15. It is applicable only to the “Point or Single Target” symbol, is conditional upon the presence of the Target Designator amplifier, and is visually displayed appended to the Target Number amplifier.

The APP6 field(s):

"APX"
Attitude 

Target attitude in degrees (text modifier).

Defines the target orientation for rectangular target areas.

Length 

Target length in meters (text modifier).

Defines the total target length for rectangular target areas.

Width 

Target width in meters (text modifier).

Defines the total target width for rectangular target areas.

Constructor & Destructor Documentation

◆ ~MilitarySymbol()

virtual luciad::MilitarySymbol::~MilitarySymbol ( )
virtualdefault

Member Function Documentation

◆ copyAndChangeCode()

virtual std::shared_ptr<MilitarySymbol> luciad::MilitarySymbol::copyAndChangeCode ( std::string  newCode) const
pure virtual

Creates a new military symbol based on the given code.

Modifiers of the current symbol are retained if they are still applicable and not overridden by the given code.

For example, applying this function to an existing MIL-STD 2525b space track with code

"SUPP------MYBEX"


by passing the code

"SFA*------*****"


will return a new MIL-STD 2525b air track with code

"SFAP------MYBEX"

.

Parameters
newCodecode representing the new symbol type
Returns
a new military symbol of the given type, with the same modifiers as the current symbol (if not overridden)

◆ copyToFeature()

virtual Feature luciad::MilitarySymbol::copyToFeature ( luciad::FeatureId  id,
std::shared_ptr< luciad::Geometry geometry 
) const
pure virtual

Creates a new feature based on this military symbol.

Parameters
idthe unique identifier of the feature
geometrythe geometry of the feature
Returns
a new military feature
See also
MilitaryDataModel

◆ create() [1/2]

static std::shared_ptr<MilitarySymbol> luciad::MilitarySymbol::create ( MilitarySymbology::Standard  standard,
std::string  sidc 
)
static

Creates an returns a military symbol with the given standard and SIDC.

Parameters
standardthe standard of the military symbol.
sidcthe sidc of the military symbol.
Returns
a new military symbol with the given standard and SIDC.

◆ create() [2/2]

static std::shared_ptr<MilitarySymbol> luciad::MilitarySymbol::create ( const Feature feature)
static

Creates an editable military symbol based on the given Feature.

Parameters
featurethe feature whose SIDC and modifiers should be used
Returns
a new symbol with the same SIDC and text modifiers as the given feature
See also
MilitaryDataModel

◆ getAffiliation()

virtual Affiliation luciad::MilitarySymbol::getAffiliation ( ) const
pure virtual

Returns the affiliation of this symbol.

This is a convenience method for directly retrieving the affiliation as an enum instance, as opposed to using getValue.

Returns
the symbol's affiliation.

◆ getCode()

virtual const std::string& luciad::MilitarySymbol::getCode ( ) const
pure virtual

Returns the SIDC code of the symbol.

The code represents the type of the symbol and any configured modifiers.

Returns
the SIDC code.

◆ getModifiers()

virtual std::unordered_set<Modifier> luciad::MilitarySymbol::getModifiers ( ) const
pure virtual
Returns
the modifiers of this shape symbol that can have a value associated with it.

◆ getPossibleValues()

virtual std::optional<std::vector<std::string> > luciad::MilitarySymbol::getPossibleValues ( Modifier  modifier) const
pure virtual

Returns the possible values for a given modifier, if applicable.

Parameters
modifierthe modifier whose values to return
Returns
the possible values for a given modifier, or an empty optional if the possible values cannot be enumerated.

◆ getStandard()

virtual MilitarySymbology::Standard luciad::MilitarySymbol::getStandard ( ) const
pure virtual
Returns
the symbology standard of this symbol.

◆ getValue()

virtual std::optional<std::string> luciad::MilitarySymbol::getValue ( Modifier  modifier) const
pure virtual

Returns the value for the given modifier.

Accepts both SIDC and text modifiers.

Parameters
modifierthe modifier for which the value needs to be returned
Returns
the value associated to the given modifier (or std::nullopt if no value is associated with it)

◆ putValue()

virtual void luciad::MilitarySymbol::putValue ( Modifier  modifier,
std::string  value 
)
pure virtual

Sets the given (modifier,value) pair.

Accepts both SIDC and text modifiers.

Multi-valued modifiers should be specified by joining the values with a colon character. For instance "value1" and "value2" should be combined as "value1:value2".

Parameters
modifierthe key that identifies the text modifier
valuethe value that will be associated with the text modifier

◆ resetValue()

virtual void luciad::MilitarySymbol::resetValue ( Modifier  modifier)
pure virtual

Resets the value associated with the given modifier.

If the modifier denotes an SIDC modifier, the value is reset to the default value, while for text modifiers, the associated value is simply removed (if any).

Parameters
modifierthe key that identifies the text modifier.