Scenario

bsk_rl.scene provides scenarios, or the underlying environment in which the satellite can collect data.

Scenarios typically correspond to certain type(s) of Data & Reward systems. The following scenarios have been implemented:

class Scenario[source]

Bases: ABC, Resetable

Base scenario class.

Link the environment satellite list to the scenario.

Parameters:

satellites (list[Satellite]) – List of satellites to communicate between.

Return type:

None

class UniformTargets(n_targets: int | tuple[int, int], priority_distribution: ~typing.Callable | None = None, radius: float = <MagicMock name='mock.orbitalMotion.REQ_EARTH.__mul__()' id='140018216684656'>)[source]

Bases: Scenario

An environment with evenly-distributed static targets.

Can be used with UniqueImageReward.

Parameters:
  • n_targets (int | tuple[int, int]) – Number of targets to generate. Can also be specified as a range (low, high) where the number of targets generated is uniformly selected low n_targets high.

  • priority_distribution (Callable | None) – Function for generating target priority. Defaults to lambda: uniform(0, 1) if not specified.

  • radius (float) – [m] Radius to place targets from body center. Defaults to Earth’s equatorial radius.

reset_overwrite_previous() None[source]

Overwrite target list from previous episode.

Return type:

None

reset_pre_sim_init() None[source]

Regenerate target set for new episode.

Return type:

None

regenerate_targets() None[source]

Regenerate targets uniformly.

Override this method (as demonstrated in CityTargets) to generate other distributions.

Return type:

None

class CityTargets(n_targets: int | tuple[int, int], n_select_from: int | None = None, location_offset: float = 0, priority_distribution: ~typing.Callable | None = None, radius: float = <MagicMock name='mock.orbitalMotion.REQ_EARTH.__mul__()' id='140018216684656'>)[source]

Bases: UniformTargets

Construct environment with static targets around population centers.

Uses the simplemaps Word Cities Database for population center locations. This data is installed by finish_install.

Parameters:
  • n_targets (int | tuple[int, int]) – Number of targets to generate, as a fixed number or a range.

  • n_select_from (int | None) – Generate targets from the top n_select_from most populous cities. Will use all cities in the database if not specified.

  • location_offset (float) – [m] Offset targets randomly from the city center by up to this amount.

  • priority_distribution (Callable | None) – Function for generating target priority.

  • radius (float) – Radius to place targets from body center.

class UniformNadirScanning(value_per_second: float = 1.0)[source]

Bases: Scenario

Construct uniform data over the surface of the planet.

Can be used with ScanningTimeReward.

Parameters:

value_per_second (float) – Reward per second for imaging nadir.