Code covered by the BSD License  

Highlights from
A MATLAB Script for Predicting Lunar Occultations

A MATLAB Script for Predicting Lunar Occultations

by

 

07 Dec 2012 (Updated )

Predict the local circumstances of lunar occultations of a planet or star.

propmo (tjd1, pos1, vel1, tjd2)
function pos2 = propmo (tjd1, pos1, vel1, tjd2)

% this function applies proper motion, including
% foreshortening effects, to a star's position

% input

%  tjd1 = tdb julian date of first epoch
%  pos1 = position vector at first epoch
%  vel1 = velocity vector at first epoch
%  tjd2 = tdb julian date of second epoch

% output

%  pos2 = position vector at second epoch

% Orbital Mechanics with Matlab

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for j = 1:1:3
    pos2(j) = pos1(j) + vel1(j) * (tjd2 - tjd1);
end

Contact us