# engine.LingYi.entitys.mineclearmission

View Source

      1# -*- coding:utf-8 -*-
      2
      3from .global_util import *
      4from .mission_common import MissionCommon
      5
      6
      7class MineClearMission(MissionCommon):
      8    """
      9    排雷任务类
     10    1、三分之一规则
     11    2、设置任务编队规模
     12    3、是否飞机数低于编队规模不允许起飞
     13    4、设置任务舰船/潜艇编队规模
     14    5、是否舰船/潜艇数低于编队规模不允许出发
     15    6、设置清雷任务所需最少飞机数
     16    7、设置任务的出航油门
     17    8、设置任务的阵位油门
     18    9、设置任务的出航高度
     19    10、设置任务的阵位高度
     20    11、设置出航地形跟随
     21    12、阵地地形跟随
     22    13、设置排雷任务的区域，按顺序排列的参考点名
     23
     24    示例：
     25    mission = self.get_mission_by_name('mineclear_mission')   # 通过排雷任务的名字  获取排雷任务对象
     26    mission.set_one_third_rule(True)  # 三分之一规则 开启
     27    mission.set_start('05/24/2014 16:05:00')  # 设置任务开始时间 mission.py中接口
     28    """
     29    def __init__(self, guid, name, side_name):
     30        MissionCommon.__init__(self, guid, name, side_name, ElementType.MineClearMission)
     31        self.Type = 0  # 任务子类型(无）
     32        self.Area = []  # 排雷区域--参考点guid列表
     33        self.OTR = False  # OneThirdRule
     34        self.TransitThrottleAircraft = 0  # 运输油门_飞机
     35        self.StationThrottleAircraft = 0  # 阵位油门_飞机
     36        self.TransitAltitudeAircraft = 0.0  # 运输高度_飞机
     37        self.StationAltitudeAircraft = 0.0  # 阵位高度_飞机
     38        self.TransitTerrainFollowingAircraft = False  # 运输地形跟随_飞机
     39        self.StationTerrainFollowingAircraft = False  # 阵位地形跟随_飞机
     40        self.TransitThrottleSubmarine = 0  # 运输油门_潜艇
     41        self.StationThrottleSubmarine = 0  # 阵位油门_潜艇
     42        self.TransitDepthSubmarine = 0.0  # 9999表示无设置  // 运输深度_潜艇
     43        self.StationDepthSubmarine = 0.0  # 阵位深度_潜艇
     44        self.TransitThrottleShip = 0  # 运输油门_舰船
     45        self.StationThrottleShip = 0  # 阵位油门_舰船
     46        self.TransitThrottleFacility = 0  # 运输油门_设施
     47        self.StationThrottleFacility = 0  # 阵位油门_设施
     48        self.FormationCruise = 0  # 巡航队形
     49        self.FormationAttack = 0  # 攻击队形
     50        self.MinAircraftReq = 0  # 最小飞机数量
     51
     52    def set_one_third_rule(self, one_third):
     53        """
     54        1、三分之一规则
     55        :param one_third: bool, True,设置三分之一规则  False:不遵守三分之一规则
     56        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     57        """
     58        str_set = "oneThirdRule=%s" % (str(one_third).lower())
     59        return self._set(str_set)
     60
     61    def set_flight_size(self, enum_flight_size):
     62        """
     63        2、设置任务编队规模
     64        :param enum_flight_size:FlightSize, 编队规模, global_util.py中定义
     65        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     66        """
     67        str_set = "flightSize=%d" % enum_flight_size.value
     68        return self._set(str_set)
     69
     70    def use_flight_size(self, use_flight_size):
     71        """
     72        3、是否飞机数低于编队规模不允许起飞
     73        :param use_flight_size: bool, True:是
     74        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     75        """
     76        str_set = "useFlightSize=%s" % str(use_flight_size).lower()
     77        return self._set(str_set)
     78
     79    def set_group_size(self, enum_group_size):
     80        """
     81        4、设置任务舰船/潜艇编队规模
     82        :param enum_group_size:GroupSize, 舰船/潜艇编队规模, global_util.py中定义
     83        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     84        """
     85        str_set = "groupSize=%d" % enum_group_size.value
     86        return self._set(str_set)
     87
     88    def use_group_size(self, use_group_size):
     89        """
     90        5、是否舰船/潜艇数低于编队规模不允许出发
     91        :param use_group_size: bool, True:是
     92        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     93        """
     94        str_set = "useGroupSize=%s" % str(use_group_size).lower()
     95        return self._set(str_set)
     96
     97    def set_minaircraft(self, min_aircraft):
     98        """
     99        6、设置清雷任务所需最少飞机数
    100        :param min_aircraft:枚举MinAircraftReq的值, global_util.py中定义
    101        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    102        """
    103        str_set = "minaircraftreq=%d" % min_aircraft.value
    104        return self._set(str_set)
    105
    106    def set_transit_throttle(self, enum_throttle, unit_category=ElementType.Aircraft):
    107        """
    108        7、设置任务的出航油门
    109        :param enum_throttle:枚举Throttle的值, 油门, global_util.py中定义
    110        :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine
    111        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    112        """
    113        if unit_category == ElementType.Aircraft:
    114            if enum_throttle.value == 0:
    115                str_set = "transitThrottleAircraft='Unspecified'"
    116            else:
    117                str_set = "transitThrottleAircraft=%d" % (enum_throttle.value-1)
    118        elif unit_category == ElementType.Ship:
    119            if enum_throttle.value == 0:
    120                str_set = "transitThrottleShip='Unspecified'"
    121            else:
    122                str_set = "transitThrottleShip=%d" % (enum_throttle.value-1)
    123        elif unit_category == ElementType.Submarine:
    124            if enum_throttle.value == 0:
    125                str_set = "transitThrottleSubmarine='Unspecified'"
    126            else:
    127                str_set = "transitThrottleSubmarine=%d" % (enum_throttle.value-1)
    128        else:
    129            raise ValueError("parameter unit_category value error")
    130        return self._set(str_set)
    131
    132    def set_station_throttle(self, enum_throttle, unit_category=ElementType.Aircraft):
    133        """
    134        8、设置任务的阵位油门
    135        :param enum_throttle: 枚举Throttle的值, 油门, global_util.py中定义
    136        :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine
    137        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    138        """
    139        if unit_category == ElementType.Aircraft:
    140            if enum_throttle.value == 0:
    141                str_set = "stationThrottleAircraft='Unspecified'"
    142            else:
    143                str_set = "stationThrottleAircraft=%d" % (enum_throttle.value-1)
    144        elif unit_category == ElementType.Ship:
    145            if enum_throttle.value == 0:
    146                str_set = "stationThrottleShip='Unspecified'"
    147            else:
    148                str_set = "stationThrottleShip=%d" % (enum_throttle.value-1)
    149        elif unit_category == ElementType.Submarine:
    150            if enum_throttle.value == 0:
    151                str_set = "stationThrottleSubmarine='Unspecified'"
    152            else:
    153                str_set = "stationThrottleSubmarine=%d" % (enum_throttle.value-1)
    154        else:
    155            raise ValueError("parameter unit_category value error")
    156        return self._set(str_set)
    157
    158    def set_transit_alt(self, altitude_value, is_submarine=False):
    159        """
    160        9、设置任务的出航高度
    161        :param altitude_value: float, 出航高度， 单位：米，最多6位字符，例：99999.9， 888888
    162        :param is_submarine: bool, 是否出潜深度
    163        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    164        """
    165        if is_submarine:
    166            str_set = "transitDepthSubmarine=%.2lf" % altitude_value
    167        else:
    168            str_set = "transitAltitudeAircraft=%.2lf" % altitude_value
    169        return self._set(str_set)
    170
    171    def set_station_altitude(self, altitude_value, is_submarine=False):
    172        """
    173        10、设置任务的阵位高度
    174        :param altitude_value: float, 阵位高度， 单位：米，最多6位字符
    175        :param is_submarine: bool, 是否出潜深度
    176        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    177        """
    178        if is_submarine:
    179            str_set = "stationDepthSubmarine=%.2lf" % altitude_value
    180        else:
    181            str_set = "stationAltitudeAircraft=%.2lf" % altitude_value
    182        return self._set(str_set)
    183
    184    def set_transit_terrain_following(self, transit_terrain):
    185        """
    186        11、设置出航地形跟随
    187        :param transit_terrain: bool
    188        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    189        """
    190        str_set = "TransitTerrainFollowingAircraft=%s" % str(transit_terrain).lower()
    191        return self._set(str_set)
    192
    193    def set_station_terrain_following(self, station_terrain):
    194        """
    195        12、阵地地形跟随
    196        :param station_terrain: bool
    197        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    198        """
    199        str_set = "stationTerrainFollowingAircraft=%s" % str(station_terrain).lower()
    200        return self._set(str_set)
    201
    202    def mine_clear_set_zone(self, Zone):
    203        """
    204        13、设置排雷任务的区域，按顺序排列的参考点名
    205        :param Zone: 参考点列表, list,
    206        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    207        """
    208        str_set = "Zone=%s" % (str(Zone).replace("[", "{").replace("]", "}"))
    209        return self._set(str_set)

class MineClearMission(engine.LingYi.entitys.mission_common.MissionCommon): View Source

      8class MineClearMission(MissionCommon):
      9    """
     10    排雷任务类
     11    1、三分之一规则
     12    2、设置任务编队规模
     13    3、是否飞机数低于编队规模不允许起飞
     14    4、设置任务舰船/潜艇编队规模
     15    5、是否舰船/潜艇数低于编队规模不允许出发
     16    6、设置清雷任务所需最少飞机数
     17    7、设置任务的出航油门
     18    8、设置任务的阵位油门
     19    9、设置任务的出航高度
     20    10、设置任务的阵位高度
     21    11、设置出航地形跟随
     22    12、阵地地形跟随
     23    13、设置排雷任务的区域，按顺序排列的参考点名
     24
     25    示例：
     26    mission = self.get_mission_by_name('mineclear_mission')   # 通过排雷任务的名字  获取排雷任务对象
     27    mission.set_one_third_rule(True)  # 三分之一规则 开启
     28    mission.set_start('05/24/2014 16:05:00')  # 设置任务开始时间 mission.py中接口
     29    """
     30    def __init__(self, guid, name, side_name):
     31        MissionCommon.__init__(self, guid, name, side_name, ElementType.MineClearMission)
     32        self.Type = 0  # 任务子类型(无）
     33        self.Area = []  # 排雷区域--参考点guid列表
     34        self.OTR = False  # OneThirdRule
     35        self.TransitThrottleAircraft = 0  # 运输油门_飞机
     36        self.StationThrottleAircraft = 0  # 阵位油门_飞机
     37        self.TransitAltitudeAircraft = 0.0  # 运输高度_飞机
     38        self.StationAltitudeAircraft = 0.0  # 阵位高度_飞机
     39        self.TransitTerrainFollowingAircraft = False  # 运输地形跟随_飞机
     40        self.StationTerrainFollowingAircraft = False  # 阵位地形跟随_飞机
     41        self.TransitThrottleSubmarine = 0  # 运输油门_潜艇
     42        self.StationThrottleSubmarine = 0  # 阵位油门_潜艇
     43        self.TransitDepthSubmarine = 0.0  # 9999表示无设置  // 运输深度_潜艇
     44        self.StationDepthSubmarine = 0.0  # 阵位深度_潜艇
     45        self.TransitThrottleShip = 0  # 运输油门_舰船
     46        self.StationThrottleShip = 0  # 阵位油门_舰船
     47        self.TransitThrottleFacility = 0  # 运输油门_设施
     48        self.StationThrottleFacility = 0  # 阵位油门_设施
     49        self.FormationCruise = 0  # 巡航队形
     50        self.FormationAttack = 0  # 攻击队形
     51        self.MinAircraftReq = 0  # 最小飞机数量
     52
     53    def set_one_third_rule(self, one_third):
     54        """
     55        1、三分之一规则
     56        :param one_third: bool, True,设置三分之一规则  False:不遵守三分之一规则
     57        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     58        """
     59        str_set = "oneThirdRule=%s" % (str(one_third).lower())
     60        return self._set(str_set)
     61
     62    def set_flight_size(self, enum_flight_size):
     63        """
     64        2、设置任务编队规模
     65        :param enum_flight_size:FlightSize, 编队规模, global_util.py中定义
     66        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     67        """
     68        str_set = "flightSize=%d" % enum_flight_size.value
     69        return self._set(str_set)
     70
     71    def use_flight_size(self, use_flight_size):
     72        """
     73        3、是否飞机数低于编队规模不允许起飞
     74        :param use_flight_size: bool, True:是
     75        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     76        """
     77        str_set = "useFlightSize=%s" % str(use_flight_size).lower()
     78        return self._set(str_set)
     79
     80    def set_group_size(self, enum_group_size):
     81        """
     82        4、设置任务舰船/潜艇编队规模
     83        :param enum_group_size:GroupSize, 舰船/潜艇编队规模, global_util.py中定义
     84        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     85        """
     86        str_set = "groupSize=%d" % enum_group_size.value
     87        return self._set(str_set)
     88
     89    def use_group_size(self, use_group_size):
     90        """
     91        5、是否舰船/潜艇数低于编队规模不允许出发
     92        :param use_group_size: bool, True:是
     93        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     94        """
     95        str_set = "useGroupSize=%s" % str(use_group_size).lower()
     96        return self._set(str_set)
     97
     98    def set_minaircraft(self, min_aircraft):
     99        """
    100        6、设置清雷任务所需最少飞机数
    101        :param min_aircraft:枚举MinAircraftReq的值, global_util.py中定义
    102        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    103        """
    104        str_set = "minaircraftreq=%d" % min_aircraft.value
    105        return self._set(str_set)
    106
    107    def set_transit_throttle(self, enum_throttle, unit_category=ElementType.Aircraft):
    108        """
    109        7、设置任务的出航油门
    110        :param enum_throttle:枚举Throttle的值, 油门, global_util.py中定义
    111        :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine
    112        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    113        """
    114        if unit_category == ElementType.Aircraft:
    115            if enum_throttle.value == 0:
    116                str_set = "transitThrottleAircraft='Unspecified'"
    117            else:
    118                str_set = "transitThrottleAircraft=%d" % (enum_throttle.value-1)
    119        elif unit_category == ElementType.Ship:
    120            if enum_throttle.value == 0:
    121                str_set = "transitThrottleShip='Unspecified'"
    122            else:
    123                str_set = "transitThrottleShip=%d" % (enum_throttle.value-1)
    124        elif unit_category == ElementType.Submarine:
    125            if enum_throttle.value == 0:
    126                str_set = "transitThrottleSubmarine='Unspecified'"
    127            else:
    128                str_set = "transitThrottleSubmarine=%d" % (enum_throttle.value-1)
    129        else:
    130            raise ValueError("parameter unit_category value error")
    131        return self._set(str_set)
    132
    133    def set_station_throttle(self, enum_throttle, unit_category=ElementType.Aircraft):
    134        """
    135        8、设置任务的阵位油门
    136        :param enum_throttle: 枚举Throttle的值, 油门, global_util.py中定义
    137        :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine
    138        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    139        """
    140        if unit_category == ElementType.Aircraft:
    141            if enum_throttle.value == 0:
    142                str_set = "stationThrottleAircraft='Unspecified'"
    143            else:
    144                str_set = "stationThrottleAircraft=%d" % (enum_throttle.value-1)
    145        elif unit_category == ElementType.Ship:
    146            if enum_throttle.value == 0:
    147                str_set = "stationThrottleShip='Unspecified'"
    148            else:
    149                str_set = "stationThrottleShip=%d" % (enum_throttle.value-1)
    150        elif unit_category == ElementType.Submarine:
    151            if enum_throttle.value == 0:
    152                str_set = "stationThrottleSubmarine='Unspecified'"
    153            else:
    154                str_set = "stationThrottleSubmarine=%d" % (enum_throttle.value-1)
    155        else:
    156            raise ValueError("parameter unit_category value error")
    157        return self._set(str_set)
    158
    159    def set_transit_alt(self, altitude_value, is_submarine=False):
    160        """
    161        9、设置任务的出航高度
    162        :param altitude_value: float, 出航高度， 单位：米，最多6位字符，例：99999.9， 888888
    163        :param is_submarine: bool, 是否出潜深度
    164        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    165        """
    166        if is_submarine:
    167            str_set = "transitDepthSubmarine=%.2lf" % altitude_value
    168        else:
    169            str_set = "transitAltitudeAircraft=%.2lf" % altitude_value
    170        return self._set(str_set)
    171
    172    def set_station_altitude(self, altitude_value, is_submarine=False):
    173        """
    174        10、设置任务的阵位高度
    175        :param altitude_value: float, 阵位高度， 单位：米，最多6位字符
    176        :param is_submarine: bool, 是否出潜深度
    177        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    178        """
    179        if is_submarine:
    180            str_set = "stationDepthSubmarine=%.2lf" % altitude_value
    181        else:
    182            str_set = "stationAltitudeAircraft=%.2lf" % altitude_value
    183        return self._set(str_set)
    184
    185    def set_transit_terrain_following(self, transit_terrain):
    186        """
    187        11、设置出航地形跟随
    188        :param transit_terrain: bool
    189        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    190        """
    191        str_set = "TransitTerrainFollowingAircraft=%s" % str(transit_terrain).lower()
    192        return self._set(str_set)
    193
    194    def set_station_terrain_following(self, station_terrain):
    195        """
    196        12、阵地地形跟随
    197        :param station_terrain: bool
    198        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    199        """
    200        str_set = "stationTerrainFollowingAircraft=%s" % str(station_terrain).lower()
    201        return self._set(str_set)
    202
    203    def mine_clear_set_zone(self, Zone):
    204        """
    205        13、设置排雷任务的区域，按顺序排列的参考点名
    206        :param Zone: 参考点列表, list,
    207        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    208        """
    209        str_set = "Zone=%s" % (str(Zone).replace("[", "{").replace("]", "}"))
    210        return self._set(str_set)

排雷任务类
1、三分之一规则
2、设置任务编队规模
3、是否飞机数低于编队规模不允许起飞
4、设置任务舰船/潜艇编队规模
5、是否舰船/潜艇数低于编队规模不允许出发
6、设置清雷任务所需最少飞机数
7、设置任务的出航油门
8、设置任务的阵位油门
9、设置任务的出航高度
10、设置任务的阵位高度
11、设置出航地形跟随
12、阵地地形跟随
13、设置排雷任务的区域，按顺序排列的参考点名

示例：
mission = self.get_mission_by_name('mineclear_mission') # 通过排雷任务的名字 获取排雷任务对象
mission.set_one_third_rule(True) # 三分之一规则 开启
mission.set_start('05/24/2014 16:05:00') # 设置任务开始时间 mission.py中接口

MineClearMission(guid, name, side_name) View Source

    30    def __init__(self, guid, name, side_name):
    31        MissionCommon.__init__(self, guid, name, side_name, ElementType.MineClearMission)
    32        self.Type = 0  # 任务子类型(无）
    33        self.Area = []  # 排雷区域--参考点guid列表
    34        self.OTR = False  # OneThirdRule
    35        self.TransitThrottleAircraft = 0  # 运输油门_飞机
    36        self.StationThrottleAircraft = 0  # 阵位油门_飞机
    37        self.TransitAltitudeAircraft = 0.0  # 运输高度_飞机
    38        self.StationAltitudeAircraft = 0.0  # 阵位高度_飞机
    39        self.TransitTerrainFollowingAircraft = False  # 运输地形跟随_飞机
    40        self.StationTerrainFollowingAircraft = False  # 阵位地形跟随_飞机
    41        self.TransitThrottleSubmarine = 0  # 运输油门_潜艇
    42        self.StationThrottleSubmarine = 0  # 阵位油门_潜艇
    43        self.TransitDepthSubmarine = 0.0  # 9999表示无设置  // 运输深度_潜艇
    44        self.StationDepthSubmarine = 0.0  # 阵位深度_潜艇
    45        self.TransitThrottleShip = 0  # 运输油门_舰船
    46        self.StationThrottleShip = 0  # 阵位油门_舰船
    47        self.TransitThrottleFacility = 0  # 运输油门_设施
    48        self.StationThrottleFacility = 0  # 阵位油门_设施
    49        self.FormationCruise = 0  # 巡航队形
    50        self.FormationAttack = 0  # 攻击队形
    51        self.MinAircraftReq = 0  # 最小飞机数量

Type
Area
OTR
TransitThrottleAircraft
StationThrottleAircraft
TransitAltitudeAircraft
StationAltitudeAircraft
TransitTerrainFollowingAircraft
StationTerrainFollowingAircraft
TransitThrottleSubmarine
StationThrottleSubmarine
TransitDepthSubmarine
StationDepthSubmarine
TransitThrottleShip
StationThrottleShip
TransitThrottleFacility
StationThrottleFacility
FormationCruise
FormationAttack
MinAircraftReq
def set_one_third_rule(self, one_third): View Source

    53    def set_one_third_rule(self, one_third):
    54        """
    55        1、三分之一规则
    56        :param one_third: bool, True,设置三分之一规则  False:不遵守三分之一规则
    57        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    58        """
    59        str_set = "oneThirdRule=%s" % (str(one_third).lower())
    60        return self._set(str_set)

1、三分之一规则 :param one_third: bool, True,设置三分之一规则 False:不遵守三分之一规则 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_flight_size(self, enum_flight_size): View Source

    62    def set_flight_size(self, enum_flight_size):
    63        """
    64        2、设置任务编队规模
    65        :param enum_flight_size:FlightSize, 编队规模, global_util.py中定义
    66        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    67        """
    68        str_set = "flightSize=%d" % enum_flight_size.value
    69        return self._set(str_set)

2、设置任务编队规模 :param enum_flight_size:FlightSize, 编队规模, global_util.py中定义 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def use_flight_size(self, use_flight_size): View Source

    71    def use_flight_size(self, use_flight_size):
    72        """
    73        3、是否飞机数低于编队规模不允许起飞
    74        :param use_flight_size: bool, True:是
    75        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    76        """
    77        str_set = "useFlightSize=%s" % str(use_flight_size).lower()
    78        return self._set(str_set)

3、是否飞机数低于编队规模不允许起飞 :param use_flight_size: bool, True:是 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_group_size(self, enum_group_size): View Source

    80    def set_group_size(self, enum_group_size):
    81        """
    82        4、设置任务舰船/潜艇编队规模
    83        :param enum_group_size:GroupSize, 舰船/潜艇编队规模, global_util.py中定义
    84        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    85        """
    86        str_set = "groupSize=%d" % enum_group_size.value
    87        return self._set(str_set)

4、设置任务舰船/潜艇编队规模 :param enum_group_size:GroupSize, 舰船/潜艇编队规模, global_util.py中定义 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def use_group_size(self, use_group_size): View Source

    89    def use_group_size(self, use_group_size):
    90        """
    91        5、是否舰船/潜艇数低于编队规模不允许出发
    92        :param use_group_size: bool, True:是
    93        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    94        """
    95        str_set = "useGroupSize=%s" % str(use_group_size).lower()
    96        return self._set(str_set)

5、是否舰船/潜艇数低于编队规模不允许出发 :param use_group_size: bool, True:是 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_minaircraft(self, min_aircraft): View Source

     98    def set_minaircraft(self, min_aircraft):
     99        """
    100        6、设置清雷任务所需最少飞机数
    101        :param min_aircraft:枚举MinAircraftReq的值, global_util.py中定义
    102        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    103        """
    104        str_set = "minaircraftreq=%d" % min_aircraft.value
    105        return self._set(str_set)

6、设置清雷任务所需最少飞机数 :param min_aircraft:枚举MinAircraftReq的值, global_util.py中定义 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_transit_throttle(self, enum_throttle, unit_category=<ElementType.Aircraft: 31>): View Source

    107    def set_transit_throttle(self, enum_throttle, unit_category=ElementType.Aircraft):
    108        """
    109        7、设置任务的出航油门
    110        :param enum_throttle:枚举Throttle的值, 油门, global_util.py中定义
    111        :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine
    112        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    113        """
    114        if unit_category == ElementType.Aircraft:
    115            if enum_throttle.value == 0:
    116                str_set = "transitThrottleAircraft='Unspecified'"
    117            else:
    118                str_set = "transitThrottleAircraft=%d" % (enum_throttle.value-1)
    119        elif unit_category == ElementType.Ship:
    120            if enum_throttle.value == 0:
    121                str_set = "transitThrottleShip='Unspecified'"
    122            else:
    123                str_set = "transitThrottleShip=%d" % (enum_throttle.value-1)
    124        elif unit_category == ElementType.Submarine:
    125            if enum_throttle.value == 0:
    126                str_set = "transitThrottleSubmarine='Unspecified'"
    127            else:
    128                str_set = "transitThrottleSubmarine=%d" % (enum_throttle.value-1)
    129        else:
    130            raise ValueError("parameter unit_category value error")
    131        return self._set(str_set)

7、设置任务的出航油门 :param enum_throttle:枚举Throttle的值, 油门, global_util.py中定义 :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_station_throttle(self, enum_throttle, unit_category=<ElementType.Aircraft: 31>): View Source

    133    def set_station_throttle(self, enum_throttle, unit_category=ElementType.Aircraft):
    134        """
    135        8、设置任务的阵位油门
    136        :param enum_throttle: 枚举Throttle的值, 油门, global_util.py中定义
    137        :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine
    138        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    139        """
    140        if unit_category == ElementType.Aircraft:
    141            if enum_throttle.value == 0:
    142                str_set = "stationThrottleAircraft='Unspecified'"
    143            else:
    144                str_set = "stationThrottleAircraft=%d" % (enum_throttle.value-1)
    145        elif unit_category == ElementType.Ship:
    146            if enum_throttle.value == 0:
    147                str_set = "stationThrottleShip='Unspecified'"
    148            else:
    149                str_set = "stationThrottleShip=%d" % (enum_throttle.value-1)
    150        elif unit_category == ElementType.Submarine:
    151            if enum_throttle.value == 0:
    152                str_set = "stationThrottleSubmarine='Unspecified'"
    153            else:
    154                str_set = "stationThrottleSubmarine=%d" % (enum_throttle.value-1)
    155        else:
    156            raise ValueError("parameter unit_category value error")
    157        return self._set(str_set)

8、设置任务的阵位油门 :param enum_throttle: 枚举Throttle的值, 油门, global_util.py中定义 :param unit_category:ElementType.Aircraft, or ElementType.Ship, or ElementType.Submarine :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_transit_alt(self, altitude_value, is_submarine=False): View Source

    159    def set_transit_alt(self, altitude_value, is_submarine=False):
    160        """
    161        9、设置任务的出航高度
    162        :param altitude_value: float, 出航高度， 单位：米，最多6位字符，例：99999.9， 888888
    163        :param is_submarine: bool, 是否出潜深度
    164        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    165        """
    166        if is_submarine:
    167            str_set = "transitDepthSubmarine=%.2lf" % altitude_value
    168        else:
    169            str_set = "transitAltitudeAircraft=%.2lf" % altitude_value
    170        return self._set(str_set)

9、设置任务的出航高度 :param altitude_value: float, 出航高度， 单位：米，最多6位字符，例：99999.9， 888888 :param is_submarine: bool, 是否出潜深度 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_station_altitude(self, altitude_value, is_submarine=False): View Source

    172    def set_station_altitude(self, altitude_value, is_submarine=False):
    173        """
    174        10、设置任务的阵位高度
    175        :param altitude_value: float, 阵位高度， 单位：米，最多6位字符
    176        :param is_submarine: bool, 是否出潜深度
    177        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    178        """
    179        if is_submarine:
    180            str_set = "stationDepthSubmarine=%.2lf" % altitude_value
    181        else:
    182            str_set = "stationAltitudeAircraft=%.2lf" % altitude_value
    183        return self._set(str_set)

10、设置任务的阵位高度 :param altitude_value: float, 阵位高度， 单位：米，最多6位字符 :param is_submarine: bool, 是否出潜深度 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_transit_terrain_following(self, transit_terrain): View Source

    185    def set_transit_terrain_following(self, transit_terrain):
    186        """
    187        11、设置出航地形跟随
    188        :param transit_terrain: bool
    189        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    190        """
    191        str_set = "TransitTerrainFollowingAircraft=%s" % str(transit_terrain).lower()
    192        return self._set(str_set)

11、设置出航地形跟随 :param transit_terrain: bool :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_station_terrain_following(self, station_terrain): View Source

    194    def set_station_terrain_following(self, station_terrain):
    195        """
    196        12、阵地地形跟随
    197        :param station_terrain: bool
    198        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    199        """
    200        str_set = "stationTerrainFollowingAircraft=%s" % str(station_terrain).lower()
    201        return self._set(str_set)

12、阵地地形跟随 :param station_terrain: bool :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def mine_clear_set_zone(self, Zone): View Source

    203    def mine_clear_set_zone(self, Zone):
    204        """
    205        13、设置排雷任务的区域，按顺序排列的参考点名
    206        :param Zone: 参考点列表, list,
    207        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    208        """
    209        str_set = "Zone=%s" % (str(Zone).replace("[", "{").replace("]", "}"))
    210        return self._set(str_set)

13、设置排雷任务的区域，按顺序排列的参考点名 :param Zone: 参考点列表, list, :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

##### Inherited Members

engine.LingYi.entitys.mission_common.MissionCommon
  use_refuel_unrep
  use_tanker
  set_mission_launchMissionWithoutTankersInPlace
  set_mission_tankerMissionList
  set_mission_tankerMinNumber_total
  set_mission_tankerMinNumber_airborne
  set_mission_tankerMinNumber_station
  set_mission_maxReceiversInQueuePerTanker_airborne
  set_mission_fuelQtyToStartLookingForTanker_airborne
  set_mission_TankerFollowsReceiverse
  set_mission_tankerMaxDistance_airborne
engine.LingYi.entitys.mission.Mission
  Category
  Status
  START
  END
  TakeOffTime
  TimeOnTarget
  SISIH
  UseFlightplan
  UseFlightplansOnly
  IncludeInATO
  TankerUsage
  TankerMissionList
  FlightSize
  GroupSize
  GroupName
  DeactivationUnassignUnits
  CheckBoxOrderRTB
  CheckBoxDeleteMission
  LaunchMissionWithoutTankersInPlace
  TankerMinNumberTotal
  TankerMinNumberAirborne
  TankerMinNumberStation
  MaxReceiversInQueuePerTankerAirborne
  FuelQtyToStartLookingForTankerAirborne
  TankerMaxDistanceAirborne
  TankerFollowsReceivers
  UseFlightSizeHardLimit
  UseGroupSizeHardLimit
  Flight
  EmptySlotsList
  ListNavigation1
  ListNavigation2
  ListNavigation3
  mission_active
  set_start
  set_end
  set_switch_radar
  assign_unit
  get_units_assigned
  unassign_unit
  set_mission_course
  set_mission_newname
  set_groupName
engine.LingYi.entitys.operatorbase.DoctrineOperator
  Doctrine
  category
  category_str
  doctrine_switch_radar
  doctrine_switch_oecm
  doctrine_switch_sonar
  doctrine_SetEMCON_Inherit
  use_nuclear_weapons
  doctrine_weapon_control_status_air
  doctrine_weapon_control_status_surface
  doctrine_weapon_control_status_subsurface
  doctrine_weapon_control_status_land
  doctrine_ignore_plotted_course
  doctrine_engaging_ambiguous_targets
  doctrine_engage_opportunity_targets
  doctrine_ignore_emcon_under_attack
  torpedoes_kinematic_range
  doctrine_automatic_evasion
  doctrine_refuel
  doctrine_refuel_select
  doctrine_refuel_allied
  doctrine_air_operations_tempo
  doctrine_quick_turnaround
  doctrine_fuel_state_planned
  doctrine_fuel_state_rtb
  doctrine_weapon_state_planned
  doctrine_weapon_state_rtb
  doctrine_gun_strafing
  doctrine_jettison_ordnance
  doctrine_bvr_logic
  use_sams_in_anti_surface_mode
  doctrine_maintain_standoff
  doctrine_navigation_surface_mode
  avoid_contact
  dive_on_threat
  recharge_on_patrol
  recharge_on_attack
  use_aip
  dipping_sonar
  navigation_sub
  navigation_land
  set_weapon_release_authority
  wra_qty_salvo
  wra_shooter_salvo
  wra_firing_range
  wra_self_defence_distance
  withdraw_on_damage
  withdraw_on_fuel
  withdraw_on_attack
  withdraw_on_defence
  deploy_on_damage
  deploy_on_fuel
  deploy_on_attack
  deploy_on_defence
  get_doctrineWRA
engine.LingYi.entitys.element.Element
  ID
  Name
  Side
  ElementType
  delete_sub_object