| [x,y,z,vx,vy,vz]=posvel(l,b,r,dl,db,dr)
|
function [x,y,z,vx,vy,vz]=posvel(l,b,r,dl,db,dr)
% function [x,y,z,vx,vy,vz]=posvel(l,b,r,dl,db,dr)
%
% cartesian position and velocity
% from polar coordinates and polar velocity
% algorithms by Montenbruck/Pfleger: "Astronomy with the Personal Computer"
%
% 05.05.04 M.Penzkofer
rho = pi/180;
CL = cos(l*rho);
SL = sin(l*rho);
CB = cos(b*rho);
SB = sin(b*rho);
x = r*CL*CB; vx = dr*CL*CB-dl*r*SL*CB-db*r*CL*SB;
y = r*SL*CB; vy = dr*SL*CB+dl*r*CL*CB-db*r*SL*SB;
z = r*SB; vz = dr*SB +db*r*CB;
|
|