Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Shivam Soni
Sriramya Bhamidipati
Dalton Vega
Daniel Neamati
Sandro Klarer
9 changes: 4 additions & 5 deletions gnss_lib_py/parsers/nmea.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, input_path, msg_types=None,
if msg_types is None:
# Use default message types
msg_types = ['GGA', 'RMC']
pd_df = pd.DataFrame()
temporary_dictionary_list_df = []
field_dict = {}
prev_timestamp = None

Expand Down Expand Up @@ -101,8 +101,7 @@ def __init__(self, input_path, msg_types=None,
delta_t = datetime.datetime.combine(datestamp(date), timestamp(time))
field_dict['gps_millis'] = datetime_to_gps_millis(delta_t)

new_row = pd.DataFrame([field_dict])
pd_df = pd.concat([pd_df, new_row])
temporary_dictionary_list_df.append(field_dict)
field_dict = {}
prev_timestamp = msg.timestamp
if "sentence_type" in msg.__dir__() and msg.sentence_type in msg_types:
Expand Down Expand Up @@ -134,8 +133,8 @@ def __init__(self, input_path, msg_types=None,
date = field_dict.pop('datestamp')
delta_t = datetime.datetime.combine(datestamp(date), timestamp(time))
field_dict['gps_millis'] = datetime_to_gps_millis(delta_t)
new_row = pd.DataFrame([field_dict])
pd_df = pd.concat([pd_df, new_row])
temporary_dictionary_list_df.append(field_dict)
pd_df = pd.DataFrame.from_dict(temporary_dictionary_list_df)
# As per `gnss_lib_py` standards, convert the heading from degrees
# to radians
pd_df['true_course_rad'] = (np.pi/180.)*pd_df['true_course']\
Expand Down