Skip to content
Open
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
12 changes: 8 additions & 4 deletions andrnx/gnsslogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import math
import re
import sys
import warnings

# Flags to check wether the measurement is correct or not
# https://developer.android.com/reference/android/location/GnssMeasurement.html#getState()
Expand Down Expand Up @@ -103,8 +104,11 @@ def __init__(self, filename):

method_name = 'parse_{0}'.format(fields[1].lower())

# Call the method that processes the line
getattr(GnssLogHeader, method_name)(self, line)
try:
# Call the method that processes the line
getattr(GnssLogHeader, method_name)(self, line)
except AttributeError as e:
warnings.warn(f"Property {method_name} unknown to any method")


def get_fieldnames(self, line):
Expand Down Expand Up @@ -401,7 +405,7 @@ def get_glo_freq_chn_list(batches):
except ValueError as e:
sys.stderr.write("{0}\n".format(e))
continue

if sat not in freq_chn_list:
freq = get_frequency(measurement)
freq_chn = round((freq - GLO_L1_CENTER_FREQ)/GLO_L1_DFREQ)
Expand Down Expand Up @@ -914,7 +918,7 @@ def process(measurement, fullbiasnanos=None, integerize=False, pseudorange_bias=

def get_leap_seconds(current_epoch):
"""
Computes the number of leap seconds passed since the start of GPST
Computes the number of leap seconds passed since the start of GPST
:param current_epoch: current datetime value representing the measurements epoch
:return: number of leap seconds since GPST
"""
Expand Down