承接 marcoconsiglio/ephemeris 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marcoconsiglio/ephemeris

最新稳定版本:v1.2.0-alpha

Composer 安装命令:

composer require marcoconsiglio/ephemeris

包简介

A Laravel package that query the Swiss Ephemeris executable, in order to get planets position for astronomy/astrology purposes.

README 文档

README

GitHub License Static Badge
Static Badge Static Badge Static Badge

Laravel Swiss Ephemeris

This laravel package perform queries to the Swiss Ephemeris executable.

The aim of this project is to query ephemeris data to produce planetar positions in order to be used for purposes such as astronomy/astrology, calendars, biodynamic agriculture, ect.

In this software, only a fraction of the swiss ephemeris are used: you can query planets, Moon, and known asteroids from 1800 CE (AD) to 2399 CE (AD).

Development Roadmap

Check the next features in the development roadmap.

Installation

composer require marcoconsiglio/ephemeris

After installation run this command to publish the Swiss Ephemeris in the laravel resource folder.

php artisan vendor:publish --tag=swiss-ephemeris

Remember to grant execution privileges to the swetest file, otherwise this software won't work. To do this, run the command

chmod u+x ./resources/swiss_ephemeris/swetest

To extend the ephemeris data, download the ephemeris files you wish and put them in the resources/swiss_ephemeris directory. If you don't know which files to download to extend the time range of the ephemeris, please refer to the description of the ephemerides.

Usage

First of all, to query ephemeris data you need to instantiate the 'LaravelSwissEphemeris' class. You need to pass latitude, longitude and timezone to the constructor.

/** @var \MarcoConsiglio\Ephemeris\LaraverlSwissEphemeris $ephemeris */
$ephemeris = new LaravelSwissEphemeris(
    $this->config->get("ephemeris.latitude"), 
    $this->config->get("ephemeris.longitude"),
    $this->config->get("ephemeris.timezone")
);

or instead

/** @var \MarcoConsiglio\Ephemeris\LaraverlSwissEphemeris $ephemeris */
$ephemeris = new LaravelSwissEphemeris(
    41.902782,      // Decimal latitude
    12.496366,      // Decimal longitude
    "Europe/London" // Timezone
);

If something went wrong (e.g. like uncorrect permission for the files placed in the folder resources/swiss_ephemeris, outbound quering date, ect.) it will throw a MarcoConsiglio\Ephemeris\Exceptions\SwissEphemerisException exception.

Premise

When using the word collection, it is meant that the class extends the Illuminate\Support\Collection, so you can treat it like any other collection.

API Documentation

For more information, see the API documentation at ./docs/html.

Index

Datetime

Moon Ephemeris

统计信息

  • 总下载量: 109
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2021-11-30