Main Content

accessPercentage

Percentage of time when access exists between first and last node in access analysis

Since R2021a

    Description

    acpercent = accessPercentage(ac) returns the percentage of time from start time to stop time of the satellite scenario when access exists between the first and last node of each access object in the input vector, ac.

    example

    Examples

    collapse all

    Create a satellite scenario object.

    startTime = datetime(2020,5,1,11,36,0);
    stopTime = startTime + days(1);
    sampleTime = 60;
    sc = satelliteScenario(startTime,stopTime,sampleTime);

    Add a ground station to the scenario.

    gs = groundStation(sc);

    Add satellites to the scenario.

    semiMajorAxis = [10000000 10000000];                  % meters
    eccentricity = [0 0];
    inclination = [0 30];                                 % degrees
    rightAscensionOfAscendingNode = [0 0];                % degrees
    argumentOfPeriapsis = [0 0];                          % degrees
    trueAnomaly = [0 10];                                 % degrees
    sat = satellite(sc,semiMajorAxis,eccentricity, ...
          inclination,rightAscensionOfAscendingNode, ...
          argumentOfPeriapsis,trueAnomaly);

    Add access analysis between the ground station and each satellite.

    access(gs,sat(1));
    access(gs,sat(2));

    Obtain the access percentage between the ground station and each satellite.

    ac = gs.Accesses;
    acPercent = accessPercentage(ac)
    acPercent = 2×1
    
       15.0000
       14.9306
    
    

    Input Arguments

    collapse all

    Access analysis, specified as a row vector of Access objects.

    Outputs Arguments

    collapse all

    Access percentage, returned as a row vector of nonnegative numbers.

    Note

    When the AutoSimulate property of satellite scenario is true, the access percentage corresponds to the duration between StartTime and StopTime. When the property is false, the access percentage corresponds to the duration between StartTime and SimulationTime.

    Version History

    Introduced in R2021a