koansys / isat

Satellite Orbit Tracker: implement most-current SGP models and algorithms in JavaScript, then use to visualize hundreds of satellites with any browser
BSD 3-Clause "New" or "Revised" License
96 stars 38 forks source link

Port js to AMD and make it a library #162

Closed reedobrien closed 10 years ago

reedobrien commented 10 years ago

Files TODO:

davidcalhoun commented 10 years ago

If there's any libraries that could also work on the server (like the SGP4 stuff), it would be nice to have a UMD wrapper for those: https://github.com/umdjs/umd

It's super ugly, but in the end supports CommonJS (Node.js and Browserify), AMD (RequireJS), and older environments where those aren't available (no module loader, so it becomes defined in the global scope).

I wrote up a quick overview that hopefully helps: http://davidbcalhoun.com/2014/what-is-amd-commonjs-and-umd/

joshfinnie commented 10 years ago

@reedobrien, check out this repo: https://github.com/koansys/sgp4lib

Might help you get on with this task!

reedobrien commented 10 years ago

Do we need global opsmode? See #163

reedobrien commented 10 years ago

Just need docco on twoline2rv.js and sgp4init.js and then we can promote it out of this repo.