Main Content

linkPercentage

Percentage of time when link between first and last node in link analysis is closed

    Description

    example

    lp = linkPercentage(lnk) returns the percentages of time from start time to stop time of the satellite scenario when link between the first and last node is closed.

    Examples

    collapse all

    Create a satellite scenario object.

    startTime = datetime(2020,11,13,7,25,0);
    stopTime = startTime + days(1);
    sampleTime = 60;                                       % seconds
    sc = satelliteScenario(startTime,stopTime,sampleTime);

    Add a satellite to the scenario.

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

    Add a receiver to the satellite.

    rx = receiver(sat);

    Add a ground station to the scenario.

    latitude = 0;                             % degrees
    longitude = 30;                           % degrees
    gs = groundStation(sc,latitude,longitude);

    Add a transmitter to the ground station.

    tx = transmitter(gs,"MountingAngles",[0; 180; 0]);

    Create an uplink.

    lnk = link(tx,rx);

    Calculate the link percentage of the uplink.

    linkpercent = linkPercentage(lnk)
    linkpercent = 0
    

    Input Arguments

    collapse all

    Link analysis object, specified as a Link object vector or scalar.

    Outputs Arguments

    collapse all

    Link percentage, returned as a vector of positive numbers or scalar.

    Note

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

    Version History

    Introduced in R2021a