UKHAS Wiki

UK High Altitude Society

User Tools

Site Tools


guides:ssdv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:ssdv [2012/07/15 20:52] – [Packet Format] fsphilguides:ssdv [2016/06/30 09:35] (current) – [Packet Format] fsphil
Line 9: Line 9:
 ^ Offset ^ Name ^ Size ^ Description ^ ^ Offset ^ Name ^ Size ^ Description ^
 |    0 | Sync Byte    |    1 | 0x55 - May be preceded by one or more sync bytes | |    0 | Sync Byte    |    1 | 0x55 - May be preceded by one or more sync bytes |
-|    1 | Packet Type  |    1 | 0x66 |+|    1 | Packet Type  |    1 | 0x66 - Normal mode (224 byte packet + 32 byte FEC) | 
 +|      |              |      | 0x67 - No-FEC mode (256 byte packet) |
 |    2 | Callsign        4 | Base-40 encoded callsign. Up to 6 digits | |    2 | Callsign        4 | Base-40 encoded callsign. Up to 6 digits |
 |    6 | Image ID        1 | Normally beginning at 0 and incremented by 1 for each new image | |    6 | Image ID        1 | Normally beginning at 0 and incremented by 1 for each new image |
Line 15: Line 16:
 |    9 | Width        |    1 | Width of the image in MCU blocks (pixels / 16) 0 = Invalid | |    9 | Width        |    1 | Width of the image in MCU blocks (pixels / 16) 0 = Invalid |
 |   10 | Height          1 | Height of the image in MCU blocks (pixels / 16) 0 = Invalid | |   10 | Height          1 | Height of the image in MCU blocks (pixels / 16) 0 = Invalid |
-|   11 | Flags        |    1 | 000000xx000000 = Reserved, xx = Subsampling Mode (0 = 2x2, 1 = 1x2, 2 = 2x1, 3 = 1x1) |+|   11 | Flags        |    1 | 00qqqexx00 = Reserved, qqq = JPEG quality level (0-7 XOR 4), e = EOI flag (1 = Last Packet), xx = Subsampling Mode (0 = 2x2, 1 = 1x2, 2 = 2x1, 3 = 1x1) |
 |   12 | MCU offset      1 | Offset in bytes to the beginning of the first MCU block in the payload, or 0xFF if none present | |   12 | MCU offset      1 | Offset in bytes to the beginning of the first MCU block in the payload, or 0xFF if none present |
 |   13 | MCU index    |    2 | The number of the MCU pointed to by the offset above (big endian), or 0xFFFF if none present | |   13 | MCU index    |    2 | The number of the MCU pointed to by the offset above (big endian), or 0xFFFF if none present |
-|   15 | Payload      |  207 | Payload data | +|   15 | Payload      |  205 / 237 | Payload data | 
-|  222 | Checksum        16-bit CRC, as used in the Xmodem protocol +|  220 / 252 | Checksum        32-bit CRC | 
-|  224 | FEC          |   32 | Reed-Solomon forward error correction data. This may be omitted for storage, or if the mode already provides FEC |+|  224 | FEC          |   32 | Reed-Solomon forward error correction data. Normal mode only (0x66) |
  
-Sizes and offsets are in bytes, with each packet being 256 bytes in total (or 224 bytes with no FEC data).+Sizes and offsets are in bytes, with each packet being 256 bytes in total.
 ==== Image Format ==== ==== Image Format ====
  
Line 31: Line 32:
   * The quantisation and huffman tables are fixed   * The quantisation and huffman tables are fixed
   * Baseline DCT only   * Baseline DCT only
-  * Total scan data must not exceed 13565952 bytes (~12.MB) in length (207 payload bytes per packet, 65536 packets max)+  * Total scan data must not exceed 13434880 bytes (~12.MB) in length (205 payload bytes per packet, 65536 packets max)
   * The first MCU of each packet is byte aligned   * The first MCU of each packet is byte aligned
   * The first DC values for each component in the first MCU of a packet are relative to 0   * The first DC values for each component in the first MCU of a packet are relative to 0
Line 50: Line 51:
   * An MCU block from the previous packet was incomplete. If the break occurs during the AC coefficients of a component, emit the EOB symbol to end them early. For each remaining component in the MCU emit an EOB symbol for both the DC and AC coefficients. This should end the incomplete MCU cleanly.   * An MCU block from the previous packet was incomplete. If the break occurs during the AC coefficients of a component, emit the EOB symbol to end them early. For each remaining component in the MCU emit an EOB symbol for both the DC and AC coefficients. This should end the incomplete MCU cleanly.
   * Subtract the MCU index value from the index of the last decoded MCU block to calculate how many blocks have been lost. For each lost block emit an empty MCU block.   * Subtract the MCU index value from the index of the last decoded MCU block to calculate how many blocks have been lost. For each lost block emit an empty MCU block.
-  * The current packet will likely begin with the end of one of the missing MCU blocks. This data cannot be used and needs to be discarded. The MCU offset field in the header indicates the number of bits to skip before resuming decoding.+  * The current packet will likely begin with the end of one of the missing MCU blocks. This data cannot be used and needs to be discarded. The MCU offset field in the header indicates the number of bytes to skip before resuming decoding.
  
 Once these conditions have been dealt with, normal decoding can resume. Once these conditions have been dealt with, normal decoding can resume.
Line 57: Line 58:
 The current implementation uses 8-bit RTTY at various baud rates. A more appropriate method should be used in future. The current implementation uses 8-bit RTTY at various baud rates. A more appropriate method should be used in future.
  
 +One idea is to pack the SSDV packets (sans-FEC) into an AX.25 frame for transmission over standard amateur radio packet networks. It may even be possible to do this in such a way that the format is compatible with the APRS network.
 ===== Software ===== ===== Software =====
  
Line 65: Line 67:
 http://ukhas.org.uk/projects:dl-fldigi http://ukhas.org.uk/projects:dl-fldigi
  
 +NOTE: Versions prior to DL3.1 contained an older version of the SSDV decoder which can not handle the finalised format described above.
 ==== ssdv ==== ==== ssdv ====
  
Line 81: Line 84:
 ===== Future ===== ===== Future =====
  
-  * Investigate the possibility of using JPEG2000 to reduce image size or improve image quality. 
   * Dynamic or adaptive huffman and quantisation tables.   * Dynamic or adaptive huffman and quantisation tables.
   * Try 1200 baud on a future flight. (Tim did this, and it mostly worked. Requires very careful tuning)   * Try 1200 baud on a future flight. (Tim did this, and it mostly worked. Requires very careful tuning)
   * BPSK modulation via fldigi.   * BPSK modulation via fldigi.
-  * Allow fldigi to send images too.+  * Add an interface to dl-fldigi for sending images.
  
 ===== History ===== ===== History =====
 +
 +  * 2015-10-19: An EOI flag was added to the header, using one of the previously reserved bits. This bit should be set to 0 except on the final packet for the current image.
 +
 +  * Some final changes made to the format 2012-03-04. Images produced with this version of the encoder will be compatible with all future decoders.
  
   * TU Delft launch in Holland transmitted images at 600 and 1200 baud. Two receiving stations where decoding data, and at 600 baud almost all data was received. Some of the 1200 baud images where also received, but with more gaps in the data.   * TU Delft launch in Holland transmitted images at 600 and 1200 baud. Two receiving stations where decoding data, and at 600 baud almost all data was received. Some of the 1200 baud images where also received, but with more gaps in the data.
guides/ssdv.1342385549.txt.gz · Last modified: 2012/07/15 20:52 by fsphil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki