Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

other stars #22

Open
YOEL311 opened this issue Oct 19, 2019 · 24 comments
Open

other stars #22

YOEL311 opened this issue Oct 19, 2019 · 24 comments

Comments

@YOEL311
Copy link

YOEL311 commented Oct 19, 2019

hello!
thanks for this great library
i want a similar library that calculeates the location and height of many other stars in the sky
i want to use it in java script
is there such a library?

@YOEL311 YOEL311 changed the title other starts other stars Oct 19, 2019
@ghost
Copy link

ghost commented Oct 20, 2019

I'm afraid I don't know of any!

To low precision, the math is straightforward, but getting good accuracy is daunting. I have access to VSOP87, but it's really overkill for our purposes. (What I really want is as few terms as I need to be accurate to an arcsecond or so within 200 years of J2000.)

I imagine there must be such estimations, but I haven't found them. If I can find a good one, I'd like to include it.

@YOEL311
Copy link
Author

YOEL311 commented Oct 21, 2019

Very unfortunate
Exactly low is good too
Do they have other languages (JAVA for example)?

@ghost
Copy link

ghost commented Oct 21, 2019

The webpage linked describes an algorithm but does not provide source code in any language, you'd have to write a library for it.

@ghost
Copy link

ghost commented Oct 22, 2019

I think this might be what we're looking for: https://ssd.jpl.nasa.gov/?planet_pos

@YOEL311
Copy link
Author

YOEL311 commented Oct 22, 2019

Great
Maybe we will write a library that does this?
I am very happy to help
Although i was not good at math

@ghost
Copy link

ghost commented Oct 22, 2019

I'll be looking into it as time permits! The other stars aren't a high priority for our business, but they do look fun, so...

@YOEL311
Copy link
Author

YOEL311 commented Oct 22, 2019

Very strange that they have not done suchthung to thiis day

How do you want to call the new repository , or you prefer to bulid it witihin the current repository

@ghost
Copy link

ghost commented Oct 22, 2019

Another option: http://stjarnhimlen.se/comp/ppcomp.html

I think I prefer the JPL fits, but they don't include the moon.

@ghost
Copy link

ghost commented Oct 22, 2019

@YOEL311 I do not yet know if it's in-scope or out-of-scope for this library. Will ponder that!

@YOEL311
Copy link
Author

YOEL311 commented Oct 22, 2019

Another option: http://stjarnhimlen.se/comp/ppcomp.html

I think I prefer the JPL fits, but they don't include the moon.

Yes, but we already have the moon

@ghost
Copy link

ghost commented Oct 22, 2019

Well, yes, but to a much lower accuracy than the rest of the data. Since the earth's position depends on the moon's, this can have a significant effect upon the accuracy of the other planets (especially the ones close to the earth).

@ghost
Copy link

ghost commented Oct 22, 2019

Actually, I take that back: over the distances involved, it probably doesn't matter too much.

@ghost
Copy link

ghost commented Oct 28, 2019

So I spent some time over the weekend on this and I'm about halfway to a prototype that does everything the library currently does, but for all the planets. If I can manage to duplicate all of the functionality and the performance isn't substantially worse, then I'll probably just make the next major version of astro a complete rewrite.

@YOEL311
Copy link
Author

YOEL311 commented Oct 28, 2019

Great!
Are there any thing I can help?
I would be very happy if you gave me easy tasks
I want to help

@ghost
Copy link

ghost commented Oct 28, 2019

I guess the place to start is: what is your use case? Can you tell me about what you want to know about the various planets and how you want to go about getting that information? I have the math put together but I haven't really settled on an interface yet, so knowing how you want to interact with the library in detail would be very helpful

@YOEL311
Copy link
Author

YOEL311 commented Oct 28, 2019

I want to develop an app
Which directs the user to find the stars

I have such an Android app

https://play.google.com/store/apps/details?id=com.table.yoel.compass

I would like to develop such a REACT NATIVE technology for Android and iPhone
To all the stars

@YOEL311
Copy link
Author

YOEL311 commented Oct 28, 2019

I just need azimuth and altitude

@ghost
Copy link

ghost commented Oct 28, 2019

OK, that's helpful, thank you! That gives me a good sense of the accuracy requirements and features you need. (To be honest, it sounds like our use-case is much more strict than yours, since we're an API and therefore our performance considerations are very tight!)

I was just planning on supporting sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune for now. Do you need anything else? (Major fixed stars, like Sirius or Polaris, maybe?)

@ghost
Copy link

ghost commented Oct 28, 2019

I'm thinking that the API for that will probably be something like:

const lat = 42;
const lon = -73;
const date = new Date();
const observer = new Astro(new Date(), lat, lon);
console.log(observer.moon.altitude, observer.moon.azimuth);
console.log(observer.saturn.altitude, observer.saturn.azimuth);
... etc ...

@YOEL311
Copy link
Author

YOEL311 commented Oct 28, 2019

exactly like that API

I want to let the user choose which stars interest him
That's why I need some of the popular and interesting stars

By the way I know there is a deviation in the direction of the compass in all kinds of places in the world
Everywhere he has a different aberration
There is a directory in JAVA that gives it
https://developer.android.com/reference/android/hardware/GeomagneticField
Do you know any of these in JS?

@ghost
Copy link

ghost commented Oct 28, 2019

OK, we'll maybe look into including a some of the brightest stars in the sky or maybe constellations (or, at the least, making it easy to add these so we can accept PRs for them). Since they have fixed right ascensions and declinations, their position is very simple to calculate.

Regarding magnetic aberration, I haven't looked for any such libraries, sorry!

@ghost
Copy link

ghost commented Oct 29, 2019

Conducted a little test and yes, it's easy to incorporate fixed stars. For starters I'll probably include a few notable ones (bright stars like Sirius and Canopus and/or culturally significant stars like Polaris and the Pleiades).

@ghost
Copy link

ghost commented Nov 1, 2019

OK, I created a draft PR here: #23

There's still some work to go, but it's good enough to be looked at.

@ghost
Copy link

ghost commented Feb 5, 2020

I found that the equations suggested above for the planets aren't compatible: they do not account for precession (e.g. they are fixed to the J2000 equinox).

This paper gives terms for the planets (and the moon) which handle this: http://articles.adsabs.harvard.edu/full/1994A&A...282..663S

I've tested them and they seem to work great, at least for the moon and inner planets. The outer planets have accuracy issues since they are massive enough to regularly perturb each other! The paper accounts for this with some periodic terms, but says the periodic terms are with respect to the J2000 equinox, and so I'm not sure if they're compatible with the equinox of date mean elements. I will experiment.

Interestingly, they give a range of 4000 BC to AD 8000 on their equations if we use all the polynomial terms! Merely using the linear terms seems fine for the next hundred years, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant