Main Content

play

Play satellite scenario simulation results on viewer

Since R2021a

    Description

    play(scenario) plays simulation results of the satellite scenario, scenario, on the Satellite Scenario Viewer. When the AutoSimulate property of the satellite scenario is true, the simulation is automatically performed from StartTime to StopTime using a step size specified by SampleTime, and the results are played on the viewer. Otherwise, the results calculated for SimulationTime are played on the viewer. Calling the play function enables the widgets on the viewer.

    play(viewer) plays the satellite scenario simulation results on the Satellite Scenario Viewer specified by viewer.

    example

    play(scenario,Name=Value) specifies additional options using one or more name-value arguments.

    Examples

    collapse all

    Create a satellite scenario with a start time of 02-June-2020 8:23:00 AM UTC, and the stop time set to one day later. Set the simulation sample time to 60 seconds.

    startTime = datetime(2020,6,02,8,23,0);
    stopTime = startTime + days(1);
    sampleTime = 60;
    sc = satelliteScenario(startTime,stopTime,sampleTime);

    Add two satellites to the scenario using their Keplerian elements.

    semiMajorAxis = [10000000;15000000];
    eccentricity = [0.01;0.02];
    inclination = [0;10];
    rightAscensionOfAscendingNode = [0;15];
    argumentOfPeriapsis = [0;30];
    trueAnomaly = [0;20];
    
    sat = satellite(sc,semiMajorAxis,eccentricity,inclination, ...
        rightAscensionOfAscendingNode,argumentOfPeriapsis,trueAnomaly)
    sat = 
      1x2 Satellite array with properties:
    
        Name
        ID
        ConicalSensors
        Gimbals
        Transmitters
        Receivers
        Accesses
        GroundTrack
        Orbit
        OrbitPropagator
        MarkerColor
        MarkerSize
        ShowLabel
        LabelFontColor
        LabelFontSize
    
    

    View the satellites in orbit and the ground tracks over one hour.

    show(sat)
    groundTrack(sat,LeadTime=3600)
    ans=1×2 object
      1×2 GroundTrack array with properties:
    
        LeadTime
        TrailTime
        LineWidth
        LeadLineColor
        TrailLineColor
        VisibilityMode
    
    

    Play the scenario and set the animation speed of the simulation to 40.

    play(sc,PlaybackSpeedMultiplier=40)

    Input Arguments

    collapse all

    Satellite scenario, specified as a satelliteScenario object.

    Viewer playing the simulation results, specified as a scalar satelliteScenarioViewer object or an array of satelliteScenarioViewer objects.

    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.

    Example: PlaybackSpeedMultiplier=30 plays the animation 30 times faster than real time.

    Satellite Scenario Viewer, specified as a scalar satelliteScenarioViewer object or an array of satelliteScenarioViewer objects.

    Speed of animation in the viewer relative to real time, specified as a positive scalar.

    Version History

    Introduced in R2021a