shashwatak / satellite-js

Modular set of functions for SGP4 and SDP4 propagation of TLEs.
MIT License
916 stars 145 forks source link

Browserify-friendly #22

Closed battlesnake closed 7 years ago

battlesnake commented 8 years ago

I've forked and converted this library to be Browserify-friendly, i.e. I removed RequireJS so now it uses node-like module.exports and require instead, and thus can be bundled with Browserify. If this is of interest to you, I can send a pull request.

I also plan to heavily refactor the library in the future, towards a more OO-style, although I'm guessing that this won't be of interest since it will not be backward-compatible at all.

shashwatak commented 8 years ago

@battlesnake will making it compatible Browserify break the existing Bower configuration? If not, then please send me a PR =)

While I admire your goal of refactoring the code, I don't recommend you do that without a serious understanding of Orbital Mechanics, Ephemera, and all that good stuff. Besides that, I'm not sure if there is much to be gained by refactoring. The code is actually quite easy to follow from a numerical perspective. You might be able to group together a set of variables and call it a class, but you may find it difficult to draw out groups of variables into separate classes, especially if you don't understand what the variables are.

ezze commented 7 years ago

Please consider this pull request.

ezze commented 7 years ago

Closing this due to pull request adding Common.js support is merged. @battlesnake, please test whether it's what you want.