Rendering
rendering.Trajectory3DPlotter module
- class rendering.Trajectory3DPlotter.Trajectory3DPlotter(ax, radius, goal, dt, episode_length)[source]
Bases:
object
Handles the 3D visualization of balloon trajectories, including altitude plots and goal radius visualization.
- ax
3D axes object for plotting.
- Type:
matplotlib.axes._axes.Axes
- radius
Radius of the target zone in meters.
- Type:
float
- radius_inner
Inner radius for visualizing proximity to the goal.
- Type:
float
- radius_outer
Outer radius for visualizing extended proximity.
- Type:
float
- goal
Dictionary containing the goal’s x and y coordinates.
- Type:
dict
- dt
Time step of the simulation.
- Type:
float
- episode_length
Total length of the episode in steps.
- Type:
int
- plot_circle(ax, center_x, center_y, radius, plane='xy', color='g--')[source]
Plot a circle at the centered base of the the XY plane
- Parameters:
ax (matplotlib.axes._axes.Axes) – Axes object for plotting.
center_x (float) – X-coordinate of the circle center.
center_y (float) – Y-coordinate of the circle center.
radius (float) – Radius of the circle.
plane (str, optional) – Plane in which to plot the circle (‘xy’ by default).
color (str, optional) – Color and style of the circle.
- update(Balloon, path, goal)[source]
Update the trajectory plot with the current state and path.
- Parameters:
Balloon (object) – Current state of the balloon, including x, y, and altitude.
path (numpy.ndarray) – Array of x, y, altitude coordinates representing the path.
goal (dict) – Dictionary containing the goal’s x and y coordinates.
rendering.renderer module
rendering.renderer_old module
This module is excluded from the index.
rendering.renderertriple module
- class rendering.renderertriple.MatplotlibRendererTriple(Forecast_visualizer_ERA5, Forecast_visualizer_SYNTH, render_mode, radius, coordinate_system='geographic')[source]
Bases:
object
Handles the visualization of ERA5 and Synthetic forecasts using 3D quiver plots and trajectory visualization.
- coordinate_system
Coordinate system used for visualization (‘geographic’ or ‘cartesian’).
- Type:
str
- Forecast_visualizer
Visualizer for ERA5 forecasts.
- Type:
object
- Forecast_visualizer_synth
Visualizer for synthetic forecasts.
- Type:
object
- render_count
Frequency of rendering updates.
- Type:
int
- quiver_skip
Frequency of skipping quivers in plots for performance.
- Type:
int
- render_mode
Rendering mode (‘human’, etc.).
- Type:
str
- render_timestamp
Timestamp for ERA5 rendering.
- Type:
numpy.datetime64
- render_timestamp_synth
Timestamp for synthetic rendering.
- Type:
numpy.datetime64
- dt
Time step of the simulation.
- Type:
float
- episode_length
Total steps in an episode.
- Type:
int
- goal
Goal position (x, y).
- Type:
dict
- radius
Station-keeping radius.
- Type:
float
- radius_inner
Inner radius for goal visualization.
- Type:
float
- radius_outer
Outer radius for goal visualization.
- Type:
float
- trajectory_plotter
Handles trajectory visualization.
- Type:
- is_timestamp_in_interval(timestamp, interval)[source]
Check if a timestamp falls within a specified interval.
- Parameters:
timestamp (datetime.datetime) – Timestamp to check.
interval (int) – Interval in hours.
- Returns:
True if timestamp falls within the interval, False otherwise.
- Return type:
bool
- render(mode='human')[source]
Render the simulation environment.
- Parameters:
mode (str, optional) – Rendering mode (‘human’, etc.).