5.11. Target section¶
Note
TargetSectionParser is
responsible for parsing Target section. Each line of this section describes
a single mision target.
Section example:
[Target]
3 1 1 50 500 133978 87574 1150
3 0 1 40 501 134459 85239 300 0 1_Chief 134360 85346
Output example:
{
'targets': [
{
'type': TargetTypes.recon,
'priority': TargetPriorities.secondary,
'in_sleep_mode': True,
'delay': 50,
'requires_landing': False,
'pos': Point2D(133978.0, 87574.0),
'radius': 1150,
},
{
'type': TargetTypes.recon,
'priority': TargetPriorities.primary,
'in_sleep_mode': True,
'delay': 40,
'requires_landing': True,
'pos': Point2D(134459.0, 85239.0),
'radius': 300,
'object': {
'waypoint': 0,
'id': '1_Chief',
'pos': Point2D(134360.0, 85346.0),
},
},
],
}
The output of the parser is a dict with targets item which
contains a list of dictionaries. Each dictionary represents a single target.
There are 8 different types of targets and 3 types of target priorities. Some different types of targets have identical sets of parameters.
5.11.1. Destroy¶
Definition example:
0 0 0 0 500 90939 91871 0 1 10_Chief 91100 91500
Output example:
{
'targets': [
{
'type': TargetTypes.destroy,
'priority': TargetPriorities.primary,
'in_sleep_mode': False,
'delay': 0,
'destruction_level': 50,
'pos': Point2D(90939.0, 91871.0),
'object': {
'waypoint': 1,
'id': '10_Chief',
'pos': Point2D(91100.0, 91500.0),
},
},
],
}
0Target type (destroy).
Output path: typeOutput type: complex target type constant 0Target priority (primary).
Output path: priorityOutput type: complex target priority constant 0Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise0Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 500Destruction level multiplied by 10.
Output path: destruction_levelOutput type: intOutput value: original value converted to integer number and divided by 10 90939X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 91871Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 0- Is not used by targets of this type.
1Waypoint number of the object which must be destroyed.
Output path: object.waypointOutput type: intOutput value: original value converted to integer number 10_ChiefID of the object which must be destroyed.
Output path: object.idOutput type: strOutput value: original string value 91100X coordinate of the object which must be destroyed.
Output path: object.pos.xOutput type: floatOutput value: original value converted to float number 91500Y coordinate of the object which must be destroyed.
Output path: object.pos.yOutput type: floatOutput value: original value converted to float number
5.11.2. Destroy area¶
Definition example:
1 1 1 60 750 133960 87552 1350
Output example:
{
'targets': [
{
'type': TargetTypes.destroy_area,
'priority': TargetPriorities.secondary,
'in_sleep_mode': True,
'delay': 60,
'destruction_level': 75,
'pos': Point2D(133960.0, 87552.0),
'radius': 1350,
},
],
}
1Target type (destroy area).
Output path: typeOutput type: complex target type constant 1Target priority (secondary).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise60Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 750Destruction level multiplied by 10.
Output path: destruction_levelOutput type: intOutput value: original value converted to integer number and divided by 10 133960X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 87552Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 1350Area radius.
Output path: radiusOutput type: intOutput value: original value converted to integer number
5.11.3. Destroy bridge¶
Definition example:
2 2 1 30 500 135786 84596 0 0 Bridge84 135764 84636
Output example:
{
'targets': [
{
'type': TargetTypes.destroy_bridge,
'priority': TargetPriorities.hidden,
'in_sleep_mode': True,
'delay': 30,
'pos': Point2D(135786.0, 84596.0),
'object': {
'id': 'Bridge84',
'pos': Point2D(135764.0, 84636.0),
},
},
],
}
2Target type (destroy bridge).
Output path: typeOutput type: complex target type constant 2Target priority (hidden).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise30Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 500- Is not used by targets of this type.
133960X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 87552Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 0- Is not used by targets of this type.
0- Is not used by targets of this type.
Bridge84ID of the bridge which must be destroyed.
Output path: object.idOutput type: strOutput value: original string value 135764X coordinate of the bridge which must be destroyed.
Output path: object.pos.xOutput type: floatOutput value: original value converted to float number 84636Y coordinate of the bridge which must be destroyed.
Output path: object.pos.yOutput type: floatOutput value: original value converted to float number
5.11.4. Recon¶
There are 2 possible definitions:
3 1 1 50 500 133978 87574 1150
3 0 1 40 501 134459 85239 300 0 1_Chief 134360 85346
Output example:
{
'targets': [
{
'type': TargetTypes.recon,
'priority': TargetPriorities.secondary,
'in_sleep_mode': True,
'delay': 50,
'requires_landing': False,
'pos': Point2D(133978.0, 87574.0),
'radius': 1150,
},
{
'type': TargetTypes.recon,
'priority': TargetPriorities.primary,
'in_sleep_mode': True,
'delay': 40,
'requires_landing': True,
'pos': Point2D(134459.0, 85239.0),
'radius': 300,
'object': {
'waypoint': 0,
'id': '1_Chief',
'pos': Point2D(134360.0, 85346.0),
},
},
],
}
Let’s examine second definition:
3Target type (recon).
Output path: typeOutput type: complex target type constant 0Target priority (primary).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise40Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 501Tells whether you need to land near the target to succeed.
Output path: requires_landingOutput type: boolOutput value: Trueif501,Falseotherwise134459X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 87574Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 300Maximal distance to target if you need to land.
Output path: radiusOutput type: intOutput value: original value converted to integer number 0Waypoint number of the object which you need to recon.
Output path: object.waypointOutput type: intOutput value: original value converted to integer number 1_ChiefID of the object which you need to recon.
Output path: object.idOutput type: strOutput value: original string value 134360X coordinate of the object which you need to recon.
Output path: object.pos.xOutput type: floatOutput value: original value converted to float number 85346Y coordinate of the object which you need to recon.
Output path: object.pos.yOutput type: floatOutput value: original value converted to float number
5.11.5. Escort¶
Definition example:
4 0 1 10 750 134183 85468 0 1 r0100 133993 85287
Output example:
{
'targets': [
{
'type': TargetTypes.escort,
'priority': TargetPriorities.primary,
'in_sleep_mode': True,
'delay': 10,
'destruction_level': 75,
'pos': Point2D(134183.0, 85468.0),
'object': {
'waypoint': 1,
'id': 'r0100',
'pos': Point2D(133993.0, 85287.0),
},
},
],
}
4Target type (escort).
Output path: typeOutput type: complex target type constant 0Target priority (primary).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise10Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 750Destruction level multiplied by 10.
Output path: destruction_levelOutput type: intOutput value: original value converted to integer number and divided by 10 134183X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 91871Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 0- Is not used by targets of this type.
1Waypoint number of the flight which must be escorted.
Output path: object.waypointOutput type: intOutput value: original value converted to integer number r0100ID of the flight which must be escorted.
Output path: object.idOutput type: strOutput value: original string value 133993X coordinate of the flight which must be escorted.
Output path: object.pos.xOutput type: floatOutput value: original value converted to float number 85287Y coordinate of the flight which must be escorted.
Output path: object.pos.yOutput type: floatOutput value: original value converted to float number
5.11.6. Cover¶
Definition example:
5 1 1 20 250 132865 87291 0 1 1_Chief 132866 86905
Output example:
{
'targets': [
{
'type': TargetTypes.cover,
'priority': TargetPriorities.secondary,
'in_sleep_mode': True,
'delay': 20,
'destruction_level': 25,
'pos': Point2D(132865.0, 87291.0),
'object': {
'waypoint': 1,
'id': '1_Chief',
'pos': Point2D(132866.0, 86905.0),
},
},
],
}
5Target type (cover).
Output path: typeOutput type: complex target type constant 1Target priority (secondary).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise20Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 250Destruction level multiplied by 10.
Output path: destruction_levelOutput type: intOutput value: original value converted to integer number and divided by 10 132865X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 87291Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 0- Is not used by targets of this type.
1Waypoint number of the object which must be covered.
Output path: object.waypointOutput type: intOutput value: original value converted to integer number 1_ChiefID of the object which must be covered.
Output path: object.idOutput type: strOutput value: original string value 132866X coordinate of the object which must be covered.
Output path: object.pos.xOutput type: floatOutput value: original value converted to float number 86905Y coordinate of the object which must be covered.
Output path: object.pos.yOutput type: floatOutput value: original value converted to float number
5.11.7. Cover area¶
Definition example:
6 1 1 30 500 134064 88188 1350
Output example:
{
'targets': [
{
'type': TargetTypes.cover_area,
'priority': TargetPriorities.secondary,
'in_sleep_mode': True,
'delay': 30,
'destruction_level': 50,
'pos': Point2D(134064.0, 88188.0),
'radius': 1350,
},
],
}
6Target type (cover area).
Output path: typeOutput type: complex target type constant 1Target priority (secondary).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise30Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 500Destruction level multiplied by 10.
Output path: destruction_levelOutput type: intOutput value: original value converted to integer number and divided by 10 134064X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 88188Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 1350Area radius.
Output path: radiusOutput type: intOutput value: original value converted to integer number
5.11.8. Cover bridge¶
Definition example:
7 2 1 30 500 135896 84536 0 0 Bridge84 135764 84636
Output example:
{
'targets': [
{
'type': TargetTypes.cover_bridge,
'priority': TargetPriorities.hidden,
'in_sleep_mode': True,
'delay': 30,
'pos': Point2D(135896.0, 84536.0),
'object': {
'id': 'Bridge84',
'pos': Point2D(135764.0, 84636.0),
},
},
],
}
7Target type (cover bridge).
Output path: typeOutput type: complex target type constant 2Target priority (hidden).
Output path: priorityOutput type: complex target priority constant 1Tells whether sleep mode is turned on.
Output path: in_sleep_modeOutput type: boolOutput value: Trueif1,Falseotherwise30Delay (in minutes).
Output path: delayOutput type: intOutput value: original value converted to integer number 500- Is not used by targets of this type.
135896X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 84536Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 0- Is not used by targets of this type.
0- Is not used by targets of this type.
Bridge84ID of the bridge which must be covered.
Output path: object.idOutput type: strOutput value: original string value 135764X coordinate of the bridge which must be covered.
Output path: object.pos.xOutput type: floatOutput value: original value converted to float number 84636Y coordinate of the bridge which must be covered.
Output path: object.pos.yOutput type: floatOutput value: original value converted to float number