Main Content

accessIntervals

Intervals during which access status is true

    Description

    example

    int = accessIntervals(ac) returns a table of intervals during which the access status corresponding to each access object in the input vector is true.

    Examples

    collapse all

    Create satellite scenario and add ground stations from latitudes and longitudes.

    startTime = datetime(2020, 5, 1, 11, 36, 0);
    stopTime = startTime + days(1);
    sampleTime = 60;
    sc = satelliteScenario(startTime, stopTime, sampleTime);
    lat = [10];
    lon = [-30];
    gs = groundStation(sc, lat, lon);

    Add satellites using Keplerian elements.

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

    Add access analysis to the scenario and obtain the table of intervals of access between the satellite and the ground station.

    ac = access(sat, gs);
    intvls = accessIntervals(ac)
    intvls=8×8 table
           Source              Target          IntervalNumber         StartTime                EndTime           Duration    StartOrbit    EndOrbit
        _____________    __________________    ______________    ____________________    ____________________    ________    __________    ________
    
        "Satellite 2"    "Ground station 1"          1           01-May-2020 11:36:00    01-May-2020 12:04:00      1680          1            1    
        "Satellite 2"    "Ground station 1"          2           01-May-2020 14:20:00    01-May-2020 15:11:00      3060          1            2    
        "Satellite 2"    "Ground station 1"          3           01-May-2020 17:27:00    01-May-2020 18:18:00      3060          3            3    
        "Satellite 2"    "Ground station 1"          4           01-May-2020 20:34:00    01-May-2020 21:25:00      3060          4            4    
        "Satellite 2"    "Ground station 1"          5           01-May-2020 23:41:00    02-May-2020 00:32:00      3060          5            5    
        "Satellite 2"    "Ground station 1"          6           02-May-2020 02:50:00    02-May-2020 03:39:00      2940          6            6    
        "Satellite 2"    "Ground station 1"          7           02-May-2020 05:59:00    02-May-2020 06:47:00      2880          7            7    
        "Satellite 2"    "Ground station 1"          8           02-May-2020 09:06:00    02-May-2020 09:56:00      3000          8            9    
    
    

    Play the scenario to visualize the ground stations.

    play(sc)

    Input Arguments

    collapse all

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

    Outputs Arguments

    collapse all

    Intervals during which access is true, returned as a table.

    Each row of the table denotes a specific interval, and the columns of the table are named Source, Target, IntervalNumber, StartTime, EndTime, Duration (in seconds), StartOrbit, and EndOrbit. Source and Target are the names of the first and last node, respectively, defining the access analysis.

    • If Source is a satellite or an object that is directly or indirectly attached to a satellite, then StartOrbit and EndOrbit correspond to the satellite associated with Source.

    • If Target is a satellite or an object that is directly or indirectly attached to a satellite, then StartOrbit and EndOrbit correspond to the satellite associated with Target. Otherwise, StartOrbit and EndOrbit are NaN because they are associated with ground stations.

    Introduced in R2021a