Main Content

play

Play satellite scenario simulation results on viewer

    Description

    example

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

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

    play(scenario,Name,Value) specifies additional options using one or more name-value arguments. For example, you can set the speed of animation to 40 times the real time speed, using 'PlaybackSpeedMultiplier',40.

    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 = 
      1×2 Satellite array with properties:
    
        Name
        ID
        ConicalSensors
        Gimbals
        Transmitters
        Receivers
        Accesses
        GroundTrack
        Orbit
        OrbitPropagator
        MarkerColor
        MarkerSize
        ShowLabel
        LabelFontSize
        LabelFontColor
    
    

    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
        TrailLineColor
        LeadLineColor
        VisibilityMode
    
    
    play(sc)

    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.

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

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

    Satellite scenario viewer, specified as a scalar, or an array of satelliteScenarioViewer objects.

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

    Version History

    Introduced in R2021a