Exemple #1
0
def generated_packet() -> PositionPacket:
    p = PositionPacket()

    p.source = "XX1XX"
    p.destination = "APRS"
    p.path = "TCPIP"

    p.symbol_table = "/"
    p.symbol_id = "k"

    p.latitude = 51.5
    p.longitude = -100

    p.comment = "Test comment"

    return p
Exemple #2
0
def test_generate_compressed(latitude, longitude, timestamp, timestamp_type, messaging,
                             expected_output):
    p = PositionPacket()

    p.source = "XX1XX"
    p.destination = "APRS"
    p.path = "TCPIP"

    p.symbol_table = "/"
    p.symbol_id = "k"

    p.latitude = latitude
    p.longitude = longitude

    p.timestamp = timestamp
    p.timestamp_type = timestamp_type

    p.messaging = messaging
    p.comment = "Test comment"
    p.compressed = True

    output = p.generate()

    assert output == expected_output