Small Satellites

Home » Space Flight/Orbital Mechanics » Right ascension and declination from 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]
Advertisement

2 Comments

  1. Paige says:

    How would you do it in reverse? Get the unit position vector from the right ascention and declination?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Recent Post

%d bloggers like this: