API Reference
Types
KiteViewers.AbstractKiteViewer — Type
abstract type AbstractKiteViewerAll 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.
KiteViewers.AKV — Type
const AKV = AbstractKiteViewerShort alias for the AbstractKiteViewer.
KiteViewers.Viewer3D — Type
Viewer3D <: AbstractKiteViewerMutable struct representing a 3D kite power system viewer, built on GLMakie.
Holds the Makie figure, 3D scene, camera, screen, particle/tether geometry observables, settings, UI buttons, optional menus, and simulation bookkeeping (step counter, energy, stop flag, etc.).
Use the outer constructors Viewer3D(show_kite, autolabel; precompile) or Viewer3D(set, show_kite, autolabel; precompile, menus) to create an instance.
Functions
KiteViewers.clear_viewer — Function
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 callstop(kv)after resetting.
KiteViewers.update_system — Function
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: iftrue, 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.
KiteViewers.save_png — Function
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.
KiteViewers.stop — Function
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.
KiteViewers.pause — Function
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".
KiteViewers.set_status — Function
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.
KiteViewers.copy_examples — Function
copy_examples()Copy all example scripts to the folder "examples" (it will be created if it doesn't exist).