Reduced,Modified,Truncated,Dublin Julian Days, Mars Solar Date
Julian Day is defined as the number of days since noon UT on January 1, 4713 BC.
clc; clear all; % Input Date: April 11,2013. UT time 20:11:30 year = 2013; month = 4; day = 11; hour = 20; min = 11; sec = 30;
UT = hour + min/60 + sec/3600; J0 = 367*year - floor(7/4*(year + floor((month+9)/12))) ... + floor(275*month/9) + day + 1721013.5; JD = J0 + UT/24; % Julian Day
RJD = JD - 2400000; % Reduced JD MJD = JD - 2400000.5; % Modified JD, Introduced by SAO in 1957 TJD = JD - 2440000.5; % Truncated JD, Introduced by NASA in 1979 DJD = JD - 2415020; % Dublin JD, Introduced by the IAU in 1955 MSD = (JD - 2405522)/1.02749; % Mars Solar Date
fprintf('Julian Day = %6.4f [days] \n',JD) fprintf('Reduced JD = %6.4f [days] \n',RJD) fprintf('Modified JD = %6.4f [days] \n',MJD) fprintf('Truncated JD = %6.4f [days] \n',TJD) fprintf('Dublin JD = %6.4f [days] \n',DJD) fprintf('Mars Solar Date = %6.4f \n',MSD)
Julian Day = 2456394.3413 [days] Reduced JD = 56394.3413 [days] Modified JD = 56393.8413 [days] Truncated JD = 16393.8413 [days] Dublin JD = 41374.3413 [days] Mars Solar Date = 49511.2763
Julian Day
Julian Day is defined as the number of days since noon UT on January 1, 4713 BC.
clc; clear all; % Input Date: April 11,2013. UT time 20:11:30 year = 2013; month = 4; day = 11; hour = 20; min = 11; sec = 30;
UT = hour + min/60 + sec/3600; J0 = 367*year - floor(7/4*(year + floor((month+9)/12))) ... + floor(275*month/9) + day + 1721013.5; JD = J0 + UT/24; fprintf('Julian Day = %6.4f [days] \n',JD)
Julian Day = 2456394.3413 [days]
Sun-Synchronous Circular Orbit, Inclination vs Altitude (LEO,J2 perturbed)
This code is a MATLAB script that can be used to design and analyze Sun-synchronous orbits. A Sun-synchronous orbit is a geocentric orbit which combines altitude and inclination in such a way that an object in this orbit has an a nodal regression rate which is equals to Earth’s orbital rotation speed around the Sun. The object in this orbit constantly illuminated by the Sun.
Output: Inclination vs Altitude Plot
clc; clear all; mu = 398600.440; % Earth’s gravitational parameter [km^3/s^2] Re = 6378; % Earth radius [km] J2 = 0.0010826269; % Second zonal gravity harmonic of the Earth we = 1.99106e-7; % Mean motion of the Earth in its orbit around the Sun [rad/s] % Input Alt = 250:5:1000; % Altitude,Low Earth orbit (LEO) a = Alt + Re; % Mean semimajor axis [km] e = 0.0; % Eccentricity
h = a*(1 - e^2); % [km] n = (mu./a.^3).^0.5; % Mean motion [s-1] tol = 1e-10; % Error tolerance % Initial guess for the orbital inclination i0 = 180/pi*acos(-2/3*(h/Re).^2*we./(n*J2)); err = 1e1; while(err >= tol ) % J2 perturbed mean motion np = n.*(1 + 1.5*J2*(Re./h).^2.*(1 - e^2)^0.5.*(1 - 3/2*sind(i0).^2)); i = 180/pi*acos(-2/3*(h/Re).^2*we./(np*J2)); err = abs(i - i0); i0 = i; end
plot(Alt,i,'.b'); grid on;hold on; xlabel('Altitude,Low Earth orbit (LEO)'); ylabel('Mean orbital inclination'); title('Sun-Synchronous Circular Orbit,Inclination vs Altitude(LEO,J2 perturbed)'); hold off;
Sun-Synchronous (Heliosynchronous) Orbit, Mean Orbital Inclination (J2 perturbed)
This code is a MATLAB script that can be used to design and analyze Sun-synchronous orbits. A Sun-synchronous orbit is a geocentric orbit which combines altitude and inclination in such a way that an object in this orbit has an a nodal regression rate which is equals to Earth’s orbital rotation speed around the Sun. The object in this orbit constantly illuminated by the Sun. Input: a = Mean semimajor axis, e = Eccentricity
Output: i = Mean orbital inclination
clc; clear all; mu = 398600.440; % Earth’s gravitational parameter [km^3/s^2] Re = 6378; % Earth radius [km] J2 = 0.0010826269; % Second zonal gravity harmonic of the Earth we = 1.99106e-7; % Mean motion of the Earth in its orbit around the Sun [rad/s] % Input a = 7378; % Mean semimajor axis [km] e = 0.05; % Eccentricity
h = a*(1 - e^2); % [km] n = (mu/a^3)^0.5; % Mean motion [s-1] tol = 1e-10; % Error tolerance % Initial guess for the orbital inclination i0 = 180/pi*acos(-2/3*(h/Re)^2*we/(n*J2)); err = 1e1; while(err >= tol ) % J2 perturbed mean motion np = n*(1 + 1.5*J2*(Re/h)^2*(1 - e^2)^0.5*(1 - 3/2*sind(i0)^2)); i = 180/pi*acos(-2/3*(h/Re)^2*we/(np*J2)); err = abs(i - i0); i0 = i; end fprintf('Mean orbital inclination %4.5f [deg] \n',i);
Mean orbital inclination 99.43667 [deg]
Escape velocity,Sun and Earth surface
In this example we calculate the acceleration of gravity and the escape velocity at the Sun and Earth surface.
clc;clear all; G = 6.67384E-11; %Gravitational constant,[m^3kg-1s-2]
Sun
Ms = 1.98855e30; %Solar mass [kg] Rs = 6.955e8; %Solar radius [m] V_esc = (2*G*Ms/Rs)^0.5/1000; %Escape velocity [km/s] g = G*Ms/Rs^2; %Acceleration of gravity[m*s-2] fprintf('Acceleration of gravity[m*s-2] %4.2f \n',g); fprintf('Escape velocity [km/s] %4.2f \n\n',V_esc);
Acceleration of gravity[m*s-2] 274.36 Escape velocity [km/s] 617.76
Earth
Me = 5.98e24; %Earth mass [kg] Re = 6378000; %Earth radius [m] V_esc = (2*G*Me/Re)^0.5/1000; %[km/s] g = G*Me/Re^2; %Acceleration of gravity[m*s-2] fprintf('Acceleration of gravity[m*s-2] %4.2f \n',g); fprintf('Escape velocity [km/s] %4.2f \n',V_esc);%% Earth
Acceleration of gravity[m*s-2] 9.81 Escape velocity [km/s] 11.19