I completely underestimated how much red tape there was to get the project open sourced. Better late than never: https://github.com/ngageoint/opensphere-asm
In Javascript, yes. However, the WebAssembly module is downloaded and converted directly to native instructions by the browser. The functions in that bindings.cpp file are not run in a Javascript context, but in a native one. The results, when passed back to Javascript, are definitely in Javascript's double-precision number format. At least that's my understanding. This is all new for me. If you still expect it to run natively in the same time, then perhaps it is a deficiency in the compile step...
I was going to link the project as soon as it goes open source, which should be a matter of days now (silly lawyers). In the meantime, here's the gist: Follow emscripten's setup instructions to get the environment set up Make a bindings.cpp file #include <emscripten/bind.h> #include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Rhumb.hpp> using namespace GeographicLib; using namespace emscripten; struct Coord { double lon; double lat; }; struct GeodesicDirectResult { double distance; double...
I was going to link the project as soon as it goes open source, which should be a matter of days now (silly lawyers). In the meantime, here's the gist: Follow emscripten's setup instructions to get the environment set up Make a bindings.cpp file #include <emscripten/bind.h> #include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Rhumb.hpp> using namespace GeographicLib; using namespace emscripten; struct Coord { double lon; double lat; }; struct GeodesicDirectResult { double distance; double...
I was going to link the project as soon as it goes open source, which should be a matter of days now (silly lawyers). In the meantime, here's the gist: Follow emscripten's setup instructions to get the environment set up Make a bindings.cpp file #include <emscripten/bind.h> #include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Rhumb.hpp> using namespace GeographicLib; using namespace emscripten; struct Coord { double lon; double lat; }; struct GeodesicDirectResult { double distance; double...
I noticed that the Javascript port included in GeographicLib only contains the geodesic calculations. I was also interested in the rhumb versions along with the MGRS conversion functions. I initially went down the route of attempting to flesh out the Javascript port, but quickly realized that it was a non-trivial task to bring it up to speed. Queue shower thought: Didn't someone compile the Unreal Engine and DOOM to Javascript? That got me to try running the original C++ implementation through emscripten...