Range Rate and Doppler not working?
Xio1996 opened this issue · 3 comments
Hi Colby,
Thank you for your great library.
I might be using the library incorrectly or I might have found a problem in that the Range Rate and hence Doppler shift calculations.
I have attached a test program (Program.txt) and results file (Results.txt) that illustrates what I am seeing. The other information calculated for the satellite is correct when compared to WXtrack.
As you can see in the program file, I have hacked a workaround that just calculates Range Rate by querying the satellite range 1 second ahead of NOW and then subtracting the ranges. I can then use your code to calculate the doppler shift. The results all seem to match up with WXTrack (Workaround Results.txt).
I hope you can help.
Many thanks
Pete
Hey Pete,
Managed to find the issue, the round-trip conversion between DateTime
and a double
amount of total seconds in the propagator back to a DateTime
turns out to be lossy by about 10 microseconds. The ECI to ECI conversion logic which checks if the ECI coordinate is valid at a given date was then failing to recognize that the ECI coordinate was valid for the given time and resorting to a geodetic fallback without velocity calculation (which is something else that might be broken, but I'll have to check) -- but it's fixed now. I'll update the NuGet with the new package.
Thanks for finding this! Was a sneaky bug to track down. Lemme know if you have any more issues with the new version.
Hi Colby,
Thank you very much for taking a look so quickly and fixing the bug. I will update the library and continue my satellite adventures!
Many thanks.
Pete
No problem! The new NuGet package will be here once it's indexed: https://www.nuget.org/packages/SGP.NET/1.2.1
Best of luck! If you need anything else please don't hesitate to open another issue.