From cda1cb511bf2d88940e0dcea3d8e4600c0e98b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Sat, 28 Apr 2018 21:31:50 +0200 Subject: [PATCH] LT24, Skylines: -->
--- ogn/parser/aprs_comment/lt24_parser.py | 2 +- ogn/parser/aprs_comment/skylines_parser.py | 2 +- tests/parser/test_parse_lt24.py | 2 +- tests/parser/test_parse_skylines.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ogn/parser/aprs_comment/lt24_parser.py b/ogn/parser/aprs_comment/lt24_parser.py index 644f9bb..a99fe58 100644 --- a/ogn/parser/aprs_comment/lt24_parser.py +++ b/ogn/parser/aprs_comment/lt24_parser.py @@ -13,6 +13,6 @@ class LT24Parser(BaseParser): @staticmethod def parse_position(aprs_comment): ac_match = re.search(PATTERN_LT24_POSITION_COMMENT, aprs_comment) - return {'id': ac_match.group('id'), + return {'address': ac_match.group('id'), 'climb_rate': int(ac_match.group('climb_rate')) * fpm2ms if ac_match.group('climb_rate') else None, 'source': ac_match.group('source') if ac_match.group('source') else None} diff --git a/ogn/parser/aprs_comment/skylines_parser.py b/ogn/parser/aprs_comment/skylines_parser.py index c0920f6..dd3c506 100644 --- a/ogn/parser/aprs_comment/skylines_parser.py +++ b/ogn/parser/aprs_comment/skylines_parser.py @@ -13,5 +13,5 @@ class SkylinesParser(BaseParser): @staticmethod def parse_position(aprs_comment): ac_match = re.search(PATTERN_SKYLINES_POSITION_COMMENT, aprs_comment) - return {'id': ac_match.group('id'), + return {'address': ac_match.group('id'), 'climb_rate': int(ac_match.group('climb_rate')) * fpm2ms if ac_match.group('climb_rate') else None} diff --git a/tests/parser/test_parse_lt24.py b/tests/parser/test_parse_lt24.py index 056962a..2e9a67d 100644 --- a/tests/parser/test_parse_lt24.py +++ b/tests/parser/test_parse_lt24.py @@ -8,7 +8,7 @@ class TestStringMethods(unittest.TestCase): def test_position_comment(self): message = LT24Parser.parse_position("id25387 +000fpm GPS") - self.assertEqual(message['id'], "25387") + self.assertEqual(message['address'], "25387") self.assertAlmostEqual(message['climb_rate'] * ms2fpm, 0, 2) self.assertEqual(message['source'], 'GPS') diff --git a/tests/parser/test_parse_skylines.py b/tests/parser/test_parse_skylines.py index a0892a4..4ffa8c3 100644 --- a/tests/parser/test_parse_skylines.py +++ b/tests/parser/test_parse_skylines.py @@ -8,7 +8,7 @@ class TestStringMethods(unittest.TestCase): def test_position_comment(self): message = SkylinesParser.parse_position("id2816 -015fpm") - self.assertEqual(message['id'], "2816") + self.assertEqual(message['address'], "2816") self.assertAlmostEqual(message['climb_rate'] * ms2fpm, -15, 2)