Skip to content

Commit

Permalink
add initial s1-orbits functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Aug 2, 2024
1 parent 7e3fb76 commit 37060bc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/hyp3lib/get_orb.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ def get_orbit_url(granule: str, orbit_type: str = 'AUX_POEORB', provider: str =
raise OrbitDownloadError(f'Unknown orbit file provider {provider}')


def _get_s1_orbits_orbit_url(orbit_type: str, granule: str):
search_url = f'http://127.0.0.1:8000/scene/{granule}?orbit_type={orbit_type}'
return search_url


def downloadOrbitFileFromS1Orbits(
granule: str,
directory: str = '',
orbit_type: str = 'AUX_POEORB'
):
orbit_url = _get_s1_orbits_orbit_url(orbit_type, granule)
orbit_file = download_file(orbit_url, directory=directory)
return orbit_file


def downloadSentinelOrbitFile(
granule: str,
directory: str = '',
Expand Down

0 comments on commit 37060bc

Please sign in to comment.