Plotting a circle from latitude and longitude as centre and distance from reference station as radius.
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello, everyone!
I have been trying to work on a project that shows the functioning of a Differential GPS. The code is given below.
I have 2 queries which are as follows:
a.) How do I overlap the positions of satellites (1,2,3 and 4) on the world map using matlab's mapping toolbox?
Note: the points obtained in the program (Xsat1, Ysat1, Xsat2.....so on) get displayed on a graph even though I have used the geoshow function.
B.) How do I create circles using these locations (latitudes and longitudes) as the centres and distances of the satellites as radii?
%orbiting radii of satellites 1,2,3 and 4 in meters%
R1 = 2.556E+07;
R2 = 2.488E+7;
R3 = 2.432E+7;
R4 = 2.398E+7;
%radius of the earth (average)%
Re = 6.378e+6;
%angles the satellites make with the reference station.%
A1 = 122;
A2 = 76;
A3 = 168;
A4 = 20;
%actual heights of the satellites perpendicularly above the ground.%
H1 = R1 - Re;
H2 = R2 - Re;
H3 = R3 - Re;
H4 = R4 - Re;
% "PSEUDORANGES" %
Dps1 = H1*cscd(A1);
Dps2 = H2*cscd(A2);
Dps3 = H3*cscd(A3);
Dps4 = H4*cscd(A4);
%Velocity of EM waves (in meters per sec)%
c = 299792458;
%Estimated time the Em signal takes to reach the satellites from the
%reference location%
Ts1 = Dps1/c;
Ts2 = Dps2/c;
Ts3 = Dps3/c;
Ts4 = Dps4/c;
%Incorporating the errors%
Ti = 16e-9; %ionospheric error in seconds%
Ts = 20e-9; %stratospheric error in seconds%
Tc = 17.28e-9; %desyncronisation of staellite clocks in seconds%
Ee = 2.0; %ephemeris error in meters%
Em = 0.6; %multipath error in meters%
Er = 0.3; %receiver noise error in meters%
%transmission time to receiver's Gps%
Tr1 = 0.1514;
Tr2 = 0.1216;
Tr3 = 0.084;
Tr4 = 0.1701;
%actual ranges of the satellites%
Ds1 = ((Ts1 + Ti + Ts + Tc)*c);
Ds2 = ((Ts2 + Ti + Ts + Tc)*c);
Ds3 = ((Ts3 + Ti + Ts + Tc)*c);
Ds4 = ((Ts4 + Ti + Ts + Tc)*c);
%error in distance logging%
Df1 = Ds1 - Dps1;
Df2 = Ds2 - Dps2;
Df3 = Ds3 - Dps3;
Df4 = Ds4 - Dps4;
%Actual distance fo the staellites from the receiver%
Dr1 = (((Tr1 + Ti + Ts + Tc)*c) + Ee + Er + Em);
Dr2 = (((Tr2 + Ti + Ts + Tc)*c) + Ee + Er + Em);
Dr3 = (((Tr3 + Ti + Ts + Tc)*c) + Ee + Er + Em);
Dr4 = (((Tr4 + Ti + Ts + Tc)*c) + Ee + Er + Em);
%positon of the reference station.%
Xref = 12.1415;
Yref = 56.3571;
Xsat1 = 31.2622;
Ysat1 = 82.5654;
Xsat2 = 59.3657;
Ysat2 = 77.9868;
Xsat3 = 52.2337;
Ysat3 = 44.1679;
Xsat4 = 26.3276;
Ysat4 = 31.2159 ;
Pref = geopoint(Xref,Yref);
Psat1 = geopoint(Xsat1,Ysat1);
Psat2 = geopoint(Xsat2,Ysat2);
Psat3 = geopoint(Xsat3,Ysat3);
Psat4 = geopoint(Xsat4,Ysat4);
figure(2)
geoshow(Pref)
hold on
geoshow(Psat1)
geoshow(Psat2)
geoshow(Psat3)
geoshow(Psat4)
S = [{Xref,Yref} ,
{Xsat1,Ysat1},
{Xsat2,Ysat2},
{Xsat3,Ysat3},
{Xsat4,Ysat4}];
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 CubeSat and Satellites에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!