Astronomical coordinates utilities
Maintainer(s):
teobouvard
Installing and Loading
INSTALL celestial FROM community;
LOAD celestial;
Example
SELECT angular_separation_deg(204.2538292, -29.8657611, 201.3650633, -43.0191125);
About celestial
The celestial extension provides functions for working with astronomical coordinates.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| spherical_angle | scalar | Compute the angle between two points on the sphere. Prefer angular_separation_rad to be more explicit about units. |
Input coordinates in radians (RA_1, DEC_1, RA_2, DEC_2). Output angle in radians. | [SELECT spherical_angle(0, 0, 1, 0);] |
| angular_separation_rad | scalar | Compute the angular separation between two sky positions | Input coordinates in radians (RA_1, DEC_1, RA_2, DEC_2). Output separation in radians. | [SELECT angular_separation_rad(0, 0, 1, 0);] |
| angular_separation_deg | scalar | Compute the angular separation between two sky positions | Input coordinates in degrees (RA_1, DEC_1, RA_2, DEC_2). Output separation in degrees. | [SELECT angular_separation_deg(204.2538292, -29.8657611, 201.3650633, -43.0191125);] |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.