Releases: DeepskyLog/laravel-astronomy-library
Releases · DeepskyLog/laravel-astronomy-library
Version 6.7.3
Fixed:
- Renamed the photometry migration class in the publishable stub from
AddPhotometryToCometsTabletoAddPhotometryToCometsOrbitalElementsTableto 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
Fixed:
- Removed a duplicated PHP block from the photometry migration stub so published migrations no longer contain two
<?phptags (preventing parse errors when host apps runphp artisan migrate). The corrected stub issrc/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stuband 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
Changed:
- Hardened package migrations and stubs to be idempotent: create-table stubs and data-import migrations now check
Schema::hasTable/Schema::hasColumnbefore creating/importing to avoid "table already exists" errors when published into projects that already have the tables. - Fixed
CreateAsteroidsOrbitalElementsTabledown()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.stuband updated the service provider to publish it so host apps will receive the migration viavendor:publish. - Made the photometry migration idempotent (guards around each added column) and made rollback safe by dropping only existing columns.
Version 6.7.0
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-commanddebug 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(addsH,n,phase_coeff,n_pre,n_post). - Migration stub:
src/database/migrations/add_photometry_to_comets_orbital_elements_table.php.stub.
- Runtime migration:
- Artisan command:
astronomy:updateCometPhotometry(src/deepskylog/AstronomyLibrary/Commands/UpdateCometPhotometry.php) to fetch photometric parameters (attempts Seiichi Yoshida /aerith.net). - Command registration:
AstronomyLibraryServiceProvider.phpandConsole/Kernel.phpregister the new command. - Model:
src/deepskylog/AstronomyLibrary/Models/CometsOrbitalElements.phpexposes 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..$$EOEblocks reliably, retry record-id resolution, prefer DASTCOM records and try SB-CAP fallback when needed, and surface theused_commandused for queries.- Targets: photometric magnitude models and API updates implemented in
src/deepskylog/AstronomyLibrary/Targets/Elliptic.php,src/deepskylog/AstronomyLibrary/Targets/Parabolic.phpandsrc/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(usesscripts/horizons_radec.php). - Tests & fixtures: new DE440-based Horizons tests (
tests/Unit/PlanetHorizonsDE440Test.php,tests/Unit/PrintPlanetCoordsTest.php) and updated fixtures inscripts/(includingscripts/horizons_resp_Jupiter.json,scripts/horizons_resp_Mars.json, updatedscripts/horizons_resp.json,scripts/horizons_raw.txt,scripts/horizons_block.txt). - Commands / scheduling:
UpdateOrbitalElementsand related scheduling notes updated so orbital-element and photometry updates are runnable (weekly scheduling noted inreadme.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
nexponents 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
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 toscripts/horizons_raw.txt,scripts/horizons_block.txtandscripts/horizons_resp.jsonto 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 inElliptictargets.
Changed:
Elliptictarget: 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
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
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 whendebugis 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
Version 6.3.1
Fix syntax error in previous version.

