Balloon and Simulator State

class balloon.BalloonState(x=None, y=None, altitude=None, x_vel=None, y_vel=None, z_vel=None, distance=None, lat=None, lon=None, rel_bearing=None, pressure=None)[source]

Represents the state of a high-altitude balloon during a simulation.

Parameters:
  • x (float) – Relative x position in meters (converted from latitude/longitude).

  • y (float) – Relative y position in meters (converted from latitude/longitude).

  • altitude (float) – Absolute altitude of the balloon in meters.

  • x_vel (float) – Current velocity in the x direction (m/s).

  • y_vel (float) – Current velocity in the y direction (m/s).

  • z_vel (float) – Current ascent/descent velocity (m/s).

  • lat (float) – Current latitude of the balloon.

  • lon (float) – Current longitude of the balloon.

  • distance (float) – Distance to the station in the XY plane (meters).

  • rel_bearing (float) – Relative bearing of the motion direction with respect to the station.

  • pressure (float) – Atmospheric pressure around the balloon (currently unused).

__init__(x=None, y=None, altitude=None, x_vel=None, y_vel=None, z_vel=None, distance=None, lat=None, lon=None, rel_bearing=None, pressure=None)[source]
update(**kwargs)[source]

Update the attributes of the balloon state.

Parameters:

kwargs (dict) – Key-value pairs representing attributes to update.

class balloon.SimulatorState(Balloon, timestamp)[source]

Stores and updates overall state of the simulator.

Parameters:
  • Balloon (BalloonState) – The initial state of the balloon.

  • timestamp (pd.Timestamp) – The start time of the simulation.

Variables:
  • Balloon (BalloonState) – Current state of the balloon.

  • timestamp (pd.Timestamp) – Current simulation timestamp.

  • dt (float) – Time step duration.

  • total_steps (int) – Total number of steps taken in the simulation.

  • episode_length (int) – Maximum number of steps in the simulation.

  • trajectory (list) – List of balloon positions (x, y, altitude) over time.

  • time_history (list) – List of timestamps corresponding to each step.

__init__(Balloon, timestamp)[source]
step(Balloon)[source]

Advance the simulator state by one step.

Parameters:

Balloon (BalloonState) – The current state of the balloon.

Returns:

True if the episode is complete, False otherwise.

Return type:

bool

class balloon.AltitudeControlCommand(value)[source]

Enum representing altitude control commands.

Variables:
  • DOWN – Command to decrease altitude.

  • STAY – Command to maintain current altitude.

  • UP – Command to increase altitude.