Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include deg2rad constant in README.md #53

Closed
wants to merge 1 commit into from

Conversation

tylerdiaz
Copy link

This variable is referenced when initializing the observerGd object in the example code.

This variable is referenced when initializing the observerGd object in the example code.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 81.168% when pulling 69d7d8a on tylerdiaz:patch-1 into 7b00ec4 on shashwatak:develop.

@ezze
Copy link
Collaborator

ezze commented Jan 28, 2019

@tylerdiaz, thanks for PR.
I think that defining deg2rad constant in such way in the examples is not best solution. I propose to use degreesToRadians function instead. In the case of UMD its usage will look like this:

var observerGd = {
    longitude: satellite.degreesToRadians(-122.0308),
    latitude: satellite.degreesToRadians(36.9613422),
    height: 0.370
};

In a case of ES modules one should import the function this way:

import { degreesToRadians } from 'satellite.js';

@thkruz
Copy link
Collaborator

thkruz commented Feb 1, 2019

I think either option is better than the current example. @ezze's method makes it more modular.

@ezze
Copy link
Collaborator

ezze commented Mar 12, 2019

Updated in README.md in 5753e39.

@ezze ezze closed this Mar 12, 2019
@pkrasicki
Copy link

It would be good to mention some constants in readme. Things like earthRadius might be useful for calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants