boinor.plotting.orbit.plotter ============================= .. py:module:: boinor.plotting.orbit.plotter .. autoapi-nested-parse:: A module containing different orbit related plotters. Classes ------- .. autoapisummary:: boinor.plotting.orbit.plotter.Trajectory boinor.plotting.orbit.plotter.OrbitPlotter Module Contents --------------- .. py:class:: Trajectory Bases: :py:obj:`namedtuple`\ (\ :py:obj:`'Trajectory'`\ , [\ :py:obj:`'coordinates'`\ , :py:obj:`'position'`\ , :py:obj:`'colors'`\ , :py:obj:`'dashed'`\ , :py:obj:`'label'`\ ]\ ) A class for collecting all information of a body within a plotter. Information contains all the trajectory coordinates, the current position, the name of the label to be displayed in the plotter, the color to be used and if dashed mode is desired or not. .. py:class:: OrbitPlotter(backend=None, num_points=150, *, plane=None, length_scale_units=u.km) A base class containing common attributes and methods for plotters. .. py:property:: backend Backend instance used by the plotter. :returns: An instance of ``OrbitPlotterBackend`` used for rendendering the scene. :rtype: ~boinor.plotting.orbit.backends._base.OrbitPlotterBackend .. py:property:: plane Reference plane to be used when drawing the scene. :returns: Reference plane to be used when drawing the scene. Default to :rtype: ~boinor.frames.Plane, optional .. py:property:: trajectories List with all the `Trajectory` instances used in the plotter. :returns: A list containing all the trajectories rendered in the scene. :rtype: List[Trajectory] .. py:property:: length_scale_units Units of length used for representing distances. :returns: **length_units** -- Desired length units to be used when representing distances. :rtype: ~astropy.units.Unit .. py:method:: set_attractor(attractor) Set the desired plotting attractor. :param attractor: Central body. :type attractor: ~boinor.bodies.Body :raises NotImplementedError: Raised if attractor is already set. .. py:method:: set_orbit_frame(orbit) Set the perifocal frame based on an orbit. :param orbit: Orbit to use as frame. :type orbit: ~boinor.twobody.Orbit .. py:method:: set_body_frame(body, epoch=None) Set perifocal frame based on the orbit of a body at a particular epoch if given. :param body: Body. :type body: boinor.bodies.SolarSystemPlanet :param epoch: Epoch of current position. :type epoch: astropy.time.Time, optional .. py:method:: plot(orbit, *, color=None, label=None, trail=False, dashed=True) Plot state and osculating orbit in their plane. :param orbit: Orbit to plot. :type orbit: ~boinor.twobody.orbit.Orbit :param color: Color of the line and the position. :type color: str, optional :param label: Label of the orbit. :type label: str, optional :param trail: Fade the orbit trail, default to False. :type trail: bool, optional :param dashed: ``True`` to use a dashed line style. ``False`` otherwise. :type dashed: bool, optional .. py:method:: plot_body_orbit(body, epoch, *, label=None, color=None, trail=False) Plot complete revolution of body and current position. :param body: Body. :type body: boinor.bodies.SolarSystemPlanet :param epoch: Epoch of current position. :type epoch: astropy.time.Time :param label: Label of the orbit, default to the name of the body. :type label: str, optional :param color: Color of the line and the position. :type color: str, optional :param trail: Fade the orbit trail, default to False. :type trail: bool, optional .. py:method:: plot_ephem(ephem, epoch=None, *, label=None, color=None, trail=False) Plot ``Ephem`` object over its sampling period. :param ephem: Ephemerides to plot. :type ephem: ~boinor.ephem.Ephem :param epoch: Epoch of the current position, `None` is used if not given. :type epoch: astropy.time.Time, optional :param label: Label of the orbit, default to the name of the body. :type label: str, optional :param color: Color of the line and the position. :type color: str, optional :param trail: Fade the orbit trail, default to False. :type trail: bool, optional .. py:method:: plot_maneuver(initial_orbit, maneuver, label=None, color=None, trail=False) Plot the maneuver trajectory applied to the provided initial orbit. :param initial_orbit: The base orbit for which the maneuver will be applied. :type initial_orbit: ~boinor.twobody.orbit.Orbit :param maneuver: The maneuver to be plotted. :type maneuver: ~boinor.maneuver.Maneuver :param label: Label of the trajectory. :type label: str, optional :param color: Color of the trajectory. :type color: str, optional :param trail: Fade the orbit trail, default to False. :type trail: bool, optional .. py:method:: plot_coordinates(coordinates, *, position=None, label=None, color=None, trail=False, dashed=False) Plot a precomputed trajectory. :param coordinates: Trajectory to plot. :type coordinates: ~astropy.coordinates.CartesianRepresentation :param label: Label of the trajectory. :type label: str, optional :param color: Color of the trajectory. :type color: str, optional :param trail: Fade the orbit trail, default to False. :type trail: bool, optional :param dashed: ``True`` to use a dashed line style. ``False`` otherwise. :type dashed: bool, optional :raises ValueError: An attractor must be set first. .. py:method:: plot_trajectory(coordinates, *, label=None, color=None, trail=False, dashed=False) Plot a precomputed trajectory. :param coordinates: Trajectory to plot. :type coordinates: ~astropy.coordinates.CartesianRepresentation :param label: Label of the trajectory. :type label: str, optional :param color: Color of the trajectory. :type color: str, optional :param trail: Fade the orbit trail, default to False. :type trail: bool, optional :param dashed: ``True`` to use a dashed line style. ``False`` otherwise. :type dashed: bool, optional :raises ValueError: An attractor must be set first. .. py:method:: set_view(elevation_angle, azimuth_angle, distance=5 * u.km) Change 3D view by setting the elevation, azimuth and distance. :param elevation_angle: Desired elevation angle of the camera. :type elevation_angle: ~astropy.units.Quantity :param azimuth_angle: Desired azimuth angle of the camera. :type azimuth_angle: ~astropy.units.Quantity :param distance: Desired distance of the camera to the scene. :type distance: optional, ~astropy.units.Quantity .. py:method:: show() Render the plot.