-
Notifications
You must be signed in to change notification settings - Fork 9
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
Replace OrbitalState with ANISE::Orbit #33
Conversation
gwbres
commented
Aug 13, 2024
- Replace OrbitalState with ANISE::Orbit #32
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Looking good, I just need to conclude all replacement, double check the [m]/[km] unit. I hope to conclude this today There are only 3 sensitive points:
|
I think I will use the rotation that discards velocities at all times. |
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
src/tests/bancroft.rs
Outdated
-16029029.85873581 / 1.0E3, | ||
-5905924.153143198 / 1.0E3, | ||
Epoch::from_str("2020-06-20T00:00:00 GPST").unwrap(), | ||
EARTH_J2000, //wrong ! wgs84 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the ITRF93 frame or IAU_EARTH_FRAME here. In one application that I have, we use the ITRF93 frame and it matches with some internal verification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two key structures to my apps, are Solver
within this very crate, and QcContext
in the rinex libs.
Both of them now have an Almanac and a Frame defintion. The frame needs to be ECEF in these kind of applications. The almanac is built with until_2035()
and it retrieves an ITRF93 frame, because you told me this in previous conversations.
Is it safe to use ITRF93 anytime I need an ECEF ?
What is the difference between IAU and all the other ECEF (ITRF93, EARTH_J2000..) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually, the ITRF93 is not defined with until_2035
: NASA JPL updates this frame daily. It's the high precision frame that includes all of the latest Earth orientation parameters, and it is an Earth centered Earth fixed frame. The IAU_EARTH_FRAME is also an ECEF frame, which is less precise than the ITRF93. It is provided by the International Astronomy Union, and is within a few millidegrees of the ITRF93 frame. The Earth J2000 frame however is not an Earth fixed frame, and is instead an inertial frame (whose acceleration with respect to the stars is zero).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you very much for taking the time to explain once again.
It is natural to require remote access for ITRF models, but then I don't understand why the current form seems to work.
- ANISE should throw an error instead, when I try to obtain the ITRF93 model while the Almanac was built with
until_2035
. Are we sure what's happening inside your core is what you intend ? I'm able to express orbits and navigate - I use EARTH_J2000 lazily, because I have seen you use it in several places. For example when obtaining unit vectors (r_hat) between Earth and Sun, we used EARTH_J2000 and SUN_J2000. The bottom line I guess, is I have no idea if some operations may require inertial frames while others may require fixed frames.
In my mind, at least that's what I foresaw, I'd like to propose an interface for either "autonomous" deployment (no remote access) limited to basic ECEF models, and "cloud" deployment, where the best models can be used. So we can always deploy and always work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ANISE will throw an error if you try to perform any rotation or translation from the ITRF93 frame to any other frame and the ITRF93 frame is not loaded. Let me know if that isn't the case, because I would be very surprised (and it would be a bug).
In astrodynamics, we tend to use J2000 or the International Celestial Reference Frame (ICRF) which are both inertial frame, which is why it's used everywhere in the documentation of the ANISE or Nyx. You want to use inertial frames when you're concerned with the position of your vehicle with respect to the stars or planets. When you're concerned with the latitude or longitude, you need to express the state of the spacecraft with respect to the celestial object for which you're computing that latitude and longitude. That's because the latitude of your vehicle depends on the exact orientation of the Earth (for example) at a given time. In other words, whenever you need information about a spacecraft that is relative to the orientation of a celestial object with respect to the stars, you need to use the body fixed frame.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to save this answer somewhere 😄
Ok so because I'm not 100% finished here and the rotations are not applied yet (-> small 10m errors), I have not run into the problem (in other words, all the calculations I do are feasible).
I am about to implement the rotations, I will just leave it as is to see if we indeed fall into the coordinates system error.
I will try to "rework" my coordinates system definition at the same time, but I'm not sure how to do that yet
Out of curiosity, are the results just as good with these changes as they were before? |
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
I have finished the conversion, and it does not work. The Bancroft solver unit test is in failure, with millions on meter errors. It only needs
|
Signed-off-by: Guillaume W. Bres <[email protected]>
Quelle dommage... Je peux passer un peu de temps de week-end à essayer de comprendre pourquoi le premier solver ne fonctionne pas. C'est assez surprenant. Est-ce que ça pourrait être une erreur d'unité ? |
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Hoestly the code has not changed much, and i double checked everything 5 times. |
Yes, the from_position initializer accepts negative positions. I can have a closer look over the weekend. |
Signed-off-by: Guillaume W. Bres <[email protected]>
I decided to continue and adapt rinex-cli to this and it passed. So if showed that there was an error in the test "setup". Now the solver runs into more problematic issues. This does not simplify things. Note that I'm also trying to come up with a Self::build_almanac infaillible method, that could leave options to retrieve the highest precision kernels, like you told me a couple of days ago |
Signed-off-by: Guillaume W. Bres <[email protected]>
Also, could you please explain what is the new method to rotate an Orbit ? |
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Hello, the upgrade is completed. It as not been easy once again... I think I will pause all of these upgrades. The most important aspect of this PR is that we have a correct ITRF93 frame ecosystem now. Now that I'm getting familiar with ANISE, I might be in better position to tacke the kepler problem. |
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Good work, that was a lot! I think that the filter in Nyx could be useful, but I need to add the batch least squares for some of my work as well, and for this I'll take inspiration for your implementation. |
I simply copied what ESA explains p142 and 143, KF being the next paragraph |