Functions related to calendar and time conversions.
swe_julday(year, month, day, hourd, gregflag)
swe_date_conversion(year, month, day, hourd, cal)
swe_revjul(jd, gregflag)
swe_utc_time_zone(year, month, day, houri, min, sec, d_timezone)
swe_utc_to_jd(year, month, day, houri, min, sec, gregflag)
swe_jdet_to_utc(jd_et, gregflag)
swe_jdut1_to_utc(jd_ut, gregflag)
swe_time_equ(jd_ut)
swe_lmt_to_lat(jd_lmt, geolon)
swe_lat_to_lmt(jd_lat, geolon)
Astronomical year as integer
Month as integer
Day as integer
Hour as double
Calendar type as integer (SE$JUL_CAL=0 or SE$GREG_CAL=1)
Calendar type "g" [Gregorian] or "j" [Julian] as char
Julian day number as double
Hour as integer
min as integer
Second as double
Timezone offset as double (hour)
Julian day number (ET) as double (day)
Julian day number (UT) as double (day)
Julian day number (LMT=UT+geolon/360) as double (day)
geographic longitude as double (deg)
Julian day number (LAT) as double (day)
swe_date_conversion
returns a list with named entries: return
status flag as integer,
jd
Julian day number as double
swe_revjul
returns a list with named entries: year
year as integer,
month
month as integer, day
day as integer and hour
hour as double.
swe_utc_time_zone
returns a list with named entries: year_out
year as integer,
month_out
month as integer, day_out
day as integer, hour_out
hour as integer, min_out
minute as integer,
sec_out
second as double,
swe_utc_to_jd
returns a list with named entries: return
status flag as integer,
dret
Julian day number as numeric vector and serr
for error message as string.
swe_jdet_to_utc
returns a list with named entries: year_out
year as integer,
month_out
month as integer, day_out
day as integer, hour_out
hour as integer, min_out
minute as integer,
sec_out
second as double,
swe_jdut1_to_utc
returns a list with named entries: year_out
year as integer,
month_out
month as integer, day_out
day as integer, hour_out
hour as integer, min_out
minute as integer,
sec_out
second as double,
swe_swe_time_equ
returns a list with named entries: return
status flag as integer,
e
equation of time (day) as double and serr
for error message as string.
swe_lmt_to_lat
returns a list with named entries: return
status flag as integer,
jd_lat
Julian day number (LAT) (day) as double and serr
for error message as string.
swe_lat_to_lmt
returns a list with named entries: return
status flag as integer,
jd_lmt
Julian day number (LMT) (day) as double and serr
for error message as string.
Convert calendar dates to the astronomical time scale which measures time in Julian day number.
Convert calendar dates to the astronomical time scale which measures time in Julian day number and checks if the calendar date is legal.
Compute year, month, day and hour from a Julian day number.
Convert local time to UTC and UTC to local time.
Convert UTC to Julian day number (UT and ET).
Convert Julian day number (ET) into UTC.
Convert Julian day number (UT1) into UTC.
Calculate equation of time (LAT-LMT).
Convert Julian day number (LMT) into Julian day number (LAT).
Convert Julian day number (LAT) into Julian day number (LMT).
Section 7 in http://www.astro.com/swisseph/swephprg.htm. Remember that array indices start in R at 1, while in C they start at 0!
data(SE)
swe_julday(2000,1,1,12,SE$GREG_CAL)
#> [1] 2451545
swe_date_conversion(2000,1,1,12,"g")
#> $return
#> [1] 0
#>
#> $jd
#> [1] 2451545
#>
swe_revjul(2452500,SE$GREG_CAL)
#> $year
#> [1] 2002
#>
#> $month
#> [1] 8
#>
#> $day
#> [1] 13
#>
#> $hour
#> [1] 12
#>
swe_utc_time_zone(2000,1,1,12,5,1.2,2)
#> $year_out
#> [1] 2000
#>
#> $month_out
#> [1] 1
#>
#> $day_out
#> [1] 1
#>
#> $hour_out
#> [1] 10
#>
#> $min_out
#> [1] 5
#>
#> $sec_out
#> [1] 1.2
#>
swe_utc_to_jd(2000,1,1,0,12,3.4,SE$GREG_CAL)
#> $return
#> [1] 0
#>
#> $dret
#> [1] 2451545 2451545
#>
#> $serr
#> [1] ""
#>
swe_jdet_to_utc(2452500,SE$GREG_CAL)
#> $year_out
#> [1] 2002
#>
#> $month_out
#> [1] 8
#>
#> $day_out
#> [1] 13
#>
#> $hour_out
#> [1] 11
#>
#> $min_out
#> [1] 58
#>
#> $sec_out
#> [1] 55.816
#>
swe_jdut1_to_utc(2452500,SE$GREG_CAL)
#> $year_out
#> [1] 2002
#>
#> $month_out
#> [1] 8
#>
#> $day_out
#> [1] 13
#>
#> $hour_out
#> [1] 12
#>
#> $min_out
#> [1] 0
#>
#> $sec_out
#> [1] 0.2300933
#>
swe_time_equ(2452500)
#> $return
#> [1] 0
#>
#> $e
#> [1] -0.003387399
#>
#> $serr
#> [1] ""
#>
swe_lmt_to_lat(2452500,0)
#> $return
#> [1] 0
#>
#> $jd_lat
#> [1] 2452500
#>
#> $serr
#> [1] ""
#>
swe_lat_to_lmt(2452500,0)
#> $return
#> [1] 0
#>
#> $jd_lmt
#> [1] 2452500
#>
#> $serr
#> [1] ""
#>