SatelliteCameraViewer.Cubesat.Cubesat module

Cubesat with rotations using pyvista and shown in a tk window (using Label)

class SatelliteCameraViewer.Cubesat.Cubesat.Cubesat(u=3, width=800, height=800, isometric_view=False, show_axes=False)[source]

Bases: object

Cubesat - Draw a cubesat in 3d via pyvista. This expects to be called with a tk window (using Label) as the location to paint the 3d image.

Methods

apply_orientation([roll, pitch, yaw])

apply_orientation - Rotate the cubesat

render()

render - Do the render of the 3d object.

Cubesat - Draw a cubesat in 3d via pyvista.

Parameters:
  • u (int) – Cubesat U size.

  • width (int) – Width of graphics area.

  • height (int) – Height of graphics area.

  • isometric_view (bool) – If True, visually representing three-dimensional objects in two dimensions.

  • show_axes (bool) – If True, show the pyvista XYZ axis graphic.

Methods

apply_orientation([roll, pitch, yaw])

apply_orientation - Rotate the cubesat

render()

render - Do the render of the 3d object.

CM = 0.01

CM - Centimeter (with Meter == 1).

MM = 0.001

MM - Milimeter (with Meter == 1).

U = 0.1

U - Size of a single U (in Meters) from the Cubesat definition.

apply_orientation(roll=0.0, pitch=0.0, yaw=0.0)[source]

apply_orientation - Rotate the cubesat

Parameters:
  • roll (float) – Roll.

  • pitch (float) – Pitch.

  • yaw (float) – Yaw.

render()[source]

render - Do the render of the 3d object.

Returns:

The image of the 3d object as a screenshot from the current camera position.

Type:

pyvista.pyvista_ndarray

class SatelliteCameraViewer.Cubesat.Cubesat.CubesatViewer[source]

Bases: object

Methods

update_orientation([roll, pitch, yaw])

update_orientation - Rotate the cubesat

CubesatViewer

Parameters:
  • u (int) – Cubesat U size.

  • cubesat (Cubesat) – prebuilt Cubesat or None

  • image_canvas (tk.Label) – tk label to paint into

  • width (int) – Width of graphics area.

  • height (int) – Height of graphics area.

  • isometric_view (bool) – If True, visually representing three-dimensional objects in two dimensions.

  • show_axes (bool) – If True, show the pyvista XYZ axis graphic.

Methods

update_orientation([roll, pitch, yaw])

update_orientation - Rotate the cubesat

update_orientation(roll: float = 0.0, pitch: float = 0.0, yaw: float = 0.0)[source]

update_orientation - Rotate the cubesat

Parameters:
  • roll (float) – Roll.

  • pitch (float) – Pitch.

  • yaw (float) – Yaw.

class SatelliteCameraViewer.Cubesat.Cubesat.WDH(w: float = 0.0, d: float = 0.0, h: float = 0.0)[source]

Bases: object

WDH - Width, Depth, Height - used to store sizes of satellite cube.

Parameters:
  • w (float) – Width.

  • d (float) – Height.

  • h (float) – Depth.

Used intenally to Cubesat class, not really useful outside of core Cubesat code.

Attributes:
array

array - return [w, d, h] as an array.

property array

array - return [w, d, h] as an array.

Returns:

[w, d, h] as an array

Type:

list[float] | np.array

d: float = 0.0

d - Depth.

h: float = 0.0

h - Height.

w: float = 0.0

w - Width.