gnssr4water.fresnel.orbits module#
This code is to retrieve the orbits of GPS and GLONASS satellites @author: Lubin Roineau, ENSG-Geomatics (internship at UT-ITC Enschede), Aug 26, 2022 Modified R. Rietbroek, March 2024
- gnssr4water.fresnel.orbits.clean_dir(dir)#
Simple function to clean a directory.
- gnssr4water.fresnel.orbits.download_gnss_sp3_orbits(date=None, outputdir='.', hour='00', provider='esa')#
Retrieve an SP3 orbit file from one of the providers :param date: Date to download orbit data for. Leave empty to retrieve the most recent data :param outputdir: Specify an output directory to writei to (default is the current directory) :param hour: For near real-time data: a specifc batch to download, eitther one of ‘00’, ‘06’,’12’,’18’ :param provider: Provider to retrieve the GNSS orbits from (currently only “esa”)) :return: The local file name to which data has been downloaded
- gnssr4water.fresnel.orbits.gpsweek(date=None)#
Return the gps week and secondes for a given date.
- Parameters:
date (datetime) – Date used for determining the gps week.
- Returns:
GPS_wk, GPS_sec_wk – The gps week and second of the week.
- Return type:
int
- gnssr4water.fresnel.orbits.orbitxyz2aer(x, y, z, lon, lat, height)#
- gnssr4water.fresnel.orbits.read_sp3(file, predict_only=False)#
Read the sp3 file and turn it to a DataFrame. Can also be a Bytes file if unzipped directly with unlzw3.
- Parameters:
file (String or file object like) – The sp3 file or the local unzipped file in Python.
predict_only (Boolean) – Set to True if only predicted orbits are wanted.
- Returns:
df_sp3 – The content of the sp3 on a DataFrame.
- Return type:
DataFrame
- gnssr4water.fresnel.orbits.skyplot(df, GPS=True, GLONASS=True)#
Print a skyplot with angle starting from North and going clockwise. By default plot GLONASS and GPS but can be filtered by setting to False.
- Parameters:
df (DataFrame) – The dataframe from the satellites.
- Return type:
Skyplot