Skip to content

Future maintenance of AA functionality #349

@Carifio24

Description

@Carifio24

In order to do many of its astronomical calculations, WWT includes functionality from the AA+ library, which is a C++ implementation of a variety of astronomical algorithms. As AA+ is written in C++ and the web engine is in JavaScript, this functionality is included via a C# translation of the library that was then transpiled into JavaScript.

While it's very cool that this was done, the issues fixed by #347 make clear that this not a super maintainable approach - it puts the onus on us to do the necessary maintenance (bugfixes, at least) on what is functionally an upstream dependency. @patudom and @johnarban and I had a brief discussion about this the other day, but I think we should investigate the feasibility of moving off of the WWT JS implementation.

I can see two possible options for doing that:

  1. There is an AA.js package that essentially does this.
  2. We could create a WASM build of the AA+ code directly (using emscripten) and then load and call into the WASM build of the library

Worth mentioning:
There is a Swift implementation of AA (don't see any way for us to use this), and a C# implementation (we've moved on from our C# transpilation, so also not super useful).

Provided that we think it's well-enough maintained, I would be more inclined towards option 1. We don't use WASM anywhere else in the engine, so a JavaScript dependency would slot more simply into our existing codebase. Plus, if we ever find that AA.js isn't well-enough maintained, creating our own WASM build is always an option.

Would love to hear any thoughts from @patudom @johnarban @pkgw @astrodavid10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions