Walkthrough jupyter notebook doesn't work
- Dominant language
- Python
- Stars
- 723
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
First time user who gets runtime error on trying the Walkthrough jupyter notebook:
```
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 11
9 # We use RINEX3 PRNs to identify satellites
10 sat_prn = 'G07'
---> 11 sat_pos, sat_vel, sat_clock_err, sat_clock_drift, ephemeris = dog.get_sat_info(sat_prn, time)
12 print("Satellite's position in ECEF (m) : \n", sat_pos, '\n')
13 print("Satellite's velocity in ECEF (m/s) : \n", sat_vel, '\n')
File ~/opt/anaconda3/envs/missile-tid/lib/python3.10/site-packages/laika/astro_dog.py:265, in AstroDog.get_sat_info(self, prn, time)
263 eph = None
264 if self.pull_orbit:
--> 265 eph = self.get_orbit(prn, time)
266 if not eph and self.pull_nav:
267 eph = self.get_nav(prn, time)
File ~/opt/anaconda3/envs/missile-tid/lib/python3.10/site-packages/laika/astro_dog.py:106, in AstroDog.get_orbit(self, prn, time)
104 def get_orbit(self, prn: str, time: GPSTime):
105 skip_download = time in self.orbit_fetched_times
--> 106 orbit = self._get_latest_valid_data(self.orbits[prn], self.cached_orbit[prn], self.get_orbit_data, time, skip_download)
107 if orbit is not None:
108 self.cached_orbit[prn] = orbit
File ~/opt/anaconda3/envs/missile-tid/lib/python3.10/site-packages/laika/astro_dog.py:363, in AstroDog._get_latest_valid_data(self, data, latest_data, download_data_func, time, skip_download, recv_pos)
361 download_data_func(time, recv_pos)
362 else:
--> 363 download_data_func(time)
364 latest_data = get_closest(time, data, recv_pos=recv_pos)
365 if is_valid(latest_data):
File ~/opt/anaconda3/envs/missile-tid/lib/python3.10/site-packages/laika/astro_dog.py:211, in AstroDog.get_orbit_data(self, time, only_predictions)
209 ephems_sp3 = self.download_parse_orbit(time)
210 if sum([len(v) for v in ephems_sp3.values()]) < 5:
--> 211 raise RuntimeError(f'No orbit data found. For Time {time.as_datetime()} constellations {self.valid_const} valid ephem types {self.valid_ephem_types}')
213 self.add_orbits(ephems_sp3)
RuntimeError: No orbit data found. For Time 2018-01-07 00:00:00 constellations ['GPS', 'GLONASS'] valid ephem types (, , )
```
Output of this code block:
```
# For example if we want the position and speed of satellite 7 (a GPS sat)
# at the start of January 7th 2018. Laika's custom GPSTime object is used throughout
# and can be initialized from python's datetime.
from datetime import datetime
from laika.gps_time import GPSTime
time = GPSTime.from_datetime(datetime(2018, 1, 7))
# We use RINEX3 PRNs to identify satellites
sat_prn = 'G07'
sat_pos, sat_vel, sat_clock_err, sat_clock_drift, ephemeris = dog.get_sat_info(sat_prn, time)
print("Satellite's position in ECEF (m) : \n", sat_pos, '\n')
print("Satellite's velocity in ECEF (m/s) : \n", sat_vel, '\n')
print("Satellite's clock error (s) : \n", sat_clock_err, '\n\n')
# we can also get the pseudorange delay (tropo delay + iono delay + DCB correction)
# in the San Francisco area
receiver_position = [-2702584.60036925, -4325039.45362552, 3817393.16034817]
delay = dog.get_delay(sat_prn, time, receiver_position)
print("Satellite's delay correction (m) in San Fransisco \n", delay)
```
Which prints out:
```
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18006/final/Sta19826.sp3
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18008/final/Sta19831.sp3
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18007/final/Sta19830.sp3
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1982/igs19826.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igs19830.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igs19831.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1982/igr19826.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igr19831.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igr19830.sp3.Z
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18007/rapid/Sta19830.sp3
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18008/rapid/Sta19831.sp3
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18006/rapid/Sta19826.sp3
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19831_18.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1982/igu19826_18.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19830_18.sp3.Z
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18006/ultra/Sta19826.sp3
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18007/ultra/Sta19830.sp3
Downloading https://github.com/commaai/gnss-data-alt/raw/master/MCC/PRODUCTS/18008/ultra/Sta19831.sp3
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19831_12.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1982/igu19826_12.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19830_12.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19831_06.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19831_00.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1982/igu19826_06.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19830_06.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1983/igu19830_00.sp3.Z
Downloading https://github.com/commaai/gnss-data/raw/master/gnss/products/1982/igu19826_00.sp3.Z
```
I tried signing up for an Earthdata account and installing `laika` from source with a `.netrc` file in the root folder with `python setup.py install`. Also tried wiping the cache, which is at `/tmp/gnss`. Cache looks like this:
```
ls /tmp/gnss
cddis_products russian_products
ls /tmp/gnss/cddis_products
1982 1983
ls /tmp/gnss/cddis_products/1982
igr19826.sp3.attempt_time igs19826.sp3.attempt_time igu19826_00.sp3.attempt_time igu19826_06.sp3.attempt_time igu19826_12.sp3.attempt_time igu19826_18.sp3.attempt_time
```
Running on a Mac with python 3.10.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by rerunning the Walkthrough Jupyter notebook cell that calls dog.get_sat_info for 2018-01-07, then inspect the AstroDog.get_orbit_data and download_parse_orbit paths shown in the traceback. Done means the notebook obtains orbit data without the RuntimeError and prints the satellite position, velocity, clock error, and delay correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100