# How to code the orbital distance of a satellite?

4 views (last 30 days)
Destiny Write on 5 Oct 2021
Answered: Image Analyst on 6 Oct 2021
The goal is to compute the orbital distance of geostationary satellite from the Earth's Center. The Matlab plot needs the Geostationary orbital distance as a function of the Earth's mass if the Earth's mass varied from 1.01 times to its real value to 10 times its real value. I believe the general expression for finding the distance is h = (Gm/w^2)^1/3 - R. However, I am unsure how to acutally code that. Any help would be appreciated!

Image Analyst on 6 Oct 2021
Did you try assigning numbers and plugging them in to your equation?
numSamples = 1000
actualMaxx = 5.97e24; % kg
m = linspace(1.01 * actualMass, 10 * actualMass, numSamples);
G = 9.8;
R = 6.371e6;
w = whatever...
h = (G * m / w^2) .^ (1/3) - R
plot(m, h, 'b-', 'LineWidth', 2);
grid on;
xlabel('m');
ylabel('h');
Not sure which letter is the mass of the earth or the mass of the satellite, so adapt as needed.

R2021b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by