Question
Modify the program from the last assignment to print the catalog number, 4 digit launch year and name of all the weather satellites. The TLE
Modify the program from the last assignment to print the catalog number, 4 digit launch year and name of all the weather satellites. The TLE data contains a launch year, but it is only 2 digits. Extract this from the TLE data, convert it to a number using the MATLAB function str2num, and convert the 2 digit launch year to a 4 digit using an if statement and the following kludge: Because the first satellite, Sputnik 1, was launched in 1957, we can assume any launch year < 57 must be in the 2000's, and any launch >= 57 was in the 1900's. This is a temporary kludge that will work up until the year 2056. The output should be 1 satellite per line
previous assignment code....
visual_sat_url="https://celestrak.org/NORAD/elements/gp.php?GROUP=weather&FORMAT=tle"
%"https://celestrak.org/Norad/elements/gp.php?Group=visual&FORMAT=tle"
line_list=string(splitlines(webread(visual_sat_url)));
name_line_num=1;
name=line_list(name_line_num);
while strlength(name)>0
%tle_1_line_num=name_line_sum+1;
tle_1= line_list(name_line_num+1);
name_line_num=name_line_num+3;
name=line_list(name_line_num);
catolog_number=extractBetween(tle_1,3,7);
fprintf("%s\t",extractBetween(tle_1,3,7))
%tle_1=line_list(name_line_num+1);
fprintf("%s ",name);
name_line_num=name_line_num+3;
name=line_list(name_line_num);
end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started