Main Content

linkStatus

Status of link closure between first and last node

    Description

    example

    s = linkStatus(lnk) returns a matrix of logicals representing the link closure status history s of each link in the vector link. The rows of the matrix correspond to the link objects in link and the columns correspond to the time sample.

    s = linkStatus(lnk,timeIn) returns a column vector of status s of each link in the vector link at the specified datetime timeIn. Each element of s corresponds to a link in link. If no time zone is specified in timeIn, the time zone is assumed to be UTC.

    [s,timeOut] = linkStatus(___) returns the link closure status and the corresponding times in Universal Time Coordinated (UTC).

    Examples

    collapse all

    Create a satellite scenario object.

    startTime = datetime(2020,10,13,5,30,0);
    stopTime = datetime(2020,10,13,5,45,0);
    sampleTime = 60;                                       % seconds
    sc = satelliteScenario(startTime,stopTime,sampleTime);

    Add a satellite to the scenario.

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

    Add a transmitter to the satellite.

    tx = transmitter(sat);

    Add a ground station to the scenario.

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

    Add a receiver to the ground station.

    rx = receiver(gs,"MountingAngles",[0; 180; 0]);

    Create a downlink.

    lnk = link(tx,rx);

    Obtain the link status history of the closed downlink.

    s = linkStatus(lnk)
    s = 1x16 logical array
    
       0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
    
    

    Input Arguments

    collapse all

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

    Time at which the output is calculated, specified as a datetime scalar. If no time zone is specified in timeIn, the time zone is assumed to be Universal Time Coordinated (UTC).

    Outputs Arguments

    collapse all

    Link closure status, returned as a matrix of logical values representing the link closure status history s of each link in the vector link. The rows of the matrix correspond to the link objects in link and the columns correspond to the time sample. The status at a given instant is 1 (true) if the link between first and last node is closed. The link between the first and last node is closed when the link between each individual pair of intermediate adjacent nodes in the Sequence property of the link is closed.

    • For a given pair, the link is considered to be closed when both nodes belong to the same satellite or ground station.

    • Otherwise, the link between the pair is closed if the directionality is from a transmitter to a receiver and the energy per bit to noise power spectral density ratio (Eb/No) at the receiver is greater than its RequiredEbNo.

    • Additionally, if a given node is attached to a ground station directly or via a gimbal, the elevation angle of the adjacent node with respect to the ground station must be greater than or equal to its MinElevationAngle.

    Time samples of output link status, returned as a scalar or a vector. If time history of link status is returned, timeOut is a row vector.

    Note

    When AutoSimulate of the satellite scenario is true, the link status history from StartTime to StopTime is returned. When it is false, the link status history from StartTime to SimulationTime is returned.

    Version History

    Introduced in R2021a