Home » Posts tagged 'Julian Day'

# Tag Archives: Julian Day

## Local Sidereal Time

This code is a MATLAB script that can be used to calculate Greenwich Sidereal Time, Local Sidereal Time, Julian Day

```clc;
clear all;```

## Input:

Date, April 11,2013, UT time 20:11:30, Longitude [deg]

## Output:

Julian day(JD), Greenwich sidereal time(GST), Local sidereal time(LST)

```year  = 2013;  month = 4;  day   = 11;
hour  = 20;    min   = 11; sec   = 30;
long  = -73.99;```

Julian day

```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
fprintf('Julian day = %6.4f [days] \n',JD);```
`Julian day = 2456394.3413 [days]`

JC is Julian centuries between the Julian day J0 and J2000(2,451,545.0) Greenwich sidereal time at 0 hr UT can be calculated by this equation [Seidelmann,1992]

```JC = (J0 - 2451545.0)/36525;
GST0 = 100.4606184 + 36000.77004*JC + 0.000387933*JC^2 - 2.583e-8*JC^3; %[deg]
GST0 = mod(GST0, 360);  % GST0 range [0..360]
fprintf('Greenwich sidereal time at 0 hr UT %6.4f [deg]\n',GST0);```
`Greenwich sidereal time at 0 hr UT 199.3719 [deg]`

Greenwich sidereal time at any other UT time

```GST = GST0 + 360.98564724*UT/24;
GST = mod(GST, 360);  % GST0 range [0..360]
fprintf('Greenwich sidereal time at UT[hours] %6.4f [deg]\n',GST);```
`Greenwich sidereal time at UT[hours] 143.0761 [deg]`

Local sidereal time (LST)

```LST = GST + long;
LST = mod(LST, 360);  % LST range [0..360]
fprintf('Local sidereal time,LST %6.4f [deg]\n',LST);```
`Local sidereal time,LST 69.0861 [deg]`

## Greenwich Sidereal Time

This code is a MATLAB script that can be used to calculate Greenwich Sidereal Time, Julian Day

```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
fprintf('Julian day = %6.4f [days] \n',JD);
JC = (J0 - 2451545.0)/36525;```
`Julian day = 2456394.3413 [days]`

JC is Julian centuries between the Julian day J0 and J2000(2,451,545.0) Greenwich sidereal time at 0 hr UT can be calculated by this equation [Seidelmann,1992]

```GST0 = 100.4606184 + 36000.77004*JC + 0.000387933*JC^2 - 2.583e-8*JC^3; %[deg]
GST0 = mod(GST0, 360);  % GST0 range [0..360]
fprintf('Greenwich sidereal time at 0 hr UT %6.4f [deg]\n',GST0);```
`Greenwich sidereal time at 0 hr UT 199.3719 [deg]`

Greenwich sidereal time at any other UT time

```GST = GST0 + 360.98564724*UT/24;
GST = mod(GST, 360);  % GST0 range [0..360]
fprintf('Greenwich sidereal time at UT[hours] %6.4f [deg]\n',GST);```
`Greenwich sidereal time at UT[hours] 143.0761 [deg]`

## 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]`