-
Notifications
You must be signed in to change notification settings - Fork 143
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
incorrect position & velocity #26
Comments
Dear @shashwatak, unfortunately, I have to confirm the trend as described by @weatherlym15. Indeed, for time instances close to the TLE epoch, the results provided by the js version match to the corresponding ones by the c++ version. Note that my js results are in agreement with those provided for benchmarking purposes, but the time instances there are quite close to the TLE epoch, and hence, the problem is not revealed. However, for time differences wrt TLE epoch larger than a few months, it becomes evident that the results between the two versions are starting to deviate. Below, as an example you may find results provided by both versions for the Astra 2F (38778) satellite using the following TLE:
By comparing the two versions, it becomes clear that the results are in agreement only for the TLE epoch time instance. Note that I have verified the validity of my c++ results by equivalent results using the STK software for the TEMEofEpoch system of coordinates. After enough trials and comparisons, I have concluded that perhaps either the js version has a bug, or progressively loose numerical precision, or the Cartesian position/velocity results versus time since TLE epoch are not in the True Equator, Mean Equinox (TEME) coordinate system, as the results provided by the c++ are. Please help me to resolve this matter, since your js version is quite useful to all of us. Thanks for your time, *** Results Obtained for Astra 2F (38778) Based on C++ Version ***
*** Results Obtained for Astra 2F (38778) Based on Javascript Version ***
|
@weatherlym15 @tikhonovits thank you for your patience, I have been very busy with work and travel. If you guys don't mind, ping me on Wednesday (march 13), I should be able to set aside some time to investigate this issue. |
Dear @shashwatak, as you see I was a little bit unpatient...! Fortunately, I found the source of the progressive deviation between js and c++ versions. By comparing all members of
The property that makes the difference of course is
everything worked fine! All position and velocity results between js and c++ versions now perfectly match. I suggest to further substitute all if conditions, which now are written as the problematic ones, with the original ones in the c++ version to be sure that all conditions will be working properly under different settings. Hope that helped. Best, |
@tikhonovits If you would be so kind as to make a PR with the necessary fixes, I will gladly accept it :) Please make sure the tests in the tests directory still pass. Also, please add your name to the |
I also found this issue last night migrating from RequireJS to CommonJS. ESLint pointed to these lines and I left them as is because wasn't sure how to fix them properly. @shashwatak, if you feel that code refactoring proposed by pull request mentioned above is acceptable, I can create another pull request later to fix this issue (like @tikhonovits proposed) and add some test cases based on Astra 2F results from C++ version. |
@ezze @tikhonovits are there any open PRs to address this? I’d be happy to open one myself but don’t want to take credit for anyone else’s work. |
@DangoDev, I decided to not make any changes to this repo until this big pull request is merged or rejected. Seems that @shashwatak is not supporting the repo anymore. |
@ezze That makes sense. I looked through that and saw you hadn’t sneakily changed the values for Is it time to discuss forking this repo? |
@DangoDev +1 for forking. But probably a person having a good knowledge in orbital mechanics is required to support it further. |
hides under desk |
I am sorry I’ve been unable to give any time to this project :(
I just made @ezze a Collaborator on this project to hopefully unblock
everybody.
…On Mon, Nov 13, 2017 at 12:23 Nikos Sagias ***@***.***> wrote:
@DangoDev <https://github.com/dangodev> @ezze <https://github.com/ezze>
If any help will be needed with orbital mechanics, I will be happy to
contribute. At least the bug mentioned in my previous post must be
corrected.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAoczq5o0O8HDY1uzhKEyD9BJ9T4wQ1bks5s2KU7gaJpZM4LuFMI>
.
|
@shashwatak That’s good news! Glad to hear it. And no need to apologize! You’ve done some incredible work on this project that you should be very proud of. Nothing to be sorry for. But all in all, glad to hear your good work can continue moving forward. |
@shashwatak No worries, we all have lives! Appreciate you giving @ezze collaborator rights to keep this awesome project going. :) |
Hey, @shashwatak! Great to hear you again! :) Thank you so much for your trust, I accepted your inventation. Hope that we will be able to move this project forward.
|
5th and 6th of the previous comment are done. @DangoDev, you can give a try to fix this issue but before that let's discuss a Git workflow to use (I propose to branch your pull request from |
@ezze all that sounds good to me. I’ll give your CJS branch a poke later this week. As for the workflow, that all works for me. I’ve commonly seen it both ways—either
Any PRs are forked from I’m also open to using Gitter. I’ve never tried it before, but I’ll give it a shot. |
But back to this issue, I can open up a PR this week and try to implement @tikhonovits’ patch unless someone else beats me to it. I’ll compare it to the target values and hopefully we’ll be able to hit those with just this one patch. |
@DangoDev, please write some tests relying on input data and results provided by @tikhonovits in your pull request. Probably adding these values to existing As for workflow, let's wait for what @shashwatak says. If he leaves |
TravisCI support is now enabled, i believe |
@ezze you now have npm ownership :) |
I also went ahead and protected both |
@shashwatak, Travis CI is configured for the repo. It lints, tests and builds the code for each new commit in Gitter chat is available, everyone interested can join it now (the link is added to I also see myself in contributors' list of the npm package. @DangoDev, start your pull request to fix this issue branching from |
Fixed by #37. |
The fix is finally released in 2.0.0. You can try to update the library and give it a try. |
I followed what you have in your README.md where I made timeSinceTleEpochMinutes = increments of 300.
var tleLine1 = '1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031',
tleLine2 = '2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869';
var satrec = satellite.twoline2satrec(tleLine1, tleLine2);
var positionAndVelocity = satellite.sgp4(satrec, timeSinceTleEpochMinutes);
But when I print out the x, y, and z positions and velocity values, the values differ from what I get using the python library you said you copied your satellite-js library from. At first the differences are small but they become a problem as my 300 second increments get larger and larger
Am I missing a step?
The text was updated successfully, but these errors were encountered: