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

Crash on SGP4Wrapper while getting SatelliteData #1

Open
s-surjeet opened this issue Sep 26, 2022 · 2 comments
Open

Crash on SGP4Wrapper while getting SatelliteData #1

s-surjeet opened this issue Sep 26, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@s-surjeet
Copy link

I am using below details to parse StarLink satellite data.

let title = "0 STARLINK-30",
let firstLine = "1 44244U 19029K 20287.12291165 .47180237 12426-4 22139-2 0 9995"
let secondLine = "2 44244 52.9708 332.0356 0003711 120.7278 242.0157 16.43170483 77756"

let tle = TLE(title: title, firstLine: firstLine, secondLine: secondLine)

// Instantiate the interpreter
let interpreter = TLEInterpreter()

// Obtain the data
let data: SatelliteData = interpreter.satelliteData(from: tle, date: .now)
When above function executes, app crash on below line

Eci eci = sgp4.FindPosition(date);

with
libc++abi: terminating with uncaught exception of type SatelliteException: Error: (e <= -0.001)

@csanfilippo csanfilippo self-assigned this Sep 26, 2022
@csanfilippo csanfilippo added the bug Something isn't working label Sep 26, 2022
@csanfilippo
Copy link
Owner

@s-surjeet I think the issue is due to the wrong lenght of the two lines passed to the library.
What happen if you use these two lines instead?

let firstLine = "1 44244U 19029K   20287.12291165  .47180237  12426-4  22139-2 0  9995"
let secondLine = "2 44244  52.9708 332.0356 0003711 120.7278 242.0157 16.43170483 77756"

@s-surjeet
Copy link
Author

@csanfilippo I am using the similar lines with equal spaces as you have provided.
Earlier code formatting remove spaces, and changed length.
I tried lines provided by you, and it's crashing with same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants