Astronomical coordinates utilities
Maintainer(s):
teobouvard
Compatibility Matrix
This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 |
|---|---|---|---|---|---|
| Linux AMD64 | |||||
| Linux ARM64 | |||||
| macOS AMD64 | |||||
| macOS ARM64 | |||||
| Windows AMD64 | |||||
| Windows ARM64 | |||||
| WebAssembly |
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
| name | description | input_type | scope | aliases | typed_value |
|---|---|---|---|---|---|
| temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |