Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geometric altitude #13

Merged
merged 3 commits into from
Mar 22, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Update sbs1.py
  • Loading branch information
luke-iqt committed Mar 22, 2021
commit 4ee7dba74b49c7efbe172227b4d88a67b80c5c49
4 changes: 3 additions & 1 deletion adsb-mqtt/sbs1.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing import *
from datetime import datetime
import logging
import re
try:
import dateutil.parser
except ImportError as e:
Expand Down Expand Up @@ -124,7 +125,8 @@ def __parseInt(array: List, index: int):
"""Parse int at given index in array
Return int value or None if index is out of bounds or type casting failed"""
try:
return int(array[index])
numbers = re.findall('[0-9]+', array[index])[0]
return int(numbers)
except ValueError as e:
return None
except TypeError as e:
Expand Down