在及时建模简单的圆形卫星轨道
111 views (last 30 days)
Show older comments
So Im essentially trying to graph an orbit which will be a circle on a polar plot it is to represent the motion of a 500kg satellite when there is no force applied to it. Im neglecting the fact it should be falling over time for now. However my code does not produce the desired result so any input would be aprriciated , thank you all in advance
clc;
清除全部;
G = 6.673e-11;%Gravitational constant
M = 5.98E24;%mass of earth in (kg)
RA = 100000;%orbit distance in (m)
r = 6.37e6 + ra;(m)中轨道的总半径%
M = 500;% mass satelite (kg)
a =(g*m)/(r^2);%检查加速度
v_orb = sqrt((G*M)/r);% orbital velocity (m/s)
T = sqrt(((4*(pi^2))*r^3)/(G*M));% period (s)
%让它以150个步骤以150的步骤进行绘制,以减少计算
simt = T;
fort = 1:150:simt
v_o(t) = sqrt((G*M)/r);% array of velocity corresponding to time in steps of 150 .. should not change and be 1x34 - but ERROR
rn(t)= 6.37E6 + ra;% array of radius corresponding to time in steps of 150 .. should not change and be 1x34 - but ERROR
disp(t)% goes from 1 to 5101 in steps of 150
%%% create array of the form 1x34 corresponding to t ???? %%%
end
figure
情节(t, v_o);包含(“仿真时间”,'FontSize', 12);
ylabel('Velocity','FontSize', 12);
grid;%%% expecting a graph of straight line %%%
figure
情节(t,rn);包含(“仿真时间”,'FontSize', 12);
ylabel('半径','FontSize', 12);
grid;%%% expecting a graph of straight line %%%
%%% take the points of radius and time convert to polar coordinates and plot %%%
%%% expecting a circle as satellite moves around the orbit of constant radius in a sice of time of the period%%%
%[theta,rho] = cart2pol(t,rn);
theta = atan2(rn,t);
rho = sqrt((t.^2)+(rn.^2));
theta= theta*(180/pi);%至学位
figure
polarplot(theta,rho)
title('Orbit')
0 Comments
Accepted Answer
詹姆斯·图萨(James Tursa)
2020年2月3日
Since you are setting up a circular orbit, just scale the time by the period to get theta. E.g., since one period would be an angle of 2pi,
theta = 2*pi * t / T;
然后只需将其用于图案。
更多的Answers (2)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
开始狩猎!