I need to know about the ground track coverage of a satellite. The following MATLAB code plots the orbit of a satellite in lat vs long. It also plots a building which we assume is the ground station. Does the building have coverage of the satellite? The plot shows the building is outside of the orbit of the satellite. If it does have coverage, how much time per day does it have coverage.   % Initial conditions omega_earth = rad2deg(7.2921151467e-5); % deg/s a = 3096.7363; % km ecc = 0.74; inc = 63.4349; % degrees raan = -86.915798; % degrees argp = 270; % degrees f = linspace(0, 360, 100); % degrees t = 100; % number of points cone_angle = 10; % degrees % Building coordinates building_lat = 40.43094; % degrees building_long = -86.915798; % degrees position = (lla2eci([building_lat building_long 0],[2024 01 24 12 20 0]))/1e3 % Calculate time vector over one orbital period orbital_period = 360 / omega_earth; time_vector = linspace(0, orbital_period, t); % Preallocate arrays for orbital elements long = zeros(1, t); % latitude = zeros(1, n_points); % Calculate orbital elements at each time step for i = 1:t     % Call kep2cart for each true anomaly     [x(i), y(i), z(i), vx(i), vy(i), vz(i)] = kep2cart(a, ecc, inc, raan, argp, f(i));     % Calculate longitude and latitude     long(i) = atan2d(y(i), x(i)); %   latitude(i) = asind(sind(inc).*sind(argp+f(i))); end r_mag = length(x); for i = 1:length(x)     r_mag(:,i) = norm([x(:,i); y(:,i); z(:,i)]); end lat = asind(z./r_mag) long long(100) = -long(100) % Plot the ground-track figure; plot(long, lat, 'b-', 'LineWidth', 1.5); hold on; % Plot the building location plot(building_long, building_lat, 'ro', 'MarkerSize', 10, 'MarkerFaceColor', 'r'); % Set axis labels and title xlabel('Longitude (degrees)'); ylabel('Latitude (degrees)'); title('Ground-Track of the Orbit'); % Display legend legend('Ground-Track', 'Building Location'); % Set grid grid on; % Show the plot hold off;     function [x, y, z, vx, vy, vz] = kep2cart(a, ecc, inc, raan, argp, f)         % Gravitational parameter      mu = 398600.4418;  % (km^3/s^2)          % Calculate angular momentum     h = sqrt(a * (1-ecc^2)*mu);    % (km^2/s)          % Calculate position and velocity in the periforcal frame     r_w = ((h^2 / mu) / (1 + ecc * cosd(f))) .* [cosd(f), sind(f), 0];     v_w = (mu / h) .* [-sind(f), ecc + cosd(f), 0];          % Calculate the Rotational Matrix     R1 = [cosd(-argp) -sind(-argp) 0;           sind(-argp) cosd(-argp)  0;                0           0       1];     R2 = [1      0          0;           0 cosd(-inc) -sind(-inc);           0 sind(-inc) cosd(-inc)];          R3 = [cosd(-raan) -sind(-raan) 0;           sind(-raan) cosd(-raan)  0;                0           0       1];          % Calculate position vector     r_rot = r_w * R1 * R2 * R3;          % Calculate velocity vector     v_rot = v_w * R1 * R2 * R3;          % Define the cartesian coordinates     x = r_rot(1);     y = r_rot(2);     z = r_rot(3);     vx = v_rot(1);     vy = v_rot(2);     vz = v_rot(3); end

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need to know about the ground track coverage of a satellite. The following MATLAB code plots the orbit of a satellite in lat vs long. It also plots a building which we assume is the ground station. Does the building have coverage of the satellite? The plot shows the building is outside of the orbit of the satellite. If it does have coverage, how much time per day does it have coverage.

 

% Initial conditions
omega_earth = rad2deg(7.2921151467e-5); % deg/s
a = 3096.7363; % km
ecc = 0.74;
inc = 63.4349; % degrees
raan = -86.915798; % degrees
argp = 270; % degrees
f = linspace(0, 360, 100); % degrees
t = 100; % number of points
cone_angle = 10; % degrees

% Building coordinates
building_lat = 40.43094; % degrees
building_long = -86.915798; % degrees

position = (lla2eci([building_lat building_long 0],[2024 01 24 12 20 0]))/1e3


% Calculate time vector over one orbital period
orbital_period = 360 / omega_earth;
time_vector = linspace(0, orbital_period, t);

% Preallocate arrays for orbital elements
long = zeros(1, t);
% latitude = zeros(1, n_points);

% Calculate orbital elements at each time step
for i = 1:t


    % Call kep2cart for each true anomaly
    [x(i), y(i), z(i), vx(i), vy(i), vz(i)] = kep2cart(a, ecc, inc, raan, argp, f(i));


    % Calculate longitude and latitude
    long(i) = atan2d(y(i), x(i));
%   latitude(i) = asind(sind(inc).*sind(argp+f(i)));
end


r_mag = length(x);

for i = 1:length(x)
    r_mag(:,i) = norm([x(:,i); y(:,i); z(:,i)]);
end

lat = asind(z./r_mag)

long
long(100) = -long(100)

% Plot the ground-track
figure;
plot(long, lat, 'b-', 'LineWidth', 1.5);
hold on;

% Plot the building location
plot(building_long, building_lat, 'ro', 'MarkerSize', 10, 'MarkerFaceColor', 'r');

% Set axis labels and title
xlabel('Longitude (degrees)');
ylabel('Latitude (degrees)');
title('Ground-Track of the Orbit');

% Display legend
legend('Ground-Track', 'Building Location');

% Set grid
grid on;

% Show the plot
hold off;

 

 

function [x, y, z, vx, vy, vz] = kep2cart(a, ecc, inc, raan, argp, f)
   

    % Gravitational parameter 
    mu = 398600.4418;  % (km^3/s^2)
    
    % Calculate angular momentum
    h = sqrt(a * (1-ecc^2)*mu);    % (km^2/s)
    
    % Calculate position and velocity in the periforcal frame
    r_w = ((h^2 / mu) / (1 + ecc * cosd(f))) .* [cosd(f), sind(f), 0];
    v_w = (mu / h) .* [-sind(f), ecc + cosd(f), 0];
    
    % Calculate the Rotational Matrix
    R1 = [cosd(-argp) -sind(-argp) 0;
          sind(-argp) cosd(-argp)  0;
               0           0       1];
    R2 = [1      0          0;
          0 cosd(-inc) -sind(-inc);
          0 sind(-inc) cosd(-inc)];
    
    R3 = [cosd(-raan) -sind(-raan) 0;
          sind(-raan) cosd(-raan)  0;
               0           0       1];
    
    % Calculate position vector
    r_rot = r_w * R1 * R2 * R3;
    
    % Calculate velocity vector
    v_rot = v_w * R1 * R2 * R3;
    
    % Define the cartesian coordinates
    x = r_rot(1);
    y = r_rot(2);
    z = r_rot(3);
    vx = v_rot(1);
    vy = v_rot(2);
    vz = v_rot(3);

end

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Time complexity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education