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

FindNextAboveToBelowCrossingPoint fails to find the crossing #29

Open
VE3NEA opened this issue Jul 2, 2024 · 1 comment
Open

FindNextAboveToBelowCrossingPoint fails to find the crossing #29

VE3NEA opened this issue Jul 2, 2024 · 1 comment

Comments

@VE3NEA
Copy link

VE3NEA commented Jul 2, 2024

Under certain circumstances the elevation angle of a satellite gets stuck at some positive value, and FindNextAboveToBelowCrossingPoint finds the crossing only a few years in the future. This code reproduces the problem:

    public void ReproduceError()
    {
      var myLocation = new GeodeticCoordinate(Angle.FromDegrees(44), Angle.FromDegrees(-79), 270);
      var groundStation = new GroundStation(myLocation);

      string tle0 = "0 GOES 18";
      string tle1 = "1 51850U 22021A   24184.52757794  .00000099  00000-0  00000+0 0  9998";
      string tle2 = "2 51850   0.0386 165.9928 0000260 341.7596 186.2013  1.00270475  8635";

      var satellite = new Satellite(tle0, tle1, tle2);
      var start = DateTime.Parse("2024-07-02 21:57:20Z");
      var end = start.AddMinutes(60);

      var passes = groundStation.Observe(satellite, start, end, TimeSpan.FromSeconds(15));
      if (passes.Count > 0) Debug.WriteLine($"Pass end: {passes[0].End}");
    }

This code runs for about a minute and then prints:

Pass end: 2035-01-12 03:26:30
@parzivail
Copy link
Owner

Interesting, thanks for reporting it. I'll take a look.

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