Satellite's initial state is computed using six Keplerian elements (kep2cart.m), then its propagated for a day with 30 seconds steps by ode45 function. Afterwards satellite's inertial positions are transformed to Earth-fixed coordinate system and then geodetic coordinates are calculated (Geodetic.m). Finally, geodetic latitudes and longitudes are plotted.
Meysam Mahooti (2020). groundtrack (https://www.mathworks.com/matlabcentral/fileexchange/66000-groundtrack), MATLAB Central File Exchange. Retrieved .
Yo chill out Stephen
I found this script is well designed. To apply it to a real satellite, user will need to calculate real Mean Anomaly at the starting time of interest.
Dear Stephen, I'd like comments that reveal bugs of codes and those which try make MATLAB codes comparable with C++ and FORTRAN in speed.
The first lines of the function are:
FORMAT LONG G
which are a classic sign of https://en.wikipedia.org/wiki/Cargo_cult_programming
What possible purpose does it serve to call CLEAR at the very beginning of a function, when its workspace is entirely empty? Why does the function need to forcefully remove all of my compiled functions with a brutal CLEAR ALL?
Why does the function need to forcefully remove all of my data in the base workspace?
Why does the function have to close all of my open figures?
Why does the function need to change the formatting?
None of these things have anything to do with the *functionality* of this submssion.
Satellite's motion is depicted by animation.