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.

For Earth observation, the following scenarios have been implemented:

For RSO Inspection tasks, the following scenario has been implemented:

  • SphericalRSO: A RSO with spherical points and radial normals.

These RSO scenarios can be used with RSOInspectionReward.

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: Callable | None = None, radius: float = 6378136.6)[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

reset_during_sim_init() None[source]

Visualize targets in Vizard on reset.

Return type:

None

visualize_target(target, vizSupport=None, vizInstance=None)[source]

Visualize target in Vizard.

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: Callable | None = None, radius: float = 6378136.6)[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.

class RSOPoints[source]

Bases: Scenario

reset_overwrite_previous() None[source]

Overwrite target list from previous episode.

Return type:

None

reset_pre_sim_init() None[source]

Identify RSO and Inspector satellites.

Return type:

None

reset_during_sim_init() None[source]

Add points to dynamics and fsw of RSO.

Return type:

None

visualize_rso_point(rso_point: RSOPoint, vizSupport=None, vizInstance=None)[source]

Visualize target in Vizard.

Parameters:

rso_point (RSOPoint)

setup_inspector_camera(inspector: Satellite, vizSupport=None, vizInstance=None) None[source]

Visualize camera view in Vizard panel.

Parameters:

inspector (Satellite)

Return type:

None

abstract generate_points() list[RSOPoint][source]

Generate a list of RSOPoint objects based on some spacecraft geometry.

Return type:

list[RSOPoint]

class SphericalRSO(n_points: int = 100, radius: float = 1.0, theta_max: float = np.float64(0.7853981633974483), range_max: float = -1, theta_solar_max: float = np.float64(1.0471975511965976), min_shadow_factor: float = 0.1)[source]

Bases: RSOPoints

Generate points on a sphere using the Fibonacci sphere method.

Parameters:
  • n_points (int) – Number of points to generate on the sphere.

  • radius (float) – [m] Radius of the sphere.

  • theta_max (float) – [rad] Maximum angle from the normal for inspection.

  • range_max (float) – [m] Maximum range for inspection.

  • theta_solar_max (float) – [rad] Minimum solar incidence angle for illumination.

  • min_shadow_factor (float) – Minimum shadow factor for imaging.

generate_points() list[RSOPoint][source]

Generate a list of RSOPoint objects on a sphere.

Return type:

list[RSOPoint]