Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhermsmeier/node-satcat
SATCAT (Satellite Catalogue) Format Parser
https://github.com/jhermsmeier/node-satcat
celestrak esa nasa orbit satcat satellite satellite-catalogue spacecraft
Last synced: 9 days ago
JSON representation
SATCAT (Satellite Catalogue) Format Parser
- Host: GitHub
- URL: https://github.com/jhermsmeier/node-satcat
- Owner: jhermsmeier
- License: mit
- Created: 2014-04-06T05:44:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T12:17:56.000Z (about 5 years ago)
- Last Synced: 2024-10-11T07:34:11.107Z (25 days ago)
- Topics: celestrak, esa, nasa, orbit, satcat, satellite, satellite-catalogue, spacecraft
- Language: JavaScript
- Homepage:
- Size: 1.01 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SATCAT (Satellite Catalogue)
[![npm](https://img.shields.io/npm/v/satcat.svg?style=flat-square)](https://npmjs.com/package/satcat)
[![npm license](https://img.shields.io/npm/l/satcat.svg?style=flat-square)](https://npmjs.com/package/satcat)
[![npm downloads](https://img.shields.io/npm/dm/satcat.svg?style=flat-square)](https://npmjs.com/package/satcat)
[![build status](https://img.shields.io/travis/jhermsmeier/node-satcat/master.svg?style=flat-square)](https://travis-ci.org/jhermsmeier/node-satcat)- Format definition: http://www.celestrak.com/satcat/satcat-format.asp
- Raw data (approx. 5MB): http://www.celestrak.com/pub/satcat.txt## Install via [npm](https://npmjs.com/package/satcat)
```sh
$ npm install --save satcat
```## Usage
```js
var Satcat = require( 'satcat' )
```### Parsing a Stream
```js
var parser = new Satcat.Parser()
``````js
http.get( 'http://www.celestrak.com/pub/satcat.txt', function( response ) {
response.pipe( parser )
})
``````js
parser.on( 'readable', function() {
var satellite = null
while( satellite = this.read() ) {
// ...
}
})
```### Parsing a Record
```js
var record = `1957-001B 00002 *D SPUTNIK 1 CIS 1957-10-04 TYMSC 1958-01-03 96.1 65.0 945 227 N/A `
var satellite = Satcat.Satellite.parse( record )
``````js
Satellite {
id: '1957-001B',
catalogNumber: '00002',
multipleNames: false,
payload: true,
status: 'D',
name: 'SPUTNIK 1',
source: 'CIS',
launchDate: 1957-10-04T00:00:00.000Z,
launchSite: 'TYMSC',
decayDate: 1958-01-03T00:00:00.000Z,
orbitalPeriod: 96.1,
inclination: 65,
apogeeAltitude: 945,
perigeeAltitude: 227,
radarCrossSection: NaN,
orbitalStatus: ''
}
```## Benchmarks
```
$ npm run benchmark
``````
Parsed 42972 records in 0.140 ms
```## Examples
- `node example/http` - Streaming the Celestrak Satellite Catalogue
- `node example/file` - Parsing & outputting the test data