Main Content

latency

Calculate propagation delay from one asset to another asset

Since R2023a

    Description

    delay = latency(source,target) calculates the history of propagation delays from the source asset to the target asset. The source and target assets must belong to the same satelliteScenario object. If the value of the AutoSimulate property of the satelliteScenario object is true, the latency function returns the propagation delay history from the value of StartTime to the value of StopTime. Otherwise, it returns the propagation delay history from StartTime to SimulationTime.

    [delay,timeOut] = latency(source,target) returns the history of time samples timeOut.

    [___] = latency(source,target,timeIn) calculates latency at the specified datetime timeIn. When using this syntax, the latency function sets the second dimension of delay and timeOut to 1.

    Note

    When the target asset is a Satellite object, the latency function uses a numerical iterative solution to compute the propagation delay. When the target asset is a GroundStation object, the latency function applies Sagnac correction to compute the propagation delay.

    Examples

    collapse all

    Determine the history of propagation delay from a satellite to a ground station. Also, determine the corresponding time samples.

    Create a satelliteScenario object.

    startTime = datetime(2022,8,21);                       % August 21, 2022, 12:00 AM UTC
    stopTime = datetime(2022,8,23);                        % August 23, 2022, 12:00 AM UTC
    sampleTime = 60;                                       % Units are in seconds
    sc = satelliteScenario(startTime,stopTime,sampleTime);

    Add a satellite to the scenario.

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

    Add a ground station to the scenario.

    gs = groundStation(sc);

    Determine the propagation delay history between two assets and the corresponding time samples.

    [delay,timeOut] = latency(sat,gs);

    Input Arguments

    collapse all

    Source asset from scenario, specified as a Satellite object, Platform object, GroundStation object, array of Satellite objects, array of Platform objects, or array of GroundStation objects.

    Target asset from scenario, specified as a Satellite object, Platform object, GroundStation object, array of Satellite objects, array of Platform objects, or array of GroundStation objects.

    Time instance at which the function calculates latency, specified as a datetime scalar. If timeIn does not specify a time zone, the function uses Coordinated Universal Time (UTC).

    Data Types: datetime

    Output Arguments

    collapse all

    Delay, in seconds, returned as a scalar, vector, or matrix. When source and target cannot access each other, the corresponding latency value is NaN. These tables show how this output changes based on the different input argument sizes and combinations.

    • timeIn not specified

      sourcetargetdelayDescription
      scalarscalarrow vectorLatency history, in which each element represents the propagation delay from source to target at a specific time.
      scalarvectormatrixEach row represents the propagation delay from source to target. The row index indicates the position of the asset in target.
      vectorscalarmatrixEach row represents the propagation delay from source to target. The row index indicates the position of the asset in source.
      vectorvectormatrixEach row represents the propagation delay from source to target. The row index indicates the position of the assets in source and target.

    • timeIn specified

      sourcetargetdelayDescription
      scalarscalarscalarLatency at the specified datetime timeIn.
      scalarvectorcolumn vectorEach element represents the propagation delay from source to the corresponding asset in target at the specified datetime timeIn.
      vectorscalarcolumn vectorEach element represents the propagation delay from the corresponding asset in source to target at the specified datetime timeIn.
      vectorvectorcolumn vectorEach element represents the propagation delay between the corresponding pair of source and target assets at the specified datetime timeIn.

    Data Types: double

    Time samples between the start and stop time of the scenario, returned as a scalar or vector.

    If timeIn does not specify a time zone and the AutoSimulate property the satelliteScenario object is true, the latency function returns the time sample history from StartTime to StopTime. Otherwise, it returns the time sample history from the value of StartTime to the value of SimulationTime.

    Data Types: datetime

    More About

    collapse all

    Version History

    Introduced in R2023a