Download the PHP package deepskylog/laravel-astronomy-library without Composer
On this page you can find all versions of the php package deepskylog/laravel-astronomy-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download deepskylog/laravel-astronomy-library
More information about deepskylog/laravel-astronomy-library
Files in deepskylog/laravel-astronomy-library
Package laravel-astronomy-library
Short Description A library to execute astronomical calculations
License GPL-3.0-or-later
Homepage https://github.com/DeepskyLog/laravel-astronomylibrary
Informations about the package laravel-astronomy-library
laravel-astronomy-library
Take a look at contributing.md if you are interesting in helping out. The laravel-astronomy-library is part of DeepskyLog. If you are interested in helping with the development of DeepskyLog, see the documentation.
Installation
AstronomyLibrary can be installed via composer. laravel-astronomy-library needs at least php 7.4 to run.
You need to publish and run the migration:
The database table with the delta t values can be updated using the following command:
A job is automatically scheduled every 4 months to update the delta t value.
The database tables with the orbital elements of the comets and the asteroids can be updated using the followong command:
A job is automatically scheduled every Monday at 04:30 to update the orbital elements of the comets and the asteroids.
These jobs can be executed using:
It is possible to run these jobs automatically by adding the following line to your crontab:
Documentation
For more documentation on the mathematical background, see docs.md.
Usage
Time methods
Static Time methods
Magnitude methods
Static magnitude methods
Coordinate methods
Coordinate methods on AstronomyLibrary instance
Coordinate methods on equatorial coordinates
Coordinate methods on ecliptical coordinates
Coordinate methods on horizontal coordinates
Coordinate methods on galactic coordinates
Target methods
Target is a class to keep information about an object and perform calculations on it. Target is a base class and can be used for stars and deep-sky objects. There are three subclasses:
- Moon
- Planet
- Sun
Moving targets (like the sun, moon or planets) need the equatorial coordinates for the given date, for the day before and the next day.
Orbital elements of comets and asteroids
The orbital elements of comets and asteroids are kept in the database tables:
- asteroids_orbital_elements
- comets_orbital_elements
The orbital elements for the comets can be accessed from laravel using the CometsOrbitalElements class. The information available in the class is:
- name
- epoch
- q: The perihelion distance in AU
- e: The eccentricity of the orbit
- i: The inclination of the orbit
- w: The argument of perihelion
- node: Longitude of the ascending node
- Tp: Time of perihelion passage in YYYYMMDD.DDD
- Ref: The orbital solution reference
The orbital elements for the asteroids can be accessed from laravel using the AsteroidsOrbitalElements class. The information available in the class is:
- number
- name
- epoch
- a: The semi-major axis in AU
- e: The eccentricity of the orbit
- i: The inclination of the orbit
- w: The argument of perihelion
- node: Longitude of the ascending node
- M: Mean anomaly
- H: Absolute magnitude
- G: Magnitude slope parameter
- Ref: The orbital solution reference
Example
This example describes how to calculate the coordinates of Venus at a given date
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
GPLv3. Please see the license file for more information.
All versions of laravel-astronomy-library with dependencies
laravel/framework Version ^8.0|^9.0|^10.0|^11.0
maatwebsite/excel Version ^3.1