thrustcurve-db
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "thrustcurve-db", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "ThrustCurve.org model rocket motor and thrust curve data as a single JSON file", |
@@ -6,18 +6,15 @@ # thrustcurve-db | ||
This module is a rebundling of the rocket motor data available on John Coker's | ||
[thrustcurve.org](https://thrustcurve.org) website ("TC"). The dataset includes data for all motors in the [ThrustCurve API](https://www.thrustcurve.org/info/api.html) ("search" endpoint), and is a field-by-field translation of what is found in the "search" endpoint, with the following changes: | ||
* Motor "availability" is exposed as the `discontinued` field (see https://github.com/JohnCoker/thrustcurve3/issues/35) | ||
* Where available, thrust curve data (from the "download" endpoint) is included as a `samples` array. These are normalized to always have `[0, 0]` as the first data point. In cases where more than one sample file is available for a motor, the first "cert"(ified) file found is used. Otherwise the samples are from whichever file the API return first. | ||
This module is a rebundling of the model rocket motor data found at John Coker's | ||
[thrustcurve.org](https://thrustcurve.org) website ("TC"). It is available here | ||
in JSON format, or as an ESM or CommonJS module. | ||
**License & Support** | ||
The format of this data is identical to that of the TC [/api/v1/search response](https://github.com/JohnCoker/thrustcurve3/blob/8bd8571fe0791fb9a68a6a96eb36c276d58c339b/config/api_v1.yml#L428-L526), with one additional field (where available): | ||
* Please read and understand [the ThrustCurve.org license](https://www.thrustcurve.org/info/contribute.html#license) | ||
* This is a *snapshot* of the TC data. It may be out of date. File an issue here if you think it needs to be updated. | ||
* Issues with how motor data is translated into JSON should be filed here. | ||
* Issues with incorrect motor data should be directed to the TC site. | ||
* `samples`: `Array[[number, number]]` of thrust`samples`. This is the `samples` data from the TC "/api/vi/download" endpoint normalized to always have `[0, 0]` as the first data point. in cases where more than one sample file is available for a motor, the first "cert"(ified) data file is used. Otherwise it will be whichever data file the API returns first. | ||
See also, the included [TypeScript definition`](./thrustcurve.d.ts). | ||
## Installation | ||
### NPM | ||
``` | ||
@@ -27,3 +24,3 @@ npm i thrustcurve-db | ||
### Yarn | ||
... or with `yarn`: | ||
``` | ||
@@ -35,3 +32,3 @@ yarn add thrustcurve-db | ||
### ES Modules | ||
ES Modules | ||
@@ -42,3 +39,3 @@ ```js | ||
### CommonJS | ||
... or for CommonJS: | ||
```js | ||
@@ -48,3 +45,3 @@ const MOTORS = require('thrustcurve-db'); | ||
### CommonJS w/ `import()` (NodeJS) | ||
... or for CommonJS w/ `import()` (NodeJS): | ||
@@ -57,2 +54,9 @@ Note: At present this requires you run `node` with the `--experimental-json-modules` flag | ||
... or to fetch from jsDelvr CDN: | ||
```js | ||
const MOTORS = await fetch('https://cdn.jsdelivr.net/npm/thrustcurve-db@latest/thrustcurve-db.json') | ||
.then(res => res.json()); | ||
``` | ||
## Example | ||
@@ -66,1 +70,9 @@ | ||
``` | ||
### Issues & Contributions | ||
The data provided here is sourced from thrustcurve.org. Omissions and errors in | ||
rocket data should be directed there. Any systematic problems or suggestions | ||
for how the data here is presented may be [reported | ||
here](https://github.com/broofa/thrustcurve-db/issues). | ||
@@ -13,3 +13,3 @@ type ThrustPoint = [number, number]; | ||
diameter : number; | ||
impulseClass : string; | ||
impulseClass : 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O'; | ||
infoUrl : string; | ||
@@ -27,3 +27,3 @@ length : number; | ||
totalWeightG : number; | ||
type : string; | ||
type : 'SU' | 'hybrid' | 'reload'; | ||
updatedOn : string; | ||
@@ -30,0 +30,0 @@ } |
1780064
72