Skip to content

Releases: DeepskyLog/laravel-astronomy-library

Version 6.7.3

21 Nov 08:40

Choose a tag to compare

Fixed:

  • Renamed the photometry migration class in the publishable stub from AddPhotometryToCometsTable to AddPhotometryToCometsOrbitalElementsTable to avoid duplicate-class collisions when multiple published migration files exist in host applications. Re-publish migrations to pick up the updated class name.

Version 6.7.2

21 Nov 08:28

Choose a tag to compare

Fixed:

  • Removed a duplicated PHP block from the photometry migration stub so published migrations no longer contain two <?php tags (preventing parse errors when host apps run php artisan migrate). The corrected stub is src/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stub and contains a single idempotent migration class.
  • Ensured the package publishes the photometry migration stub (service provider updated) and verified the migration is idempotent and rollback-safe.

Version 6.7.1

20 Nov 21:38

Choose a tag to compare

Changed:

  • Hardened package migrations and stubs to be idempotent: create-table stubs and data-import migrations now check Schema::hasTable/Schema::hasColumn before creating/importing to avoid "table already exists" errors when published into projects that already have the tables.
  • Fixed CreateAsteroidsOrbitalElementsTable down() method which previously dropped the wrong table name.
  • Added a publishable photometry migration stub: src/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stub and updated the service provider to publish it so host apps will receive the migration via vendor:publish.
  • Made the photometry migration idempotent (guards around each added column) and made rollback safe by dropping only existing columns.

Version 6.7.0

20 Nov 21:20

Choose a tag to compare

Added:

  • Prefer DASTCOM element files for small-body orbital elements when available to reduce ambiguous designation lookups.
  • Fallback resolution using SB-CAP (small-body catalog) when DASTCOM lookups fail.
  • --used-command debug output exposed by the Horizons helper (scripts/horizons_radec.php) and included in JSON responses to aid troubleshooting.
  • Comet photometry support:
    • Runtime migration: src/deepskylog/AstronomyLibrary/Database/Migrations/2025_11_20_000001_add_photometry_to_comets_table.php (adds H, n, phase_coeff, n_pre, n_post).
    • Migration stub: src/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stub.
  • Artisan command: astronomy:updateCometPhotometry (src/deepskylog/AstronomyLibrary/Commands/UpdateCometPhotometry.php) to fetch photometric parameters (attempts Seiichi Yoshida / aerith.net).
  • Command registration: AstronomyLibraryServiceProvider.php and Console/Kernel.php register the new command.
  • Model: src/deepskylog/AstronomyLibrary/Models/CometsOrbitalElements.php exposes and persists photometry fields when available.
  • README/docs: migration instructions and worked examples for comet photometry and magnitude calculations were added to readme.md.
  • Tests: unit tests covering comet photometry ingestion and Horizons-based coordinate checks were added/updated (see tests/Unit/*Comets*, CometsHorizonsTest, PlanetHorizonsDE440Test).

Changed:

  • scripts/horizons_radec.php: prefer JSON output, extract $$SOE..$$EOE blocks reliably, retry record-id resolution, prefer DASTCOM records and try SB-CAP fallback when needed, and surface the used_command used for queries.
  • Targets: photometric magnitude models and API updates implemented in src/deepskylog/AstronomyLibrary/Targets/Elliptic.php, src/deepskylog/AstronomyLibrary/Targets/Parabolic.php and src/deepskylog/AstronomyLibrary/Targets/NearParabolic.php (asteroid H–G model, comet H + 5 log10(delta) + n log10(r) with optional phase term and pre/post-perihelion exponents).
  • Planetary Horizons: optional JPL/Horizons ephemeris lookup added to src/deepskylog/AstronomyLibrary/Targets/Planet.php (uses scripts/horizons_radec.php).
  • Tests & fixtures: new DE440-based Horizons tests (tests/Unit/PlanetHorizonsDE440Test.php, tests/Unit/PrintPlanetCoordsTest.php) and updated fixtures in scripts/ (including scripts/horizons_resp_Jupiter.json, scripts/horizons_resp_Mars.json, updated scripts/horizons_resp.json, scripts/horizons_raw.txt, scripts/horizons_block.txt).
  • Commands / scheduling: UpdateOrbitalElements and related scheduling notes updated so orbital-element and photometry updates are runnable (weekly scheduling noted in readme.md).

Fixed:

  • Hardened parsing and record-resolution heuristics for Horizons responses to avoid sporadic failures when Horizons returns index pages or ambiguous matches.
  • Comet magnitude computation: hardened handling for missing photometry (falls back to sensible defaults) and correct application of pre-/post-perihelion n exponents and optional phase coefficients when present.
  • Tests: relaxed numeric assertions where appropriate and added tests that validate the new Horizons integration and photometry ingestion.

Version 6.6.0

19 Nov 08:39

Choose a tag to compare

Added:

  • scripts/horizons_radec.php — a small CLI helper that queries the JPL Horizons ephemeris service and returns structured JSON (apparent RA/Dec) for observer-based ephemerides. The helper writes optional debug artifacts to scripts/horizons_raw.txt, scripts/horizons_block.txt and scripts/horizons_resp.json to aid troubleshooting.
  • PHPUnit integration tests that exercise the Horizons helper and library integration (unit/integration tests under tests/Unit/*Horizons*).
  • docs/getting_radec.md — documentation covering how to obtain authoritative RA/Dec for small bodies using the Horizons helper and how to enable Horizons mode in Elliptic targets.

Changed:

  • Elliptic target: added a Horizons integration path — when enabled the library will invoke the helper to obtain authoritative apparent RA/Dec for observer-based ephemerides instead of using only internal propagation. Also added setters to enable Horizons mode and to provide an explicit Horizons designation.
  • Improved canonicalisation of orbital elements in Elliptic::setOrbitalElements() (angle wrapping and inclination handling) to reduce ambiguity when propagating elements.

Fixed:

  • Hardened parsing and record-resolution heuristics for Horizons responses (helper now prefers JSON output, extracts $$SOE..$$EOE blocks robustly, and retries record-id resolution when an index search is returned).

Version 6.5.1

15 Nov 21:36

Choose a tag to compare

Changed

  • Increased diamter precision for planets by removing final rounding in magnitude() (reduces 0.1 quantization in graphs). Affected: Jupiter, Mercury, Venus, Mars, Neptune, Uranus, Saturn.

Version 6.5.0

15 Nov 20:07

Choose a tag to compare

Version 6.5

Added:

  • Target::yearDiameterGraph(GeographicalCoordinates $geo_coords, Carbon $date, bool $debug = false) — generate a year-long plot of the planet's apparent angular diameter (arcseconds).

Changed:

  • Target::yearMagnitudeGraph(..., $debug = true) now emits debug logging for skipped samples and exceptions (rendered into the placeholder/debug image when debug is true).
  • Increased magnitude precision for several planet magnitude implementations by removing final rounding in magnitude() (reduces 0.1-mag quantization in graphs). Affected: Jupiter, Mercury, Venus, Mars, Neptune, Uranus, Saturn.

Version 6.4.0

27 Oct 12:57
574e3cd

Choose a tag to compare

Version 6.4

Added:

  • Targets can now generate a graph of the maximum altitude during a whole year
image

Fixed:

  • A lot of fixes in the calculation of the maximum altitude during the night and best time to observe a target.
  • the altitude graph now shows the correct colors for nautical twilight.

Version 6.3.1

24 Oct 20:56

Choose a tag to compare

Fix syntax error in previous version.

Version 6.3.0

24 Oct 20:49

Choose a tag to compare

Added:

  • Added moon elevation to the altitude graph.
  • Only show the elevation graph when the target is above the horizon.

Changed:

  • Improved scheduling of package commands.
image