Skip to content

Commit

Permalink
Version 4.1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezze committed Sep 15, 2020
2 parents 47c6a6b + e957908 commit 0d77db6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

### 4.1.1 (2020-09-15)

- Fix TypeScript definition for `gstime` (#73).
- Fix documentation and TypeScript definition for `degreesLong` and `degreesLat` (#74).

### 4.1.0 (2020-09-14)

- TypeScript support is added via new TypeScript definitions file (#71).
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ var longitude = positionGd.longitude,
latitude = positionGd.latitude,
height = positionGd.height;

// Convert the RADIANS to DEGREES for pretty printing (appends "N", "S", "E", "W", etc).
var longitudeStr = satellite.degreesLong(longitude),
latitudeStr = satellite.degreesLat(latitude);
// Convert the RADIANS to DEGREES.
var longitudeDeg = satellite.degreesLong(longitude),
latitudeDeg = satellite.degreesLat(latitude);
```

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "satellite.js",
"version": "4.1.0",
"version": "4.1.1",
"description": "SGP4/SDP4 calculation library",
"main": "lib/index.js",
"jsnext:main": "dist/satellite.es.js",
Expand Down
30 changes: 22 additions & 8 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,24 @@ declare module 'satellite.js' {
export type GMSTime = number;

/**
* Convert a date time to GMST
* @param date Time to convert
*/
export function gstime(date: Date): GMSTime;
* Convert values to GMST. Accepts either a Date object, a Julian date number, or individual date and time
* component values. If individual values are specified, all but `msec` are required.
* @param dateYearArg Can be a Date, Julian date, or the year number for
* @param month Zero-based month number
* @param day Day of month
* @param hour Hour of day, based on 24 hour clock
* @param minute Minute(s)
* @param second Second(s)
* @param msec Optional milliseconds
*/
export function gstime(
dateYearArg: number | Date,
month?: number,
day?: number,
hour?: number,
minute?: number,
second?: number,
msec?: number): GMSTime;

/**
* Convert ECI to ECF. Units are not modified.
Expand Down Expand Up @@ -188,12 +202,12 @@ declare module 'satellite.js' {
): number;

/**
* Convert the longitude in RADIANS to DEGREES for pretty printing (appends "N", "S", "E", "W", etc).
* Convert the longitude in RADIANS to DEGREES.
*/
export function degreesLong(longitude: Radians): string;
export function degreesLong(longitude: Radians): number;

/**
* Convert the latitude in RADIANS to DEGREES for pretty printing (appends "N", "S", "E", "W", etc).
* Convert the latitude in RADIANS to DEGREES.
*/
export function degreesLat(latitude: Radians): string;
export function degreesLat(latitude: Radians): number;
}

0 comments on commit 0d77db6

Please sign in to comment.