# calc_ang # Program to calculate the angular distance between two onjects in the sky # input: (coords1, coords2) : ([RA, Dec1], [RA2, Dec2]) : # ([hrs1, min1, sec1, deg1, arcmin1, arcsec1], [hrs2, min2, sec2, deg2, arcmin2, arcsec2]) # output: angle (degrees, arcmin, arcsec) # caldat # Program to convert a given Julian date to a calendar date # input: JD # output: day,month,year (also accepts decimals) # dd2dms # Program to convert decimal degrees to degrees, arcminutes and arcseconds # input: ddeg (decimal degrees) # output: deg,arcmin,arcsec.ss # dh2hms # Program to convert decimal hours to hours, minutes and seconds # input: dhours (decimal hours) # output: hh,mm,ss.ss (24 hour clock) # dms2dd # Program to convert degrees, arcminutes and arcseconds to decimal degrees # input: deg,arcmin,arcsec.ss # output: ddeg decimal degrees) # ecl2equa # Program to convert ecliptic to equatorial coordinates # input: ecliptic longitude, ecliptic latitude (in dms), obliquity # output: RA, Dec in decimal hours, degrees # "obliquity" is the obliquity of the ecliptic, the angle between the planes of # equator and the ecliptic (in decimal degrees). # GST2LST # Program to convert Greenwich mean sidereal time to local sidereal time # input: GST (in hr, min, sec), longtitude, direction (0 = W, 1 = E) # output: LST (in hr, min, sec) # gst2ut # Program to convert Greenwich mean sidereal time to universal time # input: GST (in hr, min, sec) # output: hrs,min,sec,dd,mm,yyyy # hms2dh # Program to convert hours, minutes and seconds to decimal hours # input: hh,mm,ss.ss # output: dhours (decimal hours) # julday # Program to convert a given calendar date to a Julian date # input: day,month,year (also accepts decimals) # output: JD # LST2GST # Program to convert Local sidereal time to Greenwich mean sidereal time # input: LST (in hr, min, sec), longtitude, direction (0 = W, 1 = E) # output: GST (in hr, min, sec) # moon_phase # Program to calculate the moon phase for a given date # input: julian date # output: moon_phase # moon_pos # Calculates the position of the Moon for a given instant at 0h 0m # Input : julian date # Output: moon_pos (RA, Dec, Distance) - in decimal hours, decimal degrees and # kilometers respectively # Requires table1.txt and table2.txt # #table1.txt: #Periodic terms for the longitude (sig1) and distance (sigr) of the Moon. #The unit is 0.000001 degree for sig1 and 0.001 km for sigr. # #Columns: # #Argument - sig1 - sigr #Multiple of #1 2 3 4 5 6 #D M M' F coeff. of the coeff. of the # sine of the cosine of the # argument argument # # #table2.txt #Periodic terms for the latitude of the Moon (sigb). #The unit is 0.000001 degree. # #Columns: # #Argument - sigb #Multiple of #1 2 3 4 5 #D M M' F coeff. of the # sine of the # argument # nutation # Calculates the nutation # The nutation is a periodic oscillation of the rotational axis of the Earth # around it's 'mean' position. # Input : julian date # Output: nutation in longitude, nutation in obliquity (in arcsec) # Approximations accurate to 0.5 arcsec in delta_psi and # 0.1 arcsec in delta_epsilon # Requires table3.txt #table3.txt: #This is table 21.A from Astronomical Algorithms J. Meeus p133 #Periodic terms for the nutation in longitude and in obliquity. #The unit is 0.0001 arcsec. #Columns: # #Argument delta_psi delta_epsilon #multiple of # #1 2 3 4 5 6 7(T) 8 9(T) #D M M' F Omega coeff. of the sine coeff. of the cosine # argument argument # obliq_eclip # Program to calculate the value of the mean obliquity of the ecliptic # input: julian date # output: obliquity (in decimal degrees) # "obliquity" is the obliquity of the ecliptic, the angle between the planes of # equator and the ecliptic. # rd_tables - Read file module # Input : a text file with x columns and y lines # Output: 'out_table' with each element being an array # corresponding to each line of the input file # and 'elements' being the total number of lines. # calling example -> # [a,b] = rd_tables.rd_tables("file.txt") # rise_set # Program to calculate the rise and set times of an object in the sky. # It returns the times at which the altitude reaches 0 degrees. # It does not account for atmospheric refraction or parallax. # input: ([coordinates, latitude, date]) : ([RA, Dec, latitude, longtitude, date]) # : ([hrs, min, sec, deg, arcmin, arcsec, deg, direction, deg, direction, dd, mm, yyyy]) # where latitude is a 2 element array and direction is 0 (North) or 1 (South) # and longtitude is a 2 element array and direction is 0 (West) or 1 (East) # and date is in dd, mm, yyyy # Total of 13 parameters # output: rise and set times ([rise_hr, rise_min, rise_sec, set_hr, set_min, set_sec]) # sun_pos # Program to calculate the apparent position of the Sun # input: julian date # output: sun_pos (RA, Dec) in decimal hours, decimal degrees # ut2gst # Program to convert universal time to Greenwich mean sidereal time # input: hrs,min,sec,dd,mm,yyyy # output: GST (in hr, min, sec)