Skip to content

Commit b7f045c

Browse files
committed
Last Sync: 2025-06-27 12:00 (Mobile)
1 parent ffacc1a commit b7f045c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.csv

mods/get_keps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Downloads Keplarian(Keps) Elements from Celestrak, only if file hasn't been download yet
55
# + only if previous file is more than max_days old (default 7.0)
6-
def get_keps(sat_group:str, file_format:str, max_days=7.0):
6+
def get_keps(sat_group:str, file_format:str, force_dl=False, max_days=7.0):
77
"""get_keps(sat_group: str -> Satellite group,
88
file_format: str -> Format of the downloaded data,
99
max_days: float -> Maximum amount of days before redownloading file (Default: 7.0)"""
@@ -18,7 +18,7 @@ def get_keps(sat_group:str, file_format:str, max_days=7.0):
1818
url_base = "https://celestrak.org/NORAD/elements/gp.php"
1919
url_opt = f"?GROUP={s_group}&FORMAT={kep_format}"
2020
url = url_base + url_opt
21-
if not load.exists(file_path) or load.days_old(file_path) >= m_days:
21+
if not load.exists(file_path) or load.days_old(file_path) >= m_days or force_dl:
2222
load.download(url, filename=file_path)
2323
return file_path
2424

0 commit comments

Comments
 (0)