{
@@ -147,7 +147,7 @@ export async function pgOrbitOgImage({
color: "#e2e8f0",
}}
>
- pg_orbit
+ pg_orrery
- pg-orbit.warehack.ing
+ pg-orrery.warehack.ing
diff --git a/docs/src/styles/custom.css b/docs/src/styles/custom.css
index 8106af4..24f7d39 100644
--- a/docs/src/styles/custom.css
+++ b/docs/src/styles/custom.css
@@ -5,7 +5,7 @@
@import "@fontsource/jetbrains-mono/400.css";
@import "@fontsource/jetbrains-mono/500.css";
-/* pg_orbit palette — deep space observation theme */
+/* pg_orrery palette — deep space observation theme */
:root {
--sl-font: "Inter", system-ui, -apple-system, sans-serif;
--sl-font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
diff --git a/pg_orbit.control b/pg_orbit.control
deleted file mode 100644
index 4d65414..0000000
--- a/pg_orbit.control
+++ /dev/null
@@ -1,4 +0,0 @@
-comment = 'Orbital mechanics types and functions for PostgreSQL'
-default_version = '0.3.0'
-module_pathname = '$libdir/pg_orbit'
-relocatable = true
diff --git a/pg_orrery.control b/pg_orrery.control
new file mode 100644
index 0000000..34df8c8
--- /dev/null
+++ b/pg_orrery.control
@@ -0,0 +1,4 @@
+comment = 'A database orrery — celestial mechanics types and functions for PostgreSQL'
+default_version = '0.3.0'
+module_pathname = '$libdir/pg_orrery'
+relocatable = true
diff --git a/sql/pg_orbit--0.1.0--0.2.0.sql b/sql/pg_orrery--0.1.0--0.2.0.sql
similarity index 99%
rename from sql/pg_orbit--0.1.0--0.2.0.sql
rename to sql/pg_orrery--0.1.0--0.2.0.sql
index 56084e8..43af33f 100644
--- a/sql/pg_orbit--0.1.0--0.2.0.sql
+++ b/sql/pg_orrery--0.1.0--0.2.0.sql
@@ -1,4 +1,4 @@
--- pg_orbit 0.1.0 -> 0.2.0 migration
+-- pg_orrery 0.1.0 -> 0.2.0 migration
--
-- Phase 1: Stars, comets, and Keplerian propagation.
-- Adds heliocentric type, star observation, and two-body propagation.
diff --git a/sql/pg_orbit--0.1.0.sql b/sql/pg_orrery--0.1.0.sql
similarity index 99%
rename from sql/pg_orbit--0.1.0.sql
rename to sql/pg_orrery--0.1.0.sql
index 917e663..cfb3c74 100644
--- a/sql/pg_orbit--0.1.0.sql
+++ b/sql/pg_orrery--0.1.0.sql
@@ -1,4 +1,4 @@
--- pg_orbit -- Orbital mechanics types and functions for PostgreSQL
+-- pg_orrery -- Orbital mechanics types and functions for PostgreSQL
--
-- Types: tle, eci_position, geodetic, topocentric, observer, pass_event
-- Provides SGP4/SDP4 propagation, coordinate transforms, pass prediction,
diff --git a/sql/pg_orbit--0.2.0--0.3.0.sql b/sql/pg_orrery--0.2.0--0.3.0.sql
similarity index 97%
rename from sql/pg_orbit--0.2.0--0.3.0.sql
rename to sql/pg_orrery--0.2.0--0.3.0.sql
index 04a396e..03aef04 100644
--- a/sql/pg_orbit--0.2.0--0.3.0.sql
+++ b/sql/pg_orrery--0.2.0--0.3.0.sql
@@ -1,4 +1,4 @@
--- pg_orbit 0.2.0 -> 0.3.0 migration
+-- pg_orrery 0.2.0 -> 0.3.0 migration
--
-- Adds optional JPL DE440/441 ephemeris functions.
-- Existing VSOP87/ELP2000-82B functions are unchanged (still IMMUTABLE).
@@ -76,11 +76,11 @@ COMMENT ON FUNCTION mars_moon_observe_de(int4, observer, timestamptz) IS
-- Diagnostic function
-CREATE FUNCTION pg_orbit_ephemeris_info(
+CREATE FUNCTION pg_orrery_ephemeris_info(
OUT provider text, OUT file_path text,
OUT start_jd float8, OUT end_jd float8,
OUT version int4, OUT au_km float8
) RETURNS RECORD
AS 'MODULE_PATHNAME' LANGUAGE C STABLE PARALLEL SAFE;
-COMMENT ON FUNCTION pg_orbit_ephemeris_info() IS
+COMMENT ON FUNCTION pg_orrery_ephemeris_info() IS
'Returns current ephemeris provider status: VSOP87 or JPL_DE with file path, JD range, version, and AU value.';
diff --git a/sql/pg_orbit--0.2.0.sql b/sql/pg_orrery--0.2.0.sql
similarity index 99%
rename from sql/pg_orbit--0.2.0.sql
rename to sql/pg_orrery--0.2.0.sql
index 6a041c5..35ca364 100644
--- a/sql/pg_orbit--0.2.0.sql
+++ b/sql/pg_orrery--0.2.0.sql
@@ -1,4 +1,4 @@
--- pg_orbit -- Orbital mechanics types and functions for PostgreSQL
+-- pg_orrery -- Orbital mechanics types and functions for PostgreSQL
--
-- Types: tle, eci_position, geodetic, topocentric, observer, pass_event
-- Provides SGP4/SDP4 propagation, coordinate transforms, pass prediction,
@@ -514,7 +514,7 @@ CREATE OPERATOR CLASS tle_ops
FUNCTION 6 gist_tle_picksplit(internal, internal),
FUNCTION 7 gist_tle_same(internal, internal, internal),
FUNCTION 8 gist_tle_distance(internal, tle, smallint, oid, internal);
--- pg_orbit 0.1.0 -> 0.2.0 migration
+-- pg_orrery 0.1.0 -> 0.2.0 migration
--
-- Phase 1: Stars, comets, and Keplerian propagation.
-- Adds heliocentric type, star observation, and two-body propagation.
diff --git a/sql/pg_orbit--0.3.0.sql b/sql/pg_orrery--0.3.0.sql
similarity index 99%
rename from sql/pg_orbit--0.3.0.sql
rename to sql/pg_orrery--0.3.0.sql
index 43be4c3..57e31f9 100644
--- a/sql/pg_orbit--0.3.0.sql
+++ b/sql/pg_orrery--0.3.0.sql
@@ -1,4 +1,4 @@
--- pg_orbit -- Orbital mechanics types and functions for PostgreSQL
+-- pg_orrery -- Orbital mechanics types and functions for PostgreSQL
--
-- Types: tle, eci_position, geodetic, topocentric, observer, pass_event
-- Provides SGP4/SDP4 propagation, coordinate transforms, pass prediction,
@@ -514,7 +514,7 @@ CREATE OPERATOR CLASS tle_ops
FUNCTION 6 gist_tle_picksplit(internal, internal),
FUNCTION 7 gist_tle_same(internal, internal, internal),
FUNCTION 8 gist_tle_distance(internal, tle, smallint, oid, internal);
--- pg_orbit 0.1.0 -> 0.2.0 migration
+-- pg_orrery 0.1.0 -> 0.2.0 migration
--
-- Phase 1: Stars, comets, and Keplerian propagation.
-- Adds heliocentric type, star observation, and two-body propagation.
@@ -702,7 +702,7 @@ CREATE FUNCTION lambert_c3(int4, int4, timestamptz, timestamptz) RETURNS float8
AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
COMMENT ON FUNCTION lambert_c3(int4, int4, timestamptz, timestamptz) IS
'Departure C3 (km^2/s^2) for a Lambert transfer. Returns NULL if solver fails. For pork chop plots.';
--- pg_orbit 0.2.0 -> 0.3.0 migration
+-- pg_orrery 0.2.0 -> 0.3.0 migration
--
-- Adds optional JPL DE440/441 ephemeris functions.
-- Existing VSOP87/ELP2000-82B functions are unchanged (still IMMUTABLE).
@@ -780,11 +780,11 @@ COMMENT ON FUNCTION mars_moon_observe_de(int4, observer, timestamptz) IS
-- Diagnostic function
-CREATE FUNCTION pg_orbit_ephemeris_info(
+CREATE FUNCTION pg_orrery_ephemeris_info(
OUT provider text, OUT file_path text,
OUT start_jd float8, OUT end_jd float8,
OUT version int4, OUT au_km float8
) RETURNS RECORD
AS 'MODULE_PATHNAME' LANGUAGE C STABLE PARALLEL SAFE;
-COMMENT ON FUNCTION pg_orbit_ephemeris_info() IS
+COMMENT ON FUNCTION pg_orrery_ephemeris_info() IS
'Returns current ephemeris provider status: VSOP87 or JPL_DE with file path, JD range, version, and AU value.';
diff --git a/src/astro_math.h b/src/astro_math.h
index ca0745e..251210c 100644
--- a/src/astro_math.h
+++ b/src/astro_math.h
@@ -1,5 +1,5 @@
/*
- * astro_math.h -- Shared astronomical math for pg_orbit
+ * astro_math.h -- Shared astronomical math for pg_orrery
*
* Static inline functions used by star_funcs.c, kepler_funcs.c,
* and future planet/moon observation code.
@@ -8,8 +8,8 @@
* cross-translation-unit symbol coupling.
*/
-#ifndef PG_ORBIT_ASTRO_MATH_H
-#define PG_ORBIT_ASTRO_MATH_H
+#ifndef PG_ORRERY_ASTRO_MATH_H
+#define PG_ORRERY_ASTRO_MATH_H
#include
#include "types.h"
@@ -217,4 +217,4 @@ observe_from_geocentric(const double geo_ecl_au[3], double jd,
result->range_rate = 0.0; /* no velocity computation yet */
}
-#endif /* PG_ORBIT_ASTRO_MATH_H */
+#endif /* PG_ORRERY_ASTRO_MATH_H */
diff --git a/src/coord_funcs.c b/src/coord_funcs.c
index 212fb69..0f86e0a 100644
--- a/src/coord_funcs.c
+++ b/src/coord_funcs.c
@@ -1,5 +1,5 @@
/*
- * coord_funcs.c -- Coordinate transform functions for pg_orbit
+ * coord_funcs.c -- Coordinate transform functions for pg_orrery
*
* TEME -> WGS-84 geodetic and TEME -> topocentric transforms.
*
diff --git a/src/de_funcs.c b/src/de_funcs.c
index 39b1682..f4653ad 100644
--- a/src/de_funcs.c
+++ b/src/de_funcs.c
@@ -47,7 +47,7 @@ PG_FUNCTION_INFO_V1(galilean_observe_de);
PG_FUNCTION_INFO_V1(saturn_moon_observe_de);
PG_FUNCTION_INFO_V1(uranus_moon_observe_de);
PG_FUNCTION_INFO_V1(mars_moon_observe_de);
-PG_FUNCTION_INFO_V1(pg_orbit_ephemeris_info);
+PG_FUNCTION_INFO_V1(pg_orrery_ephemeris_info);
/* ================================================================
@@ -469,7 +469,7 @@ lambert_c3_de(PG_FUNCTION_ARGS)
* and Earth positions. Falls back to VSOP87 if DE is unavailable.
*
* moon_rel[3]: moon position relative to parent (ecliptic J2000, AU)
- * parent_body_id: pg_orbit body ID of parent (5=Jupiter, 6=Saturn, etc.)
+ * parent_body_id: pg_orrery body ID of parent (5=Jupiter, 6=Saturn, etc.)
*/
static void
observe_moon_de(const double moon_rel[3], int parent_body_id,
@@ -611,14 +611,14 @@ mars_moon_observe_de(PG_FUNCTION_ARGS)
/* ================================================================
- * pg_orbit_ephemeris_info() -> RECORD
+ * pg_orrery_ephemeris_info() -> RECORD
*
* Diagnostic function: returns current ephemeris provider status.
* STABLE (not STRICT — no args), PARALLEL SAFE.
* ================================================================
*/
Datum
-pg_orbit_ephemeris_info(PG_FUNCTION_ARGS)
+pg_orrery_ephemeris_info(PG_FUNCTION_ARGS)
{
TupleDesc tupdesc;
Datum values[6];
diff --git a/src/de_reader.h b/src/de_reader.h
index 52db174..cb6e3c2 100644
--- a/src/de_reader.h
+++ b/src/de_reader.h
@@ -12,8 +12,8 @@
* DE405/LE405" (Standish 1998) — format description.
*/
-#ifndef PG_ORBIT_DE_READER_H
-#define PG_ORBIT_DE_READER_H
+#ifndef PG_ORRERY_DE_READER_H
+#define PG_ORRERY_DE_READER_H
#include
@@ -137,4 +137,4 @@ void de_reader_close(de_handle *h);
*/
double de_reader_get_const(de_handle *h, const char *name);
-#endif /* PG_ORBIT_DE_READER_H */
+#endif /* PG_ORRERY_DE_READER_H */
diff --git a/src/elp82b.c b/src/elp82b.c
index 8f46c8d..01a9531 100644
--- a/src/elp82b.c
+++ b/src/elp82b.c
@@ -42,7 +42,7 @@ the original Fortran code:
2) units are: julian day, AU
This file is derived from the Stellarium project
-(https://github.com/Stellarium/stellarium). Modified for pg_orbit:
+(https://github.com/Stellarium/stellarium). Modified for pg_orrery:
removed static mutable state and caching/interpolation for thread safety
(PostgreSQL PARALLEL SAFE). All computation is done fresh on each call.
diff --git a/src/elp82b.h b/src/elp82b.h
index 2b9de7f..5c05623 100644
--- a/src/elp82b.h
+++ b/src/elp82b.h
@@ -42,7 +42,7 @@ the original Fortran code:
2) units are: julian day, AU
This file is derived from the Stellarium project
-(https://github.com/Stellarium/stellarium). Modified for pg_orbit:
+(https://github.com/Stellarium/stellarium). Modified for pg_orrery:
removed static mutable state for thread safety (PostgreSQL PARALLEL SAFE).
****************************************************************/
diff --git a/src/eph_provider.c b/src/eph_provider.c
index 3f4366a..a8b20d9 100644
--- a/src/eph_provider.c
+++ b/src/eph_provider.c
@@ -1,5 +1,5 @@
/*
- * eph_provider.c -- Ephemeris provider management for pg_orbit
+ * eph_provider.c -- Ephemeris provider management for pg_orrery
*
* Manages the lifecycle of the optional JPL DE ephemeris reader
* within PostgreSQL's multi-process architecture.
@@ -47,7 +47,7 @@ void
eph_register_gucs(void)
{
DefineCustomStringVariable(
- "pg_orbit.ephemeris_path",
+ "pg_orrery.ephemeris_path",
"Path to JPL DE binary ephemeris file (DE430/DE440/DE441).",
"When set, enables high-precision _de() function variants. "
"Default empty = no DE support (VSOP87 only). "
@@ -89,17 +89,17 @@ ensure_de_init(void)
if (de_handle_ptr == NULL)
{
ereport(NOTICE,
- (errmsg("pg_orbit: cannot open DE ephemeris at \"%s\" (error %d), "
+ (errmsg("pg_orrery: cannot open DE ephemeris at \"%s\" (error %d), "
"DE functions will fall back to VSOP87",
eph_path_guc, errcode)));
return;
}
- /* Verify AU consistency with pg_orbit's compiled-in value */
+ /* Verify AU consistency with pg_orrery's compiled-in value */
if (fabs(de_handle_ptr->au_km - AU_KM) > 0.01)
{
ereport(NOTICE,
- (errmsg("pg_orbit: DE ephemeris AU = %.3f km, expected %.3f km; "
+ (errmsg("pg_orrery: DE ephemeris AU = %.3f km, expected %.3f km; "
"DE functions will fall back to VSOP87",
de_handle_ptr->au_km, (double)AU_KM)));
de_reader_close(de_handle_ptr);
@@ -108,7 +108,7 @@ ensure_de_init(void)
}
ereport(DEBUG1,
- (errmsg("pg_orbit: DE%d ephemeris loaded, JD %.1f to %.1f",
+ (errmsg("pg_orrery: DE%d ephemeris loaded, JD %.1f to %.1f",
de_handle_ptr->de_version,
de_handle_ptr->start_jd,
de_handle_ptr->end_jd)));
diff --git a/src/eph_provider.h b/src/eph_provider.h
index b1fc4e2..bdedce9 100644
--- a/src/eph_provider.h
+++ b/src/eph_provider.h
@@ -1,5 +1,5 @@
/*
- * eph_provider.h -- Ephemeris provider dispatch for pg_orbit
+ * eph_provider.h -- Ephemeris provider dispatch for pg_orrery
*
* Manages the optional JPL DE ephemeris alongside the compiled-in
* VSOP87 and ELP2000-82B theories.
@@ -11,8 +11,8 @@
* - No shared state between PostgreSQL backends
*/
-#ifndef PG_ORBIT_EPH_PROVIDER_H
-#define PG_ORBIT_EPH_PROVIDER_H
+#ifndef PG_ORRERY_EPH_PROVIDER_H
+#define PG_ORRERY_EPH_PROVIDER_H
#include "postgres.h"
#include "types.h"
@@ -28,7 +28,7 @@ typedef enum
/*
- * Initialize the GUC variable (pg_orbit.ephemeris_path).
+ * Initialize the GUC variable (pg_orrery.ephemeris_path).
* Called from _PG_init(). Does NOT open the DE file.
*/
void eph_register_gucs(void);
@@ -63,7 +63,7 @@ const char *eph_get_path(void);
/*
* Get planet heliocentric ecliptic J2000 position via DE.
*
- * body_id: pg_orbit body ID (1=Mercury..8=Neptune)
+ * body_id: pg_orrery body ID (1=Mercury..8=Neptune)
* jd: Julian date (TDB)
* xyz[6]: output position (AU) in ecliptic J2000 frame
* (xyz[3..5] are zero — velocity not yet implemented)
@@ -99,7 +99,7 @@ bool eph_de_moon(double jd, double xyz[3]);
bool eph_de_sun(double jd, double xyz[6]);
/*
- * DE metadata accessors (for pg_orbit_ephemeris_info).
+ * DE metadata accessors (for pg_orrery_ephemeris_info).
* Return 0/0.0 if DE is not loaded.
*/
double eph_de_start_jd(void);
@@ -107,4 +107,4 @@ double eph_de_end_jd(void);
int eph_de_version(void);
double eph_de_au_km(void);
-#endif /* PG_ORBIT_EPH_PROVIDER_H */
+#endif /* PG_ORRERY_EPH_PROVIDER_H */
diff --git a/src/gust86.c b/src/gust86.c
index ed47f1a..774aaf6 100644
--- a/src/gust86.c
+++ b/src/gust86.c
@@ -34,7 +34,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Derived from Stellarium's GUST86 implementation.
-Modified for pg_orbit: removed all static mutable state for thread safety
+Modified for pg_orrery: removed all static mutable state for thread safety
(PostgreSQL PARALLEL SAFE). The original used static caching arrays and
CalcInterpolatedElements for performance; this version computes fresh on
each call which is acceptable for SQL query workloads.
diff --git a/src/gust86.h b/src/gust86.h
index 0d92214..50aedd2 100644
--- a/src/gust86.h
+++ b/src/gust86.h
@@ -34,7 +34,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Derived from Stellarium's GUST86 implementation.
-Modified for pg_orbit: removed static mutable state and
+Modified for pg_orrery: removed static mutable state and
CalcInterpolatedElements caching for thread safety
(PostgreSQL PARALLEL SAFE). Elements are computed fresh on each call.
@@ -45,8 +45,8 @@ CalcInterpolatedElements caching for thread safety
****************************************************************/
-#ifndef PG_ORBIT_GUST86_H
-#define PG_ORBIT_GUST86_H
+#ifndef PG_ORRERY_GUST86_H
+#define PG_ORRERY_GUST86_H
#ifdef __cplusplus
extern "C" {
diff --git a/src/l12.c b/src/l12.c
index 8ffe5c8..bf81a66 100644
--- a/src/l12.c
+++ b/src/l12.c
@@ -2,7 +2,7 @@
L1.2 Galilean satellite theory -- Lainey, Duriez & Vienne
-Clean-room implementation for pg_orbit.
+Clean-room implementation for pg_orrery.
Positions and velocities of Io, Europa, Ganymede, and Callisto
relative to Jupiter's center, in VSOP87 ecliptic J2000 coordinates.
diff --git a/src/l12.h b/src/l12.h
index 461adc0..03c475c 100644
--- a/src/l12.h
+++ b/src/l12.h
@@ -2,7 +2,7 @@
L1.2 Galilean satellite theory -- Lainey, Duriez & Vienne
-Clean-room implementation for pg_orbit.
+Clean-room implementation for pg_orrery.
The L1.2 theory provides positions and velocities of Jupiter's four
Galilean moons (Io, Europa, Ganymede, Callisto) relative to Jupiter's
center, in the VSOP87 ecliptic J2000 reference frame.
diff --git a/src/lambert.h b/src/lambert.h
index 0349146..6740db6 100644
--- a/src/lambert.h
+++ b/src/lambert.h
@@ -18,8 +18,8 @@
* Thread-safe: no static mutable state.
*/
-#ifndef PG_ORBIT_LAMBERT_H
-#define PG_ORBIT_LAMBERT_H
+#ifndef PG_ORRERY_LAMBERT_H
+#define PG_ORRERY_LAMBERT_H
#ifdef __cplusplus
extern "C" {
@@ -57,4 +57,4 @@ int lambert_solve_uv(const double r1[3], const double r2[3],
}
#endif
-#endif /* PG_ORBIT_LAMBERT_H */
+#endif /* PG_ORRERY_LAMBERT_H */
diff --git a/src/marssat.c b/src/marssat.c
index 98bc7c5..2ec610d 100644
--- a/src/marssat.c
+++ b/src/marssat.c
@@ -42,7 +42,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Derived from Stellarium's MARSSAT implementation.
-Modified for pg_orbit: removed all static mutable state for thread safety
+Modified for pg_orrery: removed all static mutable state for thread safety
(PostgreSQL PARALLEL SAFE). The original used static caching arrays and
CalcInterpolatedElements for performance; this version computes fresh on
each call which is acceptable for SQL query workloads.
diff --git a/src/marssat.h b/src/marssat.h
index 580fe53..9a75e88 100644
--- a/src/marssat.h
+++ b/src/marssat.h
@@ -42,7 +42,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Derived from Stellarium's MARSSAT implementation.
-Modified for pg_orbit: removed static mutable state and
+Modified for pg_orrery: removed static mutable state and
CalcInterpolatedElements caching for thread safety
(PostgreSQL PARALLEL SAFE). Elements are computed fresh on each call.
@@ -51,8 +51,8 @@ CalcInterpolatedElements caching for thread safety
****************************************************************/
-#ifndef PG_ORBIT_MARSSAT_H
-#define PG_ORBIT_MARSSAT_H
+#ifndef PG_ORRERY_MARSSAT_H
+#define PG_ORRERY_MARSSAT_H
#ifdef __cplusplus
extern "C" {
diff --git a/src/pass_funcs.c b/src/pass_funcs.c
index 4575da9..b1e518e 100644
--- a/src/pass_funcs.c
+++ b/src/pass_funcs.c
@@ -1,5 +1,5 @@
/*
- * pass_funcs.c -- Satellite pass prediction for pg_orbit
+ * pass_funcs.c -- Satellite pass prediction for pg_orrery
*
* Finds visibility windows (AOS/LOS) for a satellite relative to a
* ground observer. Uses bisection on the elevation function to pin
diff --git a/src/pg_orbit.c b/src/pg_orrery.c
similarity index 87%
rename from src/pg_orbit.c
rename to src/pg_orrery.c
index 3c336a0..0c78b04 100644
--- a/src/pg_orbit.c
+++ b/src/pg_orrery.c
@@ -1,11 +1,11 @@
/*
- * pg_orbit.c -- Extension entry point
+ * pg_orrery.c -- Extension entry point
*
* PostgreSQL extension for orbital mechanics.
* Provides TLE, ECI, geodetic, topocentric, observer, and pass_event types
* with SGP4/SDP4 propagation, coordinate transforms, and pass prediction.
*
- * v0.3.0 adds _PG_init for GUC registration (pg_orbit.ephemeris_path)
+ * v0.3.0 adds _PG_init for GUC registration (pg_orrery.ephemeris_path)
* and on_proc_exit cleanup for the optional DE ephemeris handle.
*/
diff --git a/src/planet_funcs.c b/src/planet_funcs.c
index 163d2cb..410bc07 100644
--- a/src/planet_funcs.c
+++ b/src/planet_funcs.c
@@ -73,7 +73,7 @@ planet_heliocentric(PG_FUNCTION_ARGS)
body_id)));
jd = timestamptz_to_jd(ts);
- vsop_body = body_id - 1; /* pg_orbit 1-based -> VSOP87 0-based */
+ vsop_body = body_id - 1; /* pg_orrery 1-based -> VSOP87 0-based */
GetVsop87Coor(jd, vsop_body, xyz);
result = (pg_heliocentric *) palloc(sizeof(pg_heliocentric));
diff --git a/src/precession.h b/src/precession.h
index f8c8590..3a7efd6 100644
--- a/src/precession.h
+++ b/src/precession.h
@@ -10,8 +10,8 @@
* No PostgreSQL dependencies -- pure math, suitable for standalone use.
*/
-#ifndef PG_ORBIT_PRECESSION_H
-#define PG_ORBIT_PRECESSION_H
+#ifndef PG_ORRERY_PRECESSION_H
+#define PG_ORRERY_PRECESSION_H
/*
* get_precession_angles_vondrak -- IAU 2006 precession angles
@@ -52,4 +52,4 @@ void get_nutation_angles_iau2000b(double jde,
double *delta_psi,
double *delta_epsilon);
-#endif /* PG_ORBIT_PRECESSION_H */
+#endif /* PG_ORRERY_PRECESSION_H */
diff --git a/src/sgp4/PROVENANCE.md b/src/sgp4/PROVENANCE.md
index 395e4c3..dc7d2e8 100644
--- a/src/sgp4/PROVENANCE.md
+++ b/src/sgp4/PROVENANCE.md
@@ -10,7 +10,7 @@ Bill Gray's **sat_code** library, MIT license.
## What was vendored
-7 source files and 2 headers, the minimal set required by pg_orbit:
+7 source files and 2 headers, the minimal set required by pg_orrery:
| Original file | Vendored as | Purpose |
|---------------|-------------|---------|
@@ -42,7 +42,7 @@ phantom dependency on `g++` and `-lstdc++`.
4. **Removed unused model prototypes** from `norad.h` — `SGP_init()`, `SGP()`,
`SGP8_init()`, `SGP8()`, `SDP8_init()`, `SDP8()`, and Win32 dynamic loading
- functions. pg_orbit uses only SGP4/SDP4.
+ functions. pg_orrery uses only SGP4/SDP4.
5. **Added forward declarations** to suppress `-Wmissing-prototypes`:
- `common.c`: `sxpall_common_init()` declared before definition
diff --git a/src/sgp4/deep.c b/src/sgp4/deep.c
index a41821b..9ab5a5d 100644
--- a/src/sgp4/deep.c
+++ b/src/sgp4/deep.c
@@ -23,9 +23,9 @@
* singularity in node/perigee. STR#1 Chapter 6, STR#3 Eqs. 8-63..8-80.
*
* Global statics (safe in PostgreSQL fork model):
- * dpsec_integration_step = 720.0 (minutes, never modified by pg_orbit)
- * dpsec_integration_order = 2 (never modified by pg_orbit)
- * is_dundee_compliant = 0 (never modified by pg_orbit)
+ * dpsec_integration_step = 720.0 (minutes, never modified by pg_orrery)
+ * dpsec_integration_order = 2 (never modified by pg_orrery)
+ * is_dundee_compliant = 0 (never modified by pg_orrery)
*/
#include
diff --git a/src/sgp4/norad.h b/src/sgp4/norad.h
index 1e45887..6bc814f 100644
--- a/src/sgp4/norad.h
+++ b/src/sgp4/norad.h
@@ -7,7 +7,7 @@
* - Vallado, Crawford, Hujsak, Kelso, AIAA 2006-6753-Rev1
*
* Vendored from Bill Gray's sat_code (commit ff7b989, MIT license).
- * Stripped: SGP, SGP8, SDP8 model prototypes (pg_orbit uses only SGP4/SDP4).
+ * Stripped: SGP, SGP8, SDP8 model prototypes (pg_orrery uses only SGP4/SDP4).
* Stripped: Win32 DLL_FUNC/__stdcall and dynamic loading support.
* Stripped: extern "C" wrapper (now compiled as C, not C++).
* N_SAT_PARAMS kept at its original value for binary compatibility.
diff --git a/src/sgp4_funcs.c b/src/sgp4_funcs.c
index e573436..a66ab16 100644
--- a/src/sgp4_funcs.c
+++ b/src/sgp4_funcs.c
@@ -1,5 +1,5 @@
/*
- * sgp4_funcs.c -- SGP4/SDP4 propagation functions for pg_orbit
+ * sgp4_funcs.c -- SGP4/SDP4 propagation functions for pg_orrery
*
* Wraps Bill Gray's sat_code implementation. Near-earth objects
* use SGP4, deep-space objects use SDP4. The choice is automatic
diff --git a/src/sidereal_time.h b/src/sidereal_time.h
index 660e1e6..f43bc22 100644
--- a/src/sidereal_time.h
+++ b/src/sidereal_time.h
@@ -10,8 +10,8 @@
* No PostgreSQL dependencies -- pure math, suitable for standalone use.
*/
-#ifndef PG_ORBIT_SIDEREAL_TIME_H
-#define PG_ORBIT_SIDEREAL_TIME_H
+#ifndef PG_ORRERY_SIDEREAL_TIME_H
+#define PG_ORRERY_SIDEREAL_TIME_H
/*
* get_mean_sidereal_time -- Greenwich Mean Sidereal Time
@@ -22,7 +22,7 @@
* JD = Julian Date (UT1 timescale)
* JDE = Julian Ephemeris Date (TDB/TT timescale)
*
- * For pg_orbit Phase 2, JD and JDE are treated as identical
+ * For pg_orrery Phase 2, JD and JDE are treated as identical
* (delta-T correction not yet applied; the difference is <1s
* for recent epochs).
*
@@ -44,4 +44,4 @@ double get_mean_sidereal_time(double JD, double JDE);
*/
double get_apparent_sidereal_time(double JD, double JDE);
-#endif /* PG_ORBIT_SIDEREAL_TIME_H */
+#endif /* PG_ORRERY_SIDEREAL_TIME_H */
diff --git a/src/tass17.h b/src/tass17.h
index 7530045..e32c67a 100644
--- a/src/tass17.h
+++ b/src/tass17.h
@@ -33,13 +33,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-Adapted for pg_orbit: removed static mutable state for thread safety
+Adapted for pg_orrery: removed static mutable state for thread safety
(PostgreSQL PARALLEL SAFE).
****************************************************************/
-#ifndef PG_ORBIT_TASS17_H
-#define PG_ORBIT_TASS17_H
+#ifndef PG_ORRERY_TASS17_H
+#define PG_ORRERY_TASS17_H
#ifdef __cplusplus
extern "C" {
diff --git a/src/types.h b/src/types.h
index 94ae906..15b9d20 100644
--- a/src/types.h
+++ b/src/types.h
@@ -1,13 +1,13 @@
/*
- * types.h -- Shared type definitions for pg_orbit
+ * types.h -- Shared type definitions for pg_orrery
*
* All orbital mechanics types stored in PostgreSQL tuples.
* Positions in TEME frame, propagated with WGS-72.
* Coordinate output converted to WGS-84.
*/
-#ifndef PG_ORBIT_TYPES_H
-#define PG_ORBIT_TYPES_H
+#ifndef PG_ORRERY_TYPES_H
+#define PG_ORRERY_TYPES_H
#include "postgres.h"
@@ -224,9 +224,9 @@ typedef struct pg_heliocentric
/*
* JPL DE body target IDs (for de_reader.h)
- * Used by eph_provider.c to translate pg_orbit body IDs to DE targets.
+ * Used by eph_provider.c to translate pg_orrery body IDs to DE targets.
*
- * pg_orbit: 0=Sun, 1=Mercury, ..., 8=Neptune, 10=Moon
+ * pg_orrery: 0=Sun, 1=Mercury, ..., 8=Neptune, 10=Moon
* DE file: 0=Mercury, ..., 7=Neptune, 8=Pluto, 9=Moon, 10=Sun, 2=EMB
*/
#define DE_CENTER_EARTH 99 /* virtual: Earth derived from EMB-Moon */
@@ -250,4 +250,4 @@ pgbody_to_de_target(int body_id)
}
}
-#endif /* PG_ORBIT_TYPES_H */
+#endif /* PG_ORRERY_TYPES_H */
diff --git a/src/vsop87.c b/src/vsop87.c
index 4d1b958..929af3d 100644
--- a/src/vsop87.c
+++ b/src/vsop87.c
@@ -1,7 +1,7 @@
/************************************************************************
Derived from Stellarium's VSOP87 implementation.
-Modified for pg_orbit: removed all static mutable state for thread safety
+Modified for pg_orrery: removed all static mutable state for thread safety
(PostgreSQL PARALLEL SAFE). The original used static caching arrays and
CalcInterpolatedElements for performance; this version computes fresh on
each call (~0.5ms) which is acceptable for SQL query workloads.
@@ -137321,7 +137321,7 @@ void CalcVsop87Elem(const double t,double elem[8*6], void *user) {
*/
}
-/* pg_orbit: all static caching removed for thread safety (PARALLEL SAFE).
+/* pg_orrery: all static caching removed for thread safety (PARALLEL SAFE).
Each call computes elements fresh via CalcVsop87Elem and converts to
rectangular coordinates. No mutable static state remains. */
diff --git a/src/vsop87.h b/src/vsop87.h
index 150d79f..762205d 100644
--- a/src/vsop87.h
+++ b/src/vsop87.h
@@ -1,7 +1,7 @@
/************************************************************************
Derived from Stellarium's VSOP87 implementation.
-Modified for pg_orbit: removed static caching for thread safety
+Modified for pg_orrery: removed static caching for thread safety
(PostgreSQL PARALLEL SAFE).
The PLANETARY SOLUTION VSOP87 by Bretagnon P. and Francou G. can be found at
diff --git a/test/expected/convenience.out b/test/expected/convenience.out
index f7415c6..9aa88a3 100644
--- a/test/expected/convenience.out
+++ b/test/expected/convenience.out
@@ -1,6 +1,6 @@
-- convenience functions requested by Craft (Astrolock) integration
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
-NOTICE: extension "pg_orbit" already exists, skipping
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
+NOTICE: extension "pg_orrery" already exists, skipping
-- tle_from_lines: two-argument constructor
SELECT tle_norad_id(tle_from_lines(
'1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9002',
diff --git a/test/expected/coord_transforms.out b/test/expected/coord_transforms.out
index a87e3f9..ac53c2c 100644
--- a/test/expected/coord_transforms.out
+++ b/test/expected/coord_transforms.out
@@ -1,6 +1,6 @@
-- Test coordinate transform functions
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
-NOTICE: extension "pg_orbit" already exists, skipping
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
+NOTICE: extension "pg_orrery" already exists, skipping
-- Subsatellite point at epoch
WITH iss AS (
SELECT '1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9025
diff --git a/test/expected/de_ephemeris.out b/test/expected/de_ephemeris.out
index 5b15c0d..d4e0a3f 100644
--- a/test/expected/de_ephemeris.out
+++ b/test/expected/de_ephemeris.out
@@ -6,11 +6,11 @@
-- results to the VSOP87 variants.
\set boulder '''40.015N 105.270W 1655m'''::observer
-- ============================================================
--- Test 1: pg_orbit_ephemeris_info() returns VSOP87 when no DE file
+-- Test 1: pg_orrery_ephemeris_info() returns VSOP87 when no DE file
-- The provider should be 'VSOP87' since no ephemeris_path is set.
-- ============================================================
SELECT 'eph_info_vsop87' AS test,
- (pg_orbit_ephemeris_info()).provider AS provider;
+ (pg_orrery_ephemeris_info()).provider AS provider;
test | provider
-----------------+----------
eph_info_vsop87 | VSOP87
diff --git a/test/expected/gist_index.out b/test/expected/gist_index.out
index e091787..aea8ac9 100644
--- a/test/expected/gist_index.out
+++ b/test/expected/gist_index.out
@@ -1,6 +1,6 @@
-- Test GiST index and operators (2-D: altitude + inclination)
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
-NOTICE: extension "pg_orbit" already exists, skipping
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
+NOTICE: extension "pg_orrery" already exists, skipping
-- Create test table with mixed orbit types
CREATE TABLE test_orbits (
id serial,
diff --git a/test/expected/pass_prediction.out b/test/expected/pass_prediction.out
index 04792bd..3153eea 100644
--- a/test/expected/pass_prediction.out
+++ b/test/expected/pass_prediction.out
@@ -1,6 +1,6 @@
-- Test pass prediction functions
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
-NOTICE: extension "pg_orbit" already exists, skipping
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
+NOTICE: extension "pg_orrery" already exists, skipping
-- Predict ISS passes over Boulder in 24-hour window
WITH iss AS (
SELECT '1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9025
diff --git a/test/expected/sgp4_propagate.out b/test/expected/sgp4_propagate.out
index be19def..72abdd7 100644
--- a/test/expected/sgp4_propagate.out
+++ b/test/expected/sgp4_propagate.out
@@ -1,6 +1,6 @@
-- Test SGP4/SDP4 propagation functions
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
-NOTICE: extension "pg_orbit" already exists, skipping
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
+NOTICE: extension "pg_orrery" already exists, skipping
-- ISS TLE (LEO, near-earth -> SGP4)
WITH iss AS (
SELECT '1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9025
diff --git a/test/expected/tle_parse.out b/test/expected/tle_parse.out
index bf3d70d..5377206 100644
--- a/test/expected/tle_parse.out
+++ b/test/expected/tle_parse.out
@@ -1,5 +1,5 @@
-- Test TLE type: parsing, round-trip, accessors
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- Parse a valid ISS TLE
SELECT '1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9025
2 25544 51.6400 208.9163 0006703 30.1694 61.7520 15.50100486 00001'::tle IS NOT NULL AS parse_ok;
diff --git a/test/expected/vallado_518.out b/test/expected/vallado_518.out
index 4a5c9aa..67d67be 100644
--- a/test/expected/vallado_518.out
+++ b/test/expected/vallado_518.out
@@ -22,8 +22,8 @@
-- Tolerances for the summary check:
-- Position: 1e-4 km (0.1 m) — catches marginal velocity-only failures
-- Velocity: 1e-7 km/s (0.1 mm/s) — tight enough for regression detection
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
-NOTICE: extension "pg_orbit" already exists, skipping
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
+NOTICE: extension "pg_orrery" already exists, skipping
-- Helper: convert Julian date + minutes-since-epoch to timestamptz.
-- JD 2440587.5 = 1970-01-01 00:00:00 UTC (Unix epoch).
CREATE OR REPLACE FUNCTION _vallado_jd_plus_min(jd float8, tsince_min float8)
diff --git a/test/sql/convenience.sql b/test/sql/convenience.sql
index cdcbac5..7dd9f41 100644
--- a/test/sql/convenience.sql
+++ b/test/sql/convenience.sql
@@ -1,5 +1,5 @@
-- convenience functions requested by Craft (Astrolock) integration
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- tle_from_lines: two-argument constructor
SELECT tle_norad_id(tle_from_lines(
diff --git a/test/sql/coord_transforms.sql b/test/sql/coord_transforms.sql
index 3c8c5a7..0c8d6e6 100644
--- a/test/sql/coord_transforms.sql
+++ b/test/sql/coord_transforms.sql
@@ -1,5 +1,5 @@
-- Test coordinate transform functions
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- Subsatellite point at epoch
WITH iss AS (
diff --git a/test/sql/de_ephemeris.sql b/test/sql/de_ephemeris.sql
index 1e25770..9b999f5 100644
--- a/test/sql/de_ephemeris.sql
+++ b/test/sql/de_ephemeris.sql
@@ -8,11 +8,11 @@
\set boulder '''40.015N 105.270W 1655m'''::observer
-- ============================================================
--- Test 1: pg_orbit_ephemeris_info() returns VSOP87 when no DE file
+-- Test 1: pg_orrery_ephemeris_info() returns VSOP87 when no DE file
-- The provider should be 'VSOP87' since no ephemeris_path is set.
-- ============================================================
SELECT 'eph_info_vsop87' AS test,
- (pg_orbit_ephemeris_info()).provider AS provider;
+ (pg_orrery_ephemeris_info()).provider AS provider;
-- ============================================================
-- Test 2: planet_heliocentric_de falls back to VSOP87
diff --git a/test/sql/gist_index.sql b/test/sql/gist_index.sql
index 1d1c895..d8f4e1c 100644
--- a/test/sql/gist_index.sql
+++ b/test/sql/gist_index.sql
@@ -1,5 +1,5 @@
-- Test GiST index and operators (2-D: altitude + inclination)
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- Create test table with mixed orbit types
CREATE TABLE test_orbits (
diff --git a/test/sql/pass_prediction.sql b/test/sql/pass_prediction.sql
index ffccd21..6576f05 100644
--- a/test/sql/pass_prediction.sql
+++ b/test/sql/pass_prediction.sql
@@ -1,5 +1,5 @@
-- Test pass prediction functions
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- Predict ISS passes over Boulder in 24-hour window
WITH iss AS (
diff --git a/test/sql/sgp4_propagate.sql b/test/sql/sgp4_propagate.sql
index 8ef8a46..3214a89 100644
--- a/test/sql/sgp4_propagate.sql
+++ b/test/sql/sgp4_propagate.sql
@@ -1,5 +1,5 @@
-- Test SGP4/SDP4 propagation functions
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- ISS TLE (LEO, near-earth -> SGP4)
WITH iss AS (
diff --git a/test/sql/tle_parse.sql b/test/sql/tle_parse.sql
index d83fec0..548318d 100644
--- a/test/sql/tle_parse.sql
+++ b/test/sql/tle_parse.sql
@@ -1,5 +1,5 @@
-- Test TLE type: parsing, round-trip, accessors
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- Parse a valid ISS TLE
SELECT '1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9025
diff --git a/test/sql/vallado_518.sql b/test/sql/vallado_518.sql
index 1b4a063..0104811 100644
--- a/test/sql/vallado_518.sql
+++ b/test/sql/vallado_518.sql
@@ -23,7 +23,7 @@
-- Position: 1e-4 km (0.1 m) — catches marginal velocity-only failures
-- Velocity: 1e-7 km/s (0.1 mm/s) — tight enough for regression detection
-CREATE EXTENSION IF NOT EXISTS pg_orbit;
+CREATE EXTENSION IF NOT EXISTS pg_orrery;
-- Helper: convert Julian date + minutes-since-epoch to timestamptz.
-- JD 2440587.5 = 1970-01-01 00:00:00 UTC (Unix epoch).
diff --git a/test/test_de_reader.c b/test/test_de_reader.c
index 7428359..95ff5c5 100644
--- a/test/test_de_reader.c
+++ b/test/test_de_reader.c
@@ -23,7 +23,7 @@
/* ── Synthetic file parameters ──────────────────────────── */
-#define TEST_FILE "/tmp/pg_orbit_test_de.bin"
+#define TEST_FILE "/tmp/pg_orrery_test_de.bin"
#define TEST_AU 149597870.700
#define TEST_EMRAT 81.30056907419062
#define TEST_START 2451529.0 /* J2000 - 16 days */
@@ -119,7 +119,7 @@ generate(void)
/* ── Record 1 (header) ── */
/* Titles (3 x 84 chars at byte 0) */
- snprintf((char *)buf, 84, "SYNTHETIC DE FOR pg_orbit UNIT TEST");
+ snprintf((char *)buf, 84, "SYNTHETIC DE FOR pg_orrery UNIT TEST");
snprintf((char *)buf + 84, 84, "Generated by test_de_reader.c");
snprintf((char *)buf + 168, 84, "Not a real ephemeris");
@@ -235,7 +235,7 @@ main(void)
double pos[3];
double tol = 1e-12;
- fprintf(stderr, "\n=== pg_orbit DE reader unit tests ===\n\n");
+ fprintf(stderr, "\n=== pg_orrery DE reader unit tests ===\n\n");
if (generate() != 0)
{