Matlab draws celestial coordinates, knowing azimuth and altitude

Knowing the azimuth and altitude of some celestial bodies, how to express them in celestial coordinates?

Here's an actual problem I ran into on a recent small project

 

Below is my code:

%produce random data of tpoint

mm=30;
A0=360*rand(mm,1);
E0=90*rand(mm,1);
dltA=0.01*rand(mm,1);
dltE=0.01*rand(mm,1);
nm=1;
while nm<=mm
   if (E0(nm,1)<10)
       E0(nm,1)=E0(nm,1)+10;
   end
    nm=nm+1;
end
A1=A0-dltA;
E1=E0-dltE;
format long g
D=[A0 E0 A1 E1];

figure(1)
polar(A0,E0,'or');
title('Sky plot')
dlmwrite('Newdata.dat',D,'delimiter',' ','newline','pc','precision','%.06f');
% save('Newdata.dat','D','-ascii') 
type('Newdata.dat');

 

Guess you like

Origin blog.csdn.net/a180736/article/details/113190892