1manprojects / one_Sgp4

C# SGP4 orbit prediction Library
MIT License
60 stars 14 forks source link

Using this library in Unity #1

Closed claudiaaw closed 7 years ago

claudiaaw commented 7 years ago

Hi! I am interested in using this library in Unity5.5.1, however it gives an issue:

The primary reference "One_Sgp4" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5,Profile=Unity Subset v3.5".

Just wondering is there anyway to use this library regardless of the difference in versions?

1manprojects commented 7 years ago

Thanks for the Info i did not think the 4.5 version would be incompatable in Unity. It is possible to recompile the project using the NET 3.5 version this should work with no problems. I have made an extra Release with NET 3.5.

claudiaaw commented 7 years ago

Thank you so much for the extra release! Just wondering, do you have any test cases or examples on how to use the library to get satellite positions? I want to find the current position (x,y,z) of a satellite with the current time using a TLE, and am slightly confused by the documentation. Sorry for any inconvenience caused! I am new to C# and the vast number of classes are a bit overwhelming.

1manprojects commented 7 years ago

Hello, Yes the documentation needs some work and i will try to update it at some point. In the mean time i updated the README in the project with a small example how to calculate the position of the ISS.

claudiaaw commented 7 years ago

Thanks!!! Really appreciate the work! I have another question, with the results Position (X,Y,Z) and its Velocity (X_dot, Y_dot, Z_dot), what is the origin? Is it with respect to the center of the Earth? Sorry for so many questions!

1manprojects commented 7 years ago

The coordinates are based on the World Geodetic System 1984 (WGS 84). The results are from the center point of the Earth's mass in kilometers while the velocity is in km/s.

claudiaaw commented 7 years ago

hello! so sorry to bother you again but in satfunctions for the azimuth and elevation calculation, in what units are they in? I also noticed that even though the time changes, sometimes the azimuth stays constant at pi (3.141593) and was wondering if you know why that is the case?

1manprojects commented 7 years ago

The azimuth and elevations are in radians and the range is in km. The aszimuth should change wenn the time and the coordinate of the satellite also changes. Just changing the time would mean the satellite is standing still relative to the center of the earth. You also have to provide the satellite position for that timepoint. If the funktion is still providing a constant PI value kann you open a new issu with an example of how you are calling the funktion.