Small Satellites

Home » Posts tagged 'position vector'

Tag Archives: position vector

Right ascension and declination from position vector

Given the position vector R of a satellite in a geocentric equatorial frame.In this Example we will show how to calculate the right ascension and declination.

clear all;
clc;
R = [-5239 1989 4581]; % Position vector
r = norm(R);
l  = R(1)/r; m = R(2)/r; n =R(3)/r;        % Direction cosines
delta = asin(n)*180/pi;                    % Declination
% Right ascension:
if (m >0)
    alfa = acos(l/cosd(delta))*180/pi;
else
    alfa = 360 - acos(l/cosd(delta))*180/pi;
end
fprintf('Right ascension = %4.2f [deg] \n',alfa);
fprintf('Declination = %4.2f [deg] \n',delta);
Right ascension = 159.21 [deg] 
Declination = 39.27 [deg]
Advertisements
%d bloggers like this: