Skip to content

Commit 62db213

Browse files
committed
Merge branch 'v1.0.0' into derek/restructure
2 parents b0d00bd + 7b68ebd commit 62db213

20 files changed

Lines changed: 141 additions & 63 deletions

.gitignore

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@ results/*
2020

2121
# ignore downloaded csv files in notebook tutorials
2222
*.csv
23-
!data/unit_test/*/*.csv
23+
!data/unit_test/**/*.csv
2424
!notebooks/tutorials/myreceiver.csv
25-
!data/unit_test/google_decimeter_2023/2023-09-07-18-59-us-ca/pixel7pro/device_gnss.csv
26-
!data/unit_test/google_decimeter_2023/2023-09-07-18-59-us-ca/pixel7pro/ground_truth.csv
2725

2826
# ignore txt files in notebook tutorials
2927
*.txt
3028
!docs/source/requirements.txt
3129
!requirements.txt
32-
!data/unit_test/android/measurements/*.txt
33-
!data/unit_test/google_decimeter_2021/*.txt
34-
!data/unit_test/google_decimeter_2023/2023-09-07-18-59-us-ca/pixel7pro/*.txt
30+
!data/unit_test/**/*.txt
3531

3632
# Ignore downloaded precise ephimerides files by default
3733
*.sp3
@@ -48,19 +44,18 @@ results/*
4844
# Ignore NMEA files by default
4945
*.nmea
5046
# Include unit test NMEA files
51-
!data/unit_test/nmea/*.nmea
52-
!data/unit_test/android/nmea/*.nmea
47+
!data/unit_test/**/*.nmea
5348

5449
# Ignore downloaded broadcast ephimerides files by default
5550
*.*n
5651
*.*o
5752
*.*g
5853
*.rnx
5954
# Include unit test files for broadcast ephemerides
60-
!data/unit_test/*/*/*.*n
61-
!data/unit_test/*/*/*.*o
62-
!data/unit_test/*/*/*.*g
63-
!data/unit_test/*/*/*.rnx
55+
!data/unit_test/**/*.*n
56+
!data/unit_test/**/*.*o
57+
!data/unit_test/**/*.*g
58+
!data/unit_test/**/*.rnx
6459

6560
########################################
6661
##### Common Python and IDE files ######

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Bradley Collicott
66
Shivam Soni
77
Sriramya Bhamidipati
88
Dalton Vega
9+
Daniel Neamati

gnss_lib_py/navdata/navdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ def _parse_key_idx(self, key_idx):
11301130

11311131
@staticmethod
11321132
def _row_map():
1133-
"""Map of column names from loaded to gnss_lib_py standard
1133+
"""Map of row names from loaded to gnss_lib_py standard
11341134
11351135
Initializes as an emptry dictionary, must be reimplemented for
11361136
custom parsers.

gnss_lib_py/parsers/android.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def filter_raw_measurements(self,t_rx_secs):
390390

391391
@staticmethod
392392
def _row_map():
393-
"""Map of column names from loaded to gnss_lib_py standard
393+
"""Map of row names from loaded to gnss_lib_py standard
394394
395395
Returns
396396
-------
@@ -490,7 +490,7 @@ def postprocess(self):
490490

491491
@staticmethod
492492
def _row_map():
493-
"""Map of column names from loaded to gnss_lib_py standard
493+
"""Map of row names from loaded to gnss_lib_py standard
494494
495495
Returns
496496
-------
@@ -589,7 +589,7 @@ def preprocess(self, input_path):
589589
if len(sensor_dfs) == 0:
590590
measurements = pd.DataFrame()
591591
elif len(sensor_dfs) > 1:
592-
measurements = pd.concat(sensor_dfs, axis=1)
592+
measurements = pd.concat(sensor_dfs, axis=0)
593593
else:
594594
measurements = sensor_dfs[0]
595595

@@ -602,7 +602,7 @@ def postprocess(self):
602602
self["gps_millis"] = unix_to_gps_millis(self["unix_millis"])
603603

604604
def _row_map(self):
605-
"""Map of column names from loaded to gnss_lib_py standard
605+
"""Map of row names from loaded to gnss_lib_py standard
606606
607607
Returns
608608
-------
@@ -639,7 +639,7 @@ def __init__(self, input_path):
639639
super().__init__(input_path, sensor_fields=sensor_fields)
640640

641641
def _row_map(self):
642-
"""Map of column names from loaded to gnss_lib_py standard
642+
"""Map of row names from loaded to gnss_lib_py standard
643643
644644
Returns
645645
-------
@@ -676,7 +676,7 @@ def __init__(self, input_path):
676676
super().__init__(input_path, sensor_fields=sensor_fields)
677677

678678
def _row_map(self):
679-
"""Map of column names from loaded to gnss_lib_py standard
679+
"""Map of row names from loaded to gnss_lib_py standard
680680
681681
Returns
682682
-------
@@ -713,7 +713,7 @@ def __init__(self, input_path):
713713
super().__init__(input_path, sensor_fields=sensor_fields)
714714

715715
def _row_map(self):
716-
"""Map of column names from loaded to gnss_lib_py standard
716+
"""Map of row names from loaded to gnss_lib_py standard
717717
718718
Returns
719719
-------

gnss_lib_py/parsers/smartloc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def postprocess(self):
7878

7979
@staticmethod
8080
def _row_map():
81-
"""Map of column names from loaded to gnss_lib_py standard
81+
"""Map of row names from loaded to gnss_lib_py standard
8282
8383
Returns
8484
-------

gnss_lib_py/utils/constants.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,23 @@
8383
TROPO_DELAY_C3 = 1.33e-4
8484
"""float : Third coefficient of simplified tropospheric delay model developed in [1]_."""
8585

86-
CONSTELLATION_CHARS = {'G':'gps',
87-
'R':'glonass',
88-
'S':'sbas',
89-
'C':'beidou',
90-
'E':'galileo',
91-
'J':'qzss',
92-
'I':'irnss',
86+
CONSTELLATION_CHARS = {'G' : 'gps',
87+
'R' : 'glonass',
88+
'S' : 'sbas',
89+
'C' : 'beidou',
90+
'E' : 'galileo',
91+
'J' : 'qzss',
92+
'I' : 'irnss',
9393
}
9494
"""dict : Satellite System identifier from Rinex specification p13 in [2]_."""
9595

96-
CONSTELLATION_ANDROID = {1 :'gps',
97-
3 :'glonass',
98-
2 :'sbas',
99-
5 :'beidou',
100-
6 :'galileo',
101-
4 :'qzss',
102-
7 :'irnss',
96+
CONSTELLATION_ANDROID = {1 : 'gps',
97+
3 : 'glonass',
98+
2 : 'sbas',
99+
5 : 'beidou',
100+
6 : 'galileo',
101+
4 : 'qzss',
102+
7 : 'irnss',
103103
0 : 'unknown',
104104
}
105105
"""dict : Satellite System identifier from GNSSStatus specification [3]_."""

gnss_lib_py/utils/ephemeris_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ def _valid_ephemeris_in_paths(date, possible_types, file_paths=None):
664664
if os.path.split(path)[1][3:] == str(gps_week).zfill(4) + str((timetuple.tm_wday+1)%7) + ".sp3":
665665
return True, path
666666

667-
# sp3 before Aug 13, 2017 and May 25, 2012 or later
667+
# sp3 between May 25, 2012 and Aug 12, 2017 inclusive
668668
elif possible_type == "sp3_short_CODE":
669669
gps_week, _ = tc.datetime_to_tow(datetime.combine(date,
670670
time(tzinfo=timezone.utc)))
@@ -1020,7 +1020,7 @@ def _get_rinex_extension(timestamp):
10201020
.. [15] https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/daily_30second_data.html
10211021
10221022
"""
1023-
# switched from .Z to .gz compression format on December 1st, 2020
1023+
10241024
if timestamp >= datetime(2020, 11, 30, tzinfo=timezone.utc).date():
10251025
extension = '.gz'
10261026
else:

gnss_lib_py/utils/sv_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ def _filter_ephemeris_measurements(measurements, constellations,
615615
"""
616616
measurements.in_rows(['gnss_id', 'sv_id', 'gps_millis'])
617617
# Check whether the rows are in the right format as needed.
618-
isinstance(measurements['gnss_id'].dtype, object)
619-
isinstance(measurements['sv_id'].dtype, int)
620-
isinstance(measurements['gps_millis'].dtype, np.int64)
618+
assert isinstance(measurements['gnss_id'].dtype, object)
619+
assert np.issubdtype(measurements['sv_id'].dtype, np.integer)
620+
assert np.issubdtype(measurements['gps_millis'].dtype, float)
621621
rx_const= np.unique(measurements['gnss_id'])
622622
# Check if required constellations are available, keep only required
623623
# constellations

notebooks/timing_comparisons.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"import numpy as np\n",
2121
"\n",
2222
"# load Android Google Challenge data\n",
23-
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/derek/android_raw/data/unit_test/google_decimeter_2021/Pixel4XL_derived.csv --quiet -O \"Pixel4XL_derived.csv\""
23+
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2021/Pixel4XL_derived.csv --quiet -O \"Pixel4XL_derived.csv\""
2424
]
2525
},
2626
{

notebooks/tutorials/algorithms/fde.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"import gnss_lib_py as glp\n",
2828
"\n",
2929
"# load Android Google Challenge data\n",
30-
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/derek/android_raw/data/unit_test/google_decimeter_2022/device_gnss.csv --quiet -O \"device_gnss.csv\"\n",
30+
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/google_decimeter_2022/device_gnss.csv --quiet -O \"device_gnss.csv\"\n",
3131
"navdata = glp.AndroidDerived2022(\"device_gnss.csv\")"
3232
]
3333
},

0 commit comments

Comments
 (0)