# slantRangeCircularOrbit

Calculate slant range or distance between circularly orbiting satellite and ground station

Since R2024a

## Syntax

``dist = slantRangeCircularOrbit(el,hs,hg)``
``dist = slantRangeCircularOrbit(el,hs,hg,time)``

## Description

````dist = slantRangeCircularOrbit(el,hs,hg)` calculates the distance in meters between a circularly orbiting satellite and a ground station, with the specified elevation angle `el`, satellite altitude `hs`, and ground station altitude `hg`.For more information, see Slant Range Calculations. Note `slantRangeCircularOrbit` assumes the Earth is spherical and ignores the Earth rotation rate.`slantRangeCircularOrbit` also assumes that an access or link is possible from the satellite to the ground station at all times.You can apply this syntax to any orbit type irrespective of its shape. ```

example

````dist = slantRangeCircularOrbit(el,hs,hg,time)` specifies the time instances to calculate the distance between a circularly orbiting satellite and a ground station.For more information, see Slant Range Calculations. NoteThis syntax also assumes: The ground station is located at the North Pole (positive Z–axis), and the satellite starts from the initial input elevation angle `el` in the second quadrant of the YZ–plane.Satellite moves in the clockwise direction in its circular orbit. ```

example

## Examples

collapse all

Calculate the slant range for a satellite moving in circular orbit and then plot the slant range as a function of elevation angle.

Set satellite altitude as 10000 km and ground station altitude as 120 m.

```hs = 10000e3; % meters hg = 120; % meters```

Vary the elevation angle from 0 to 90 degrees.

`el = 0:90; % degrees`

Calculate the slant range for the varying elevation angles.

`dist = slantRangeCircularOrbit(el,hs,hg);`

Plot the slant range as a function of elevation angle.

```figure plot(el,dist,"-*") title("Slant Range vs Elevation Angle") xlabel("Elevation Angle (degrees)") ylabel("Slant Range (meters)") grid on```

Visualize the variation of slant range for one orbital period of satellite.

Set the satellite altitude as 1500 km and initial elevation angle as 45 degrees. Assume ground station height is 0 m.

```hs = 1500e3; % meters el = 45; % degrees hg = 0; % meters```

For the specified satellite altitude of 1500 km, the orbital time period is 6949.518 seconds. To cover one orbital time period, set the maximum time instance to 6950 seconds.

`time = 0:6950; % seconds`

Calculate the slant range for the specified time instances.

`dist = slantRangeCircularOrbit(el,hs,hg,time);`

Plot the slant range as a function of time.

```figure plot(time,dist) title("Slant Range vs Time") xlabel("Time (seconds)") ylabel("Slant Range (meters)") grid on```

## Input Arguments

collapse all

Satellite elevation angle in degrees, specified as a real scalar or vector.

The function considers each elevation angle as an independent satellite. The nominal range of elevation angles is from 0 to 90 degrees. However, this function accepts any input elevation angle, enabling you to position the satellite anywhere in the orbit.

For example, this figure shows a scenario in which `el` input is `[45 135 225]`. In this case, the function assumes there are three independent satellites.

• Satellite 1 at elevation angle α1 = 45°

• Satellite 2 at elevation angle α2 = 135°

• Satellite 3 at elevation angle α3 = 225°

Data Types: `double`

Satellite altitude in meters, specified as a positive scalar.

Data Types: `double`

Ground station altitude in meters, specified as a nonnegative scalar.

`hg` must be less than `hs`.

Data Types: `double`

Time instances to calculate the distance between a circularly orbiting satellite and a ground station, specified as a real scalar or vector. Units are in seconds.

A negative value of `time` represents the counter–clockwise rotation of the satellite.

When you specify `time`, the function uses the `el`, `hs`, and `hg` inputs as the initial values at `0` seconds.

Data Types: `double`

## Output Arguments

collapse all

Distance between a circularly orbiting satellite and a ground station in meters, returned as a scalar, vector, or matrix.

When you specify `el` as a vector of length NumEL and `time` as a vector of length NumTIME, then `dist` is a matrix of size NumEL-by-NumTIME. Each row of `dist` represents the slant range for the corresponding elevation angle.

The slant range between the satellite and ground station is lowest at the zenith, which you can observe in the Examples.

Data Types: `double`

collapse all

### Slant Range Calculations

This figure shows a circularly orbiting satellite in clockwise direction, with an elevation angle α with respect to a ground station on Earth. The ground station is located at the North Pole (positive Z–axis). The angle of rotation of the satellite, measured at the centre of the Earth, is θ.

To derive the formula used to calculate the slant range or distance between the circularly orbiting satellite and the ground station, first calculate θ, the angle of rotation of the satellite measured at the Earth centre, for specified the elevation angle `el`, satellite altitude `hs`, and ground station altitude `hg`.

`$\theta ={\mathrm{cos}}^{-1}\left(\frac{R-R{\mathrm{sin}}^{2}\left(\alpha \right)+\mathrm{sin}\left(\alpha \right)\sqrt{{\left(R\mathrm{sin}\left(\alpha \right)\right)}^{2}+{H}^{2}+2RH}}{R+H}\right)$`

where:

• R = RE + hg, where RE = `6371e3` meters

• H = hshg

• α is the satellite elevation angle

For each orbital period, θ is equal to `360` degrees. You can calculate the orbital period of a satellite as:

`$T=\frac{2×\pi ×\left(R+H\right)}{v}$`

where vsat is the speed of satellite given by this equation:

`${v}_{sat}=\sqrt{\frac{GM}{R+H}}$`

where:

• G is the gravitational constant of `6.6743e-11` (Newtonian constant of gravitation, in m3kg-1s-2)

• M is the mass of the Earth: `5.9722e24` kg

When you specify the time instances to calculate the slant range, the initial time for the initial rotation angle is given by (–T × (θ / 360)).

The time instances at which the function calculates the slant range are equal to the sum of the initial time and the values specified in the `time` argument.

The function calculates the slant range using this formula, where θ corresponds to the new satellite rotation angles at the specified `time` instances.

`$SU=\sqrt{{R}^{2}+{\left(R+H\right)}^{2}-2×R×\left(R+H\right)×\mathrm{cos}\theta }$`

## Version History

Introduced in R2024a