-
Notifications
You must be signed in to change notification settings - Fork 14
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
RangeRate seems to be incorrect #25
Comments
Can you share the TLE and a timestamp where the issue occurs? I'll get it set up in a debugger and see where the issue is coming from. I'll also compare it to gpredict since the RR calculation is using the same formula. |
1 52708U 22053BE 22175.16667824 -.00063401 00000-0 -45001-3 0 9990 10:15 am 6/24/2022 Ground station location lat 31.577255 long -110.36208 alt 3052 |
Can you confirm that this snippet properly represents and reproduces the issue? var tle = new []
{
"1 52708U 22053BE 22175.16667824 -.00063401 00000-0 -45001-3 0 9990",
"2 52708 53.2156 116.0059 0002599 15.3214 275.1441 15.73231754 6108"
};
var time = new DateTime(2022, 6, 24, 17, 15, 00, DateTimeKind.Utc);
var gs = new GroundStation(new GeodeticCoordinate(Angle.FromDegrees(31.577255), Angle.FromDegrees(-110.36208), 3052));
var sat = new Satellite(tle[0], tle[1]);
while (true)
{
var o = gs.Observe(sat, time);
Console.WriteLine(o.RangeRate);
time += TimeSpan.FromSeconds(1);
Thread.Sleep(100);
} |
strangely it does not, however if you use DateTime.Now instead of the time i provided it does produce the issue I am seeing. |
Does it also break when using |
that also breaks. I think the issue may be that by setting time to DateTime.Now or DateTime.UtcNow the value changes while it is doing the calculations. |
Nope, thats not it, I think it just something to do with a time generated using DateTime.Now |
ok I created the time var like this and the problem went away. |
Changing the inner loop to directly use while (true)
{
var o = gs.Observe(sat, DateTime.UtcNow);
Console.WriteLine(o.RangeRate);
Thread.Sleep(1000);
} It's strange that directly using |
4.0.30319.42000 |
@parzivail so you are able to reproduce the issue I am seeing? |
Apologies for the delay -- No, I haven't been able to reproduce this issue, on .NET 4 or .NET 6. Can you put together a minimal repo that can demonstrate the issue so I can reproduce your setup exactly? I doubt this is a runtime issue but it's very strange that using the dynamic |
I Implemented a very basic application using SGP.NET and I think I am getting incorrect range rate values. my little test app is tracking STARLINK-3962, and I can watch the range change by something like .2 km/s or 1km/s depending on the satellites current position relative to the ground station. anyway the reported range rate is sometime 0km/s or 0.00000000000000002079601643302110 km/s. anyway that value I think is incorrect.
The text was updated successfully, but these errors were encountered: