Astrex.Stars (Astrex v0.5.1)
View SourceThis module provides functions to query for Bright stars in a list of 200 up to magnitude 3.1
The intended usage is retrieving the most appropriate stars to perform a 2/3 stars alignment of a telescope
The catalog is excerpted from https://in-the-sky.org/data/catalogue.php?cat=Bright+Star and limited to one or two stars from each constellation, within the magnitude limits described above
The available columns are
0: Magnitude
1: Constellation
2: RA Right Ascension - format hh:mm:ss
3: Dec Declination - format (-)deg:min:secs
4: Name Primary name, such as α-CMa
5: aka Also known as, such as Sirius
The following filtering are provided
- by magnitude (brighter than)
- by azimuth from a given position - not closer than specified degrees
- by azimuth from a given position - not farther than specified degrees
- by altitude from a given position - not closer than specified degrees
- by altitude from a given position - not farther than specified degrees
The filters can be combined
Note: Coordinates of the objects are returned in (+/-)dd:mm:ss and hh:mm:ss (strings)
Summary
Functions
finds all bright stars that meet the specifications
Functions
finds all bright stars that meet the specifications:
- maximum magnitude (anything as bright or brigther matches)
- closer than X degrees from given coordinates (only close stars match)
- farther than X degrees from given coordinates (only farther stars match)
accepts 3 arguments:
magnitude - required, integer
%{az: ref_az, d_az: delta_az, type_az: "IN"/"OUT"} - optional, map
delta_az is the distance plus/minus ref_az defining the search interval type_az, IN/OUT, determines the search IN or OUT the interval
%{alt: ref_alt, d_alt: delta_alt, type_alt: "IN"/"OUT"} - optional, map
delta_az is the distance plus/minus ref_az defining the search interval type_az, IN/OUT, determines the search IN or OUT the interval
Examples
iex> Astrex.Server.start_link
iex> Astrex.Stars.select_stars(0.5, %{az: 90, d_az: 45, type_az: "IN"}, %{alt: 60, d_alt: 30, type_alt: "IN"})
[
%{aka: "Capella", alt: 46.471899486382085, ra: "05:16:41", az: 69.23413116540189, const: "Auriga", dec: "45:59:56", id: "α-Aur", mag: "0.1"}
]
one star found matching the requirements at the mock time/mock location
Astrex.Server.get_ll --> %{lat: 51.477928, long: 0.0}
Astrex.Common.ndt_now --> ~N[2023-01-01 18:00:15.922068]
iex> Astrex.Server.start_link
iex> Astrex.Stars.select_stars(0.5)
[
%{aka: "Capella", alt: 46.471899486382085, az: 69.23413116540189, const: "Auriga", dec: "45:59:56", id: "α-Aur", mag: "0.1", ra: "05:16:41"},
%{aka: "Vega", alt: 28.25618477533259, az: 297.8147144352378, const: "Lyra", dec: "38:46:58", id: "α-Lyr", mag: "0.0", ra: "18:36:56"},
%{aka: "Rigel", alt: 7.176735179533099, az: 112.89401627493982, const: "Orion", dec: "-08:12:05", id: "β-Ori", mag: "0.3", ra: "05:14:32"},
%{aka: "Procyon", alt: -4.292759056473423, az: 76.05487291217511, const: "Canis Minor", dec: "05:13:39", id: "α-CMi", mag: "0.4", ra: "07:39:18"},
%{aka: "Sirius", alt: -13.057787690330622, az: 100.52410739917546, const: "Canis Major", dec: "-16:42:47", id: "α-CMa", mag: "-1.4", ra: "06:45:09"},
%{aka: "Arcturus", alt: -16.585528504402962, az: 337.6290585758656, const: "Bootes", dec: "19:11:14", id: "α-Boo", mag: "0.2", ra: "14:15:40"},
%{aka: "Achernar", alt: -19.256179758399565, az: 172.46262860557806, const: "Eridanus", dec: "-57:14:11", id: "α-Eri", mag: "0.5", ra: "01:37:42"},
%{aka: "Canopus", alt: -36.018291932764726, az: 131.73791696086482, const: "Carina", dec: "-52:41:44", id: "α-Car", mag: "-0.6", ra: "06:23:57"},
%{aka: "Rigil Kentaurus", alt: -71.68742064459886, az: 228.18421733259387, const: "Centaurus", dec: "-60:50:06", id: "α-Cen", mag: "-0.0", ra: "14:39:40"},
]
all 9 stars brigther than magnitude 0.5 matched the specification and where returned in order of altitude (highest first)