Main Content

show

Visualize UAV scenario in 2-D

    Description

    example

    ax = show(scene) visualizes the UAV scenario scene in 2-D with latest states of the platforms and returns the axes on which the scenario is plotted.

    ax = show(scene,times) visualizes the UAV scenario scene at timestamps specified by the times input.

    ax = show(___,Name,Value) specifies additional options using Name-Value pairs. Enclose each Name in quotes.

    Examples

    collapse all

    Create a UAV scenario.

    scene = uavScenario("UpdateRate",1,"StopTime",1000,"HistoryBufferSize",1000);  

    Create a UAV platform with a specified waypoint trajectory in the scenario.

    traj = waypointTrajectory("Waypoints", [0 -20000 -50; 10000 100000 -50; 20000 0 -50], "TimeOfArrival", [0 500 1000]); 
    uavPlat = uavPlatform("UAV",scene,"Trajectory", traj); 

    Visualize the trajectory in 2D.

    setup(scene); 
    while advance(scene)
    end
    show(scene,0:1:1000)

    Figure contains an axes object. The axes object contains an object of type line. This object represents UAV.

    ans = 
      GeographicAxes with properties:
    
         Basemap: 'streets-light'
        Position: [0.1312 0.1100 0.7738 0.8150]
           Units: 'normalized'
    
      Show all properties
    
    

    Input Arguments

    collapse all

    UAV scenario, specified as a uavScenario object.

    Time stamps at which to show the scenario, specified as a vector of nonnegative scalars. The specified time stamps must be saved in the scenario. To change the number of saved time stamps, use the HistoryBufferSize property of the uavScenario object.

    Name-Value Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: ax = show(scene,"MarkerSize",38)

    Parent axes for plotting the scenario, specified as a geoaxes object.

    Marker size, specified as a positive scalar in points, where 1 point = 1/72 of an inch.

    Enable showing platform name, specified as true or false.

    Output Arguments

    collapse all

    Axes on which the scenario is plotted, returned as a geoaxes object.

    Introduced in R2020b