- Topics: 29
- Replies: 1,474
- Posts: 1,503
There would have to be a way to do it in scripting, but it will involve a bit of geometry. I do see that the swiss ephemeris has it available but we have never exposed it and it would be a 3-6 month turn around for us to add it in. My whole astro engine overhaul has been delayed, but I can add this to that list.
Elongation angle is the angle between planet and sun as seen from earth. Greater Western would look like this
So we can take Geocentric PVAL for Sun and Mercury then take the difference between them. We will have to smooth the results to deal with one of them being over 360 degrees etc.
Here is a script to use
// deal with the spikes
smooth = if(diff > 180, diff-360, if(diff < -180, diff+360, diff));
This is the script for the arrows, but if we output “smooth” then you can see the plot at the bottom.
I’m not sure that this is the right number but it will give you a start and hopefully it gives you what you need right now.
All the best