Main Content

show

Visualize UAV scenario in 2-D

Since R2020b

    Description

    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.

    example

    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 with type geoaxes. The geoaxes object contains an object of type line. This object represents UAV.

    ans = 
      GeographicAxes with properties:
    
         Basemap: 'streets-light'
        Position: [0.1300 0.1100 0.7750 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 pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

    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.

    Version History

    Introduced in R2020b