Main Content

play

Play satellite scenario simulation results on viewer

    Description

    example

    play(scenario) plays simulation results of the satellite scenario, scenario, from its start time (StartTime property) to its stop time (StopTime property) using a step size specified by the SampleTime property. The function plays the results in a satellite scenario viewer.

    play(v) plays the satellite scenario simulation 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, specified as a scalar satelliteScenarioViewer 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: 'PlaybackSpeedMultiplier',30 plays the animation 30 times faster than real time.

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

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

    Introduced in R2021a