# @behaver/gravitational-deflection

> This package is used to calculate gravitational deflection

Latest version **1.1.4** (published 2019-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @behaver/gravitational-deflection
pnpm add @behaver/gravitational-deflection
yarn add @behaver/gravitational-deflection
bun add @behaver/gravitational-deflection
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2019-05-25 |
| First published | 2018-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sanwan, Dong |
| Maintainers | behaver |

## Links

- npm: https://www.npmjs.com/package/@behaver/gravitational-deflection
- Repository: https://github.com/behaver/gravitational-deflection
- Homepage: https://github.com/behaver/gravitational-deflection#readme
- Issues: https://github.com/behaver/gravitational-deflection/issues
- npm.io page: https://npm.io/package/@behaver/gravitational-deflection

## Dependencies (2)

- [@behaver/coordinate](https://npm.io/package/@behaver/coordinate.md) ^3.4.0
- [@behaver/solar-planets-hecc](https://npm.io/package/@behaver/solar-planets-hecc.md) ^1.0.7

## Recent versions

- 1.1.4 (latest) — 2019-05-25
- 1.1.3 — 2019-03-24
- 1.1.2 — 2019-03-22
- 1.1.1 — 2018-12-20
- 1.1.0 — 2018-12-20
- 1.0.1 — 2018-12-19
- 1.0.0 — 2018-12-19

## README

# GravitationalDeflection

[![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](#) [![npm version](https://img.shields.io/npm/v/react.svg?style=flat)](https://www.npmjs.com/package/@behaver/gravitational-deflection) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#)

## 简介

GravitationalDeflection 是一个用于计算由太阳引力造成的星体坐标偏转的天文学组件。

## 安装

通过 npm 安装，在你的 node 项目目录下执行：

`npm i --save @behaver/gravitational-deflection`

安装完成后，调用即可：

`const GravitationalDeflection = require('@behaver/gravitational-deflection');`

## 用例

```js
const GravitationalDeflection = require('@behaver/gravitational-deflection');
const { JDateRepository } = require("@behaver/jdate");
const { SphericalCoordinate3D } = require('@behaver/coordinate');

let GD = new GravitationalDeflection({
  time: new JDateRepository(18, 'j2000'),
  sc: new SphericalCoordinate3D(230043, 1.123, 1.55),
});

let res = GD.get();
```

## API

`constructor(options)`

构造函数:

* options.time   计算时间
* options.sc     天体球坐标 (距离单位：AU)
* options.system 坐标系统

`get()`

获取 引力偏转修正值对象

`get time()`

获取计算时间

`set time(time)`

设置计算时间

## 许可证书

The MIT license.

---
_Source: https://npm.io/package/@behaver/gravitational-deflection · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
