Code covered by the BSD License  

Highlights from
A MATLAB Script for Predicting Transits of Mercury and Venus

A MATLAB Script for Predicting Transits of Mercury and Venus

by

 

07 Dec 2012 (Updated )

Local circumstances of solar transits of the planets Mercury and Venus.

esfunc(x)
function fx = esfunc(x)

% equinox/solstice objective function

% Celestial Computing with MATLAB

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

global jdatei along2 rlsun iequsol
    
jdate = jdatei + x;

[rasc, decl, rsun] = sun2 (jdate);

if (iequsol == 1 || iequsol == 3)
    
   fx = decl;
   
else
    
   fx = along2 - rlsun;
   
end

Contact us