:py:mod:`pycasx.scenario` ========================= .. py:module:: pycasx.scenario .. autoapi-nested-parse:: Scenario generation module for pycasx. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 ai_scenario/index.rst calculate_cpa/index.rst fgfs_config/index.rst flightplan/index.rst scenario/index.rst waypoint_generation/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: pycasx.scenario.WayPointConfig pycasx.scenario.GeographicCoordinates Functions ~~~~~~~~~ .. autoapisummary:: pycasx.scenario.convert Attributes ~~~~~~~~~~ .. autoapisummary:: pycasx.scenario.ureg pycasx.scenario.GEOD pycasx.scenario.SPDX_FILE_COPYRIGHT_TEXT pycasx.scenario.SPDX_LICENSE_IDENTIFIER pycasx.scenario.HEADLESS_OPTIONS .. py:data:: ureg .. py:data:: GEOD .. py:data:: SPDX_FILE_COPYRIGHT_TEXT :value: 'SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) ' .. py:data:: SPDX_LICENSE_IDENTIFIER :value: 'SPDX-License-Identifier: MIT' .. py:data:: HEADLESS_OPTIONS :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """# HEADLESS-START --geometry=1x1 --disable-sound --disable-terrasync --disable-splash-screen --fog-fastest --disable-specular-highlight --disable-random-objects --disable-clouds --disable-clouds3d --disable-distance-attenuation --disable-real-weather-fetch --disable-random-vegetation --disable-random-buildings --disable-horizon-effect --prop:/sim/rendering/particles=0 --prop:/sim/rendering/multi-sample-buffers=1 --prop:/sim/rendering/multi-samples=2 --prop:/sim/rendering/draw-mask/clouds=false --prop:/sim/rendering/draw-mask/aircraft=false --prop:/sim/rendering/draw-mask/models=false --prop:/sim/rendering/draw-mask/terrain=false --prop:/sim/rendering/random-vegetation=0 --prop:/sim/rendering/random-buildings=0 --prop:/sim/rendering/texture-compression=off --prop:/sim/rendering/quality-level=0 --prop:/sim/rendering/shaders/quality-level=0 # HEADLESS-END """ .. raw:: html
.. py:class:: WayPointConfig Configuration of a single waypoint. .. attribute:: name Name of the waypoint :type: str .. attribute:: lat The waypoint's latitude :type: float .. attribute:: lon The waypoint's longitude :type: float .. attribute:: alt The aircraft's **true altitude** :type: float .. attribute:: ktas The the aircraft's **true airspeed** :type: float .. attribute:: on_ground Whether the aircraft in on the ground :type: bool .. attribute:: gear_down Whether the gear is down :type: bool .. attribute:: flaps_down Whether the flaps are down :type: bool .. py:attribute:: name :type: str .. py:attribute:: lat :type: float .. py:attribute:: lon :type: float .. py:attribute:: alt :type: float .. py:attribute:: ktas :type: float .. py:attribute:: on_ground :type: bool .. py:attribute:: gear_down :type: bool .. py:attribute:: flaps_down :type: bool .. py:class:: GeographicCoordinates The latitude and longitude of an aircraft. .. attribute:: lat the latitude of the aircraft. :type: float .. attribute:: lon the longitude of the aircraft. :type: float .. py:attribute:: lat :type: float .. py:attribute:: lon :type: float .. py:function:: convert(value: int | float) -> float convert(value: int | float, unit: str) -> float convert(value: str, unit: str) -> float Convert a value to a specific unit. This function takes a value and a unit and converts the value to the given unit. If the value is already a number (int | float), it is directly returned. If the value is a string, it is converted to a quantity and then to the given unit. This is useful to read values from the configuration file and convert them to the correct unit. :param value: The value to convert :type value: int | float | str :param unit: The unit to convert to :type unit: str :returns: The converted value :rtype: float