# engine.LingYi.entitys.satellite

View Source

     1# -*- coding:utf-8 -*-
     2# Author: Liaojiang
     3
     4from .global_util import *
     5from .unit import Unit
     6
     7
     8class Satellite(Unit):
     9    """
    10    卫星类
    11    1、获取精简信息, 提炼信息进行决策
    12
    13    示例：
    14    satellite_id = "sflsf0-gjlsf-sf"  # 卫星guid
    15    satellite = self.get_unit(satellite_id)  # 获取卫星对象
    16    if satellite is not None:
    17        reply = satellite.EMCON_Obey_doctrine(False)  # 设置卫星不遵循电磁管控条令
    18        reply = satellite.switch_radar(True)  # 设置卫星开启雷达
    19    """
    20    def __init__(self, guid, name, side_name):
    21        Unit.__init__(self, guid, name, side_name, ElementType.Satellite)
    22
    23    def get_summary_info(self):
    24        """
    25        获取精简信息, 提炼信息进行决策
    26        :return: dict
    27        """
    28        info_dict = {
    29            "category": "Satellite",
    30            "guid": self.ID,
    31            "dbid": self.DBID,
    32            "name": self.Name,
    33            "lat": self.Lat,
    34            "lon": self.Lon,
    35            "alt": self.CurrentAltitude,
    36            "sensors": self.Sensors
    37        }
    38        return info_dict

class Satellite(engine.LingYi.entitys.unit.Unit): View Source

    10class Satellite(Unit):
    11    """
    12    卫星类
    13    1、获取精简信息, 提炼信息进行决策
    14
    15    示例：
    16    satellite_id = "sflsf0-gjlsf-sf"  # 卫星guid
    17    satellite = self.get_unit(satellite_id)  # 获取卫星对象
    18    if satellite is not None:
    19        reply = satellite.EMCON_Obey_doctrine(False)  # 设置卫星不遵循电磁管控条令
    20        reply = satellite.switch_radar(True)  # 设置卫星开启雷达
    21    """
    22    def __init__(self, guid, name, side_name):
    23        Unit.__init__(self, guid, name, side_name, ElementType.Satellite)
    24
    25    def get_summary_info(self):
    26        """
    27        获取精简信息, 提炼信息进行决策
    28        :return: dict
    29        """
    30        info_dict = {
    31            "category": "Satellite",
    32            "guid": self.ID,
    33            "dbid": self.DBID,
    34            "name": self.Name,
    35            "lat": self.Lat,
    36            "lon": self.Lon,
    37            "alt": self.CurrentAltitude,
    38            "sensors": self.Sensors
    39        }
    40        return info_dict

卫星类
1、获取精简信息, 提炼信息进行决策

示例：
satellite_id = "sflsf0-gjlsf-sf" # 卫星guid
satellite = self.get_unit(satellite_id) # 获取卫星对象
if satellite is not None:
reply = satellite.EMCON_Obey_doctrine(False) # 设置卫星不遵循电磁管控条令
reply = satellite.switch_radar(True) # 设置卫星开启雷达

Satellite(guid, name, side_name) View Source

    22    def __init__(self, guid, name, side_name):
    23        Unit.__init__(self, guid, name, side_name, ElementType.Satellite)

def get_summary_info(self): View Source

    25    def get_summary_info(self):
    26        """
    27        获取精简信息, 提炼信息进行决策
    28        :return: dict
    29        """
    30        info_dict = {
    31            "category": "Satellite",
    32            "guid": self.ID,
    33            "dbid": self.DBID,
    34            "name": self.Name,
    35            "lat": self.Lat,
    36            "lon": self.Lon,
    37            "alt": self.CurrentAltitude,
    38            "sensors": self.Sensors
    39        }
    40        return info_dict

获取精简信息, 提炼信息进行决策 :return: dict

##### Inherited Members

engine.LingYi.entitys.unit.Unit
  Lon
  Lat
  CurrentAltitude
  CurrentHeading
  Pitch
  Roll
  CurrentSpeed
  Acc
  CargoToMission
  DockingCondition
  Throttle
  Status
  FuelState
  WeaponState
  DesiredSpeed
  DesiredAltitude
  DamagePts
  DamagePercent
  AssignedMission
  GroupID
  IsAD
  AI
  Weaponry
  Kinematics
  Navigator
  Damage
  Sensory
  CommDevices
  Sensors
  Mounts
  Magazines
  Cargos
  AirFacilitys
  DockFacilitys
  Propulsions
  FuelRecs
  Loadouts
  RangeSymbols
  Source
  CommStuff
  Category
  Type
  DBID
  ProficiencyLevel
  XSections
  UnitType
  get_weapon_info
  get_mounts_weapon_info
  get_way_points_info
  weapon2mount
  get_targets
  EMCON_Obey_doctrine
  switch_radar
  switch_sonar
  switch_OECM
  switch_laser
  attack_auto
  attack_target_info
  attack_manual
  attack_weapon_allocate_to_target
  attack_BOL
  cancel_attack_contact
  chaff_burst
  chaff_continous_burst
  attack_drop_target
  attack_drop_target_all
  deploy_sonar
  set_desired_speed
  set_throttle
  set_alt_manual
  set_desired_height
  follow_terrain
  plotted_course
  clear_plotted_course
  set_weapoint
  set_waypoint_sensor
  set_waypoint_bearings
  return_to_base
  select_new_base
  refuel
  hold_positon
  assign_to_mission
  assign_to_mission_escort
  withdraw_from_mission
  weapon_reload_priority
  cargo_load_ops
  get_way_point
  set_attack_course
  set_weapon_course
engine.LingYi.entitys.gameunit.GameUnit
  secure_key2
  secure_key
  check_id_api
  get_key
  set_key
  clear_key
  delete_sub_object
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