Messages Format

From PaparazziUAV
Revision as of 17:51, 26 January 2017 by Podhrmic (talk | contribs) (added s-pprz message def)
Jump to navigation Jump to search

Introduction

Messages Format and how to use them

For the message definitions see http://docs.paparazziuav.org/latest/paparazzi_messages.html

Types

Paparazzi "PPRZ" standard message for direct serial connection

PPRZ-message: ABCxxxxxxxDE
    A PPRZ_STX (0x99)
    B LENGTH (A->E)
    C PPRZ_DATA
      0 SENDER_ID
      1 MSG_ID
      2 MSG_PAYLOAD
      . DATA (messages.xml)
    D PPRZ_CHECKSUM_A (sum[B->C])
    E PPRZ_CHECKSUM_B (sum[ck_a])

XBee API format

XBee-message: ABCDxxxxxxxE
    A XBEE_START (0x7E)
    B LENGTH_MSB (D->D)
    C LENGTH_LSB
    D XBEE_PAYLOAD
      0 XBEE_TX16 (0x01) / XBEE_RX16 (0x81)
      1 FRAME_ID (0)     / SRC_ID_MSB
      2 DEST_ID_MSB      / SRC_ID_LSB
      3 DEST_ID_LSB      / XBEE_RSSI
      4 TX16_OPTIONS (0) / RX16_OPTIONS
      5 PPRZ_DATA
        0 SENDER_ID
        1 MSG_ID
        2 MSG_PAYLOAD
        . DATA (messages.xml)
    E XBEE_CHECKSUM (sum[D->D])

   ID is AC_ID for aircraft, 0x100 for ground station

Telemetry storage format for data logger

TLM-message: ABCDEFGHxxxxxxxI
    A PPRZ_STX (0x99)
    B LENGTH (H->H)
    C SOURCE (0=uart0, 1=uart1, 2=i2c0, ...)
    D TIMESTAMP_LSB (100 microsecond raster)
    E TIMESTAMP
    F TIMESTAMP
    G TIMESTAMP_MSB
    H PPRZ_DATA
      0 SENDER_ID
      1 MSG_ID
      2 MSG_PAYLOAD
      . DATA (messages.xml)
    I CHECKSUM (sum[B->H])

Secure Paparazzi (S-PPRZ) for serial and transparent modem communication

PPRZ-message: ABCxxxxxxxFG
    A PPRZ_STX (0x99) (1 byte)
    B LENGTH (A->E) (1 byte)
      C COUNTER (4 bytes)
        // ciphertext-start
        //  PPRZ_DATA
        D 0 SENDER_ID ( 1byte)
        D 1 MSG_ID (1 byte)
        D 2 MSG_PAYLOAD 
        D . DATA (messages.xml)
        // ciptertext-end
      E tag (12 bytes)
    F PPRZ_CHECKSUM_A (sum[B->D]) (1 byte)
    G PPRZ_CHECKSUM_B (sum[ck_a]) (1 byte)