API Reference

Types

KiteViewers.AbstractKiteViewerType
abstract type AbstractKiteViewer

All kite viewers must inherit from this type. All methods that are defined on this type must work with all kite viewers. All exported methods must work on this type.

source

Functions

KiteViewers.clear_viewerFunction
clear_viewer(kv::AKV; stop_=true)

Reset the viewer to its initial state by setting the step counter to 1 and the accumulated energy to zero. By default, the simulation is also stopped (status set to "Stopped" and running set to false). Pass stop_=false to reset the counters without stopping.

Arguments

  • kv::AKV: the kite viewer instance.

Keyword Arguments

  • stop_=true: whether to call stop(kv) after resetting.
source
KiteViewers.update_systemFunction
update_system(kv::AKV, state::SysState; scale=1.0, kite_scale=1.0, ned=true, 
              wind=[:v_wind_200m, :v_wind_kite])

Update the 3D visualization of the kite power system, including the tether, kite, and status text.

Moves all tether segment particles and the kite to their new positions based on the given system state, recalculates cylinder positions, sizes, and rotations for the tether rendering, updates the kite orientation, and refreshes the on-screen status text (time, height, elevation, azimuth, forces, power, energy, wind, etc.).

Supports one-point, four-point, and three-line (four-point 3L) kite models.

Arguments

  • kv::AKV: the kite viewer instance.
  • state::SysState: the current system state containing positions, orientation, and flight data.

Keyword Arguments

  • scale=1.0: scaling factor applied to all particle positions.
  • kite_scale=1.0: additional scaling factor for the kite relative to the pod/bridle attachment point.
  • ned=true: if true, convert the orientation quaternion from NED to viewer convention.
  • wind=[:v_wind_200m, :v_wind_kite]: list of wind fields to display in the status text. Supported symbols: :v_wind_gnd, :v_wind_200m, :v_wind_kite.
source
KiteViewers.save_pngFunction
save_png(viewer; filename="video", index=1)

Save the current viewer frame as a PNG file in the video/ directory.

The output file is named <filename><index>.png, where index is zero-padded to six digits (e.g. video000001.png). The video/ directory is created if it does not exist.

Keyword Arguments

  • filename="video": prefix for the output file name.
  • index=1: frame number, zero-padded to six digits in the file name.
source
KiteViewers.stopFunction
stop(kv::AKV)

Stop the simulation. Sets the viewer's stop flag to true, updates the status text to "Stopped", and sets running to false.

source
KiteViewers.pauseFunction
pause(kv::AKV)

Pause the simulation. Sets the viewer's stop flag to true, saves the current status text in last_status, and updates the status to "Paused".

source
KiteViewers.set_statusFunction
set_status(kv::AKV, status_text)

Set the viewer status text to status_text. If the new status is not "Paused", the current status is saved in last_status before updating.

source