Astrononomical geometry functions¶
Some generally helpful astronomical geometry functions for base QC.
- marine_qc.astronomical_geometry.azimuth_elevation(lat, declination, hour_angle)[source]
Get both azimuth and geometric elevation of sun.
- marine_qc.astronomical_geometry.calculate_azimuth(declination, hour_angle, elevation, phi)[source]
Calculate azimuth.
- marine_qc.astronomical_geometry.calculate_sun_parameters(time)[source]
Calculate both right ascension and declination of sun.
- marine_qc.astronomical_geometry.convert_degrees(deg)[source]
Convert degrees.
- marine_qc.astronomical_geometry.elliptic_angle(time)[source]
Get angle plane of elliptic to plane of celestial equator.
- marine_qc.astronomical_geometry.mean_earth_anomaly(time, theta)[source]
Calculate mean anomaly of earth (g).
- marine_qc.astronomical_geometry.sin_of_elevation(phi, declination, hour_angle)[source]
Get sinus of geometric elevation.
- marine_qc.astronomical_geometry.sun_ascension(long_of_sun, sin_long_of_sun, angle_of_elliptic)[source]
Calculate right ascension.
- marine_qc.astronomical_geometry.sun_azimuth(phi, declination)[source]
Get azimuth.
- marine_qc.astronomical_geometry.sun_declination(sin_long_of_sun, angle_of_elliptic)[source]
Calculate declination of sun.
- marine_qc.astronomical_geometry.sun_hour_angle(local_siderial_time, right_ascension)[source]
Get hour angle.
- marine_qc.astronomical_geometry.sun_longitude(time)[source]
Get longitude of sun.
- marine_qc.astronomical_geometry.sun_position(time)[source]
Find position of sun in celestial sphere, assuming circular orbit (radians).
- marine_qc.astronomical_geometry.sunangle(year, day, hour, minute, sec, zone, dasvtm, lat, lon)[source]
Calculate the local azimuth and elevation of the sun at a specified location and time.
- Parameters:
year (
int) – Year.day (
int) – Day number of year starting with 1 for Jan 1st and running up to 365/6.hour (
int) – Hour.minute (
int) – Minute.sec (
int) – Second.zone (
int) – The local international time zone, counted westward from Greenwich.dasvtm (
int) – 1 if daylight saving time is in effect, otherwise 0.lat (
float) – Latitude in degrees, north is positive.lon (
float) – Longitude in degrees, east is positive.
- Return type:
- Returns:
tupleoffloat– A tuple of six floats representing Azimuth angle of the sun (degrees east of north), Elevation of sun (degrees), Right ascension of sun (degrees), Hour angle of sun (degrees), Hour angle of local siderial time (degrees) and Declination of sun (degrees).
Notes
Copied from Rob Hackett’s area 28 Apr 1998 by J.Arnott. Add protection for ASIN near +/- 90 degrees 07 Jan 2002 by J.Arnott. Pythonised 25/09/2015 by J.J. Kennedy
The Python version gets within a fraction of a degree of the original Fortran code from which it was ported for a range of values. The differences are larger if single precision values are used suggesting that this is not the most numerically robust scheme.
- marine_qc.astronomical_geometry.to_local_siderial_time(time, time_in_hours, delyear, lon)[source]
Convert to local siderial time.