Skip to content

Conversation

@PHCCorso
Copy link

@PHCCorso PHCCorso commented Jan 2, 2024

This is a proof-of-concept implementation. I got rid of all calls to starAPI, making working with the ephemeris data more practical and increasing response speed (and also improving development experience by reducing the amount of projects that need to be bootstrapped). This also allows for more sophisticated feature implementations in the future, like calculating subsequent events — that could potentially require the generation of hundreds, or even thousands, of future charts in a sequence, which would be impracticable with the current approach, I guess.

I've also included all the ephemeris files, as instructed by the sweph maintainer, but not sure if I really needed to commit them here, because they're not exactly light files to be in a versioned repository. Maybe they could be included only at build time...

...and that brings me to the next issue: the only reason this is a POC is because Vercel + Next.js don't seem to like resource files that aren't explicitly required in the code, so this whole thing could backfire and get discarded. Issue mentioned in the source.

The app should look and function EXACTLY the same as before, just be aware that:

  • The values returned by the sweph lib have a higher precision than those returned by the command line swetest executable, so angles and positions might vary slightly — the reason for that is swetest cuts out decimal cases for nicer output, while sweph keeps the raw numbers
  • In the case where the /ephe folder is not found by the sweph.set_ephe_path() function, the lib will fall back to using the Moshier Ephemeris, which is less precise and will spit out (considerably) different numbers

…somente o fetch das casas como proof-of-concept
@vercel
Copy link

vercel bot commented Jan 2, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @gnumoreno on Vercel.

@gnumoreno first needs to authorize it.

@PHCCorso PHCCorso changed the title POC: switch to Node.js Swiss Epheremiss binding POC: switch to Node.js Swiss Ephemeris binding Jan 2, 2024
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.

1 participant