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

One_Sgp4.SatFunctions.calcSatSubPoint possibly returning incorrect Longitude #17

Closed
ykhaled opened this issue Dec 22, 2019 · 2 comments
Closed
Assignees
Labels

Comments

@ykhaled
Copy link

ykhaled commented Dec 22, 2019

Function "calcSatSubPoint" returning incorrect latitude in latest version 1.0.9. Workign correctly in earlier version 1.0.8.

To Reproduce

string str1 = "ISS (ZARYA)";
string str2 = "1 25544U 98067A   19355.61517352  .00000218  00000-0  11831-4 0  9992";
string str3 = "2 25544  51.6432 152.1290 0007831  58.9521  16.9775 15.50124818204334";
Tle tleISS = ParserTLE.parseTle(str2, str3, str1);
EpochTime startTime = new EpochTime(DateTime.UtcNow.AddHours(-5));
EpochTime earthStartTime = new EpochTime(DateTime.UtcNow.AddHours(-5));
EpochTime stopTime = new EpochTime(DateTime.UtcNow.AddHours(5));

One_Sgp4.Sgp4 sgp4Propagator = new Sgp4(tleISS, Sgp4.wgsConstant.WGS_84);
sgp4Propagator.runSgp4Cal(startTime, stopTime, 1);
List<One_Sgp4.Sgp4Data> resultDataList = new List<Sgp4Data>();
resultDataList = sgp4Propagator.getRestults();
foreach (var result in resultDataList)
{
One_Sgp4.Coordinate satOnGround = One_Sgp4.SatFunctions.calcSatSubPoint(earthStartTime,result, Sgp4.wgsConstant.WGS_84);
double longitude = satOnGround.getLongitude()
earthStartTime.addMinutes(1);
}

@1manprojects 1manprojects self-assigned this Dec 22, 2019
@1manprojects
Copy link
Owner

The longitude value can in certain cases be smaller then negative two pi thus resulting in a wrong negatvie longitude value. Bug will be fixed with the next release. (planned: end of December 2019 )

@1manprojects 1manprojects added In Progress currently being worked on and removed In Progress currently being worked on labels Dec 23, 2019
@1manprojects
Copy link
Owner

Issue has been fixed with Release 1.0.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants