Skip to content
Snippets Groups Projects

Implement extracting RT130 GPS data

Merged Kien Le requested to merge feature-#19-get_gps_data_rt130 into master
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -416,13 +416,13 @@ class RT130(DataTypeModel):
# height value.
# Start pass the end of the string and look backward one index every
# iteration so we don't have to add 1 to the final index.
i = len(height_str)
current_char = height_str[i - 1]
current_idx = len(height_str)
current_char = height_str[current_idx - 1]
while current_char != '.' and not current_char.isnumeric():
i -= 1
current_char = height_str[i - 1]
height = float(height_str[:i])
height_unit = height_str[i:]
current_idx -= 1
current_char = height_str[current_idx - 1]
height = float(height_str[:current_idx])
height_unit = height_str[current_idx:]
return GPSPoint(gps_time, fix_type, num_sats_used, lat, long, height,
height_unit)
Loading