Skip to content

Conversation

@kyle-su1
Copy link

Purpose

Closes #366 .
Addresses points in parent pr. However, note that setup_sgp4() in positioning/tle.py is bugged, resulting in failure of test_get_sat_position() in python_test/positioning/test_sgp4_handler.py

New Changes

Moved gs/positioning/tle.py to gs/backend/positioning/tle.py
Added tests for functions in positioning/tle.py
Created sgp4_handler.py and setup sgp4 in accelerated mode
Made function to takes in a TLEData object and datetime to return the sgp4 progagator data as custom object SGP4Data
Added tests for functions in both tle.py and sgp4_handler.py in new positioning directory under python_test

Testing

tle.py functions:
Tested calculate_checksum with sample TLEs to ensure the correct checksum value is returned
Tested convert_decimal_point_assumed() returns expected decimal values. Note that this function fails on negative values, but I believe through research that TLEs will not have negative values that break the function so should work as intended in practice
Tested parse_tle_data() with sample TLEs with expected results
Tested parse_tle_data_invalid() to identify mismatched checksums

sgp4_handler functions:
Tested test_setup_sgp4() to ensure it returns valid Satrec object
Tested get_sat_position() with sample TLEs and datetimes. Currently works only on some TLEs. Returns eccentricity out of range error for the following sample TLE:

"CSS (MENGTIAN)\n"
"1 54216U 22143A 25308.16010129 .00032649 00000-0 38953-3 0 9993\n"
"2 54216 41.4668 251.0039 0006377 319.7576 40.2790 15.60341380158647"

Source of error should be setup_sgp4() in positioning/tle.py. Error occurs for TLEs where tle.eccentricity is low while tle.drag_term is high. See comments in testing files for specifics.

Outstanding Changes

Should create new pr for anyone that wants to tackle debugging

@github-actions
Copy link

Pull reviewers stats

Stats of the last 120 days for UWOrbital:

User Total reviews Time to review Total comments
Adityya-K
🥇
40
▀▀▀▀
3d 20h 30m
102
▀▀
camspec
🥈
38
▀▀▀▀
2d 18h 47m
225
▀▀▀▀▀
proprogrammer504
🥉
11
7d 1h 30m
▀▀
43
kepler452b123
8
1d 18h 25m
24
Syzygicality
6
17h 19m
10
joannalauu
3
4d 21h 20m
19
c4bae
1
13d 1h 35m
▀▀▀▀
2

⚡️ Pull request stats

Copy link
Contributor

@Adityya-K Adityya-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skimmed, will look at it once more and try to figure out the eccentricity issue!

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

Successfully merging this pull request may close these issues.

Setup SGP4 Propagator

3 participants