Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orbital rings and accuracy #16

Open
MacaScull opened this issue Mar 4, 2022 · 8 comments
Open

Orbital rings and accuracy #16

MacaScull opened this issue Mar 4, 2022 · 8 comments

Comments

@MacaScull
Copy link

Hi, I noticed that the demo only seems to create ground tracked orbits for satellites, how would you go about producing a non suborbital/ground tracked orbit, in an instance with a rotating globe and moving satellites? Also how would you bench mark this against accuracy?

I've tried to use some of your code and make orbits that match in start and end positions, that are not ground tracked with the earth rotating also though havent been successful. Each time I try this I seem to end up with accuracy problems as the orbit of the ISS seems to be out a full orbit of the earth.

@dsuarezv
Copy link
Owner

dsuarezv commented Mar 5, 2022

Hi, by default orbits are displayed in ECEF mode, I guess you want ECI mode. You can display orbits in ECI mode (see below) but in that case you would have to implement the code for earth rotation, it's not in the library. It shouldn't be too difficult, just rotate the earth model the radians for the given time offset that is already used in the orbit prediction.

To display orbits in the ECI frame, set the type parameter of getPositionFromTle to 2 in tle.js. It has a default value of 1, change it to 2 instead, either in the default value or when calling the function.

@MacaScull
Copy link
Author

MacaScull commented Mar 5, 2022

Hi, Ive changed modes into ECI and that obviously now giving me the orbits I want. In regards to performing the earth rotation would that calculation be something along the lines of this:

       deg2Rad((hours * 15) + ((minutes/60) * 15) + (seconds/3600) * 15)

Then with the result of that I can do earth.rotation.y = result.

Would I have to account for any factors before rotating like a prior rotation?
Sorry about all the questions about this.

@MacaScull
Copy link
Author

Hello again, Ive added some inital rotation code in the _addearth function as:
earth.rotation.y = this.deg2Rad(((date.getHours() - 12) * 15) + ((date.getMinutes()/60) * 15) + (date.getSeconds()/3600) * 15)

And some rotation code to match that of the planet itself in the update positions function as:
this.earth.rotation.y += this.deg2Rad(15/3600)

Though again ive noticed using this site Tracker to keep track of the ISS and its position, that the path and position between the app and the site become out of sync. This happened when the ISS was coming from around the south up past south america over towards africa, this has got me thinking though, could the prediction code for this be wrong or not account for a different factor such as rotation speed at the equator being different rotation speeds at the poles, or could it potentially by due to the earth map being slightly wrong due to projections.

What are your thoughts on this?

@MacaScull
Copy link
Author

I forked the repo and added in my code to do these things which I want, the problems with accuracy are still there though. Any update on how I could fix this?

@dsuarezv
Copy link
Owner

dsuarezv commented Mar 14, 2022 via email

@MacaScull
Copy link
Author

What do you mean by checking the numerical solution? How would I do this?

I only ever visually see the issue, If you want you can use my forked version and view a ISS tracker on a normal map, you'll be able to see there the difference in positions and inaccuracies.

I apologise if any of this comes across as ignorant, I don't mean to sound like this.

@dsuarezv
Copy link
Owner

dsuarezv commented Mar 15, 2022

I was referring to the calculated coordinates of the station, the numbers, and check those against what you are comparing with. If they are similar, then the problem might be the texture mapping. If they are different, then the problem might be in how the solution is calculated.

@MacaScull
Copy link
Author

Im currently struggling getting the coordinates but due to an async issue, I will work on fixing this. If it were a texture map issue, where would suggest getting a better map? and if it wasnt a map issue but a solution calculation issue, how would you suggest I tackle that?

I have also made sure that the satellites and their orbit are not placed on the earth object and are separate to ensure that the earth and satellites are not directly having any effect on each other.

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

No branches or pull requests

2 participants