JKamue / SatWatcher

Small satellite tracker and pass predicter
GNU General Public License v3.0
3 stars 0 forks source link

Few minutes difference compared with passes predictions from Heavens-above.com #2

Open edetoc opened 1 year ago

edetoc commented 1 year ago

Nice App, Congratulations !

I am also using OneSgp4 library in my app and I'm considering adding passes predictions. I can see you have this in your app:

https://github.com/JKamue/SatWatcher/blob/3d1bcdd346b2d1e7dd07e6aa7ab2edcb7ba2b4f8/SatWatcher/Forms/PassCalculator.cs#L52

I just tried to compare the predictions obtained with your app with what I get from Heavens-above.com (for Paris). for each pass I can see a few minutes difference. I have underlined some of them in the screenshot below (on the left is heavens-above.com, your app is on the right). Have you noticed that too ?

image

thanks !

JKamue commented 1 year ago

Hey, thanks for reaching out and letting me know!

I was able to reproduce this behaviour, seems like it consistenly is off by a few minutes and also has the incorrect Azimuth and Elevation data. (Time on the right side is UTC)

Screenshot 2022-10-11 100055

This is weird since I am pretty sure that I cross compared with N2YO and other pages a lot when I initially wrote the program. But it is possible that I introduced an error somewhere that accumulated over time. According to the library used the error should not be larger than 1KM:

The SGP4 implementation is accurate in the KM range meaning the calculated position of an object can be off by around 1 km

https://github.com/1manprojects/one_Sgp4/blob/master/README.md#accuracy

I would assume that this is an error introduced by me and not the library and that you can safely implement the pass prediciton in your program. But I would have to do some further digging into it to confirm this suspicion and hopefully fix my bug as well.

Sadly I have a lot of other projects going on at the time. I am not sure when I will get around to fixing this.

edetoc commented 1 year ago

Thanks a lot for your response. I did some more experimentation on my side. I wrote a simple app that is calling :

List passes = One_Sgp4.SatFunctions.CalculatePasses(observer, tleISS, new EpochTime(DateTime.Today), 1, 3, Sgp4.wgsConstant.WGS_84);

observer coordinates in below screenshot is the Eiffel tower: One_Sgp4.Coordinate observer = new Coordinate(48.8583, 2.2945, 0); // tour eiffel

I am getting the TLE for the ISS from Celestrak: https://celestrak.org/NORAD/elements/gp.php?CATNR=25544

I have compared the passes (all passes, in local time) obtained in my app with N2YO and I can see pretty similar results:

image

I don't see anything wrong in your code (btnCalc_Click). I see you're using a different source for the TLE. Could it be the root cause why you're seeing inaccurate results ?