Skip to content

SATCAT (Satellite Catalogue) Format Parser

License

Notifications You must be signed in to change notification settings

jhermsmeier/node-satcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SATCAT (Satellite Catalogue)

npm npm license npm downloads build status

Install via npm

$ npm install --save satcat

Usage

var Satcat = require( 'satcat' )

Parsing a Stream

var parser = new Satcat.Parser()
http.get( 'https://www.celestrak.com/pub/satcat.txt', function( response ) {
  response.pipe( parser )
})
parser.on( 'readable', function() {
  var satellite = null
  while( satellite = this.read() ) {
    // ...
  }
})

Parsing a Record

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 )
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