kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
381 wiersze
27 KiB
Plaintext
381 wiersze
27 KiB
Plaintext
RS41-SG (TU)
|
|
RS41-SGP (PTU)
|
|
(ohne/mit Preambel)
|
|
|
|
|
|
Modulation: GFSK, 4800 baud
|
|
|
|
Pro Sekunde 1 Frame
|
|
4800 bit/s, jedoch nur ca 534ms pro sek.
|
|
little endian, 8bit->1byte
|
|
FrameLen (Header+Daten): 320 byte -> 2560/4800=0.5333
|
|
|
|
64 byte xor-Maske (data whitening/scrambling)
|
|
|
|
|
|
0x00..0x07, 8byte: Header
|
|
10 B6 CA 11 22 96 12 F8
|
|
|
|
0x3B..0x3C, 2byte: Frame Nummer
|
|
0x3D..0x44, 8byte: Sonde ID
|
|
Mask[0x3B..0x44]=0xAEBF7B4CC196833E51B1
|
|
|
|
0x52, 1byte: Zaehler 0x00..0x32 (51 Frames)
|
|
0x53..0x62, 16byte: Calibration/Config/Info
|
|
Mask[0x52..0x62]=0xC2EA795D6DA15469470CDCE85CF1F77682
|
|
|
|
GPS-Week/-TOW
|
|
0x95..0x96, 2byte: Full GPS week (seit So 6.1.1980)
|
|
0x97..0x9A, 4byte: TOW in Millisekunden seit Sonntag 00 UTC (+ 16 Schaltsekunden) (+17s ab 1.7.2015)
|
|
Mask[0x95..0x9A]=0x5D6DA1546947
|
|
|
|
Position: ECEF-Koordinaten
|
|
0x114..0x117, 4byte: X-Koord.
|
|
0x118..0x11B, 4byte: Y-Koord.
|
|
0x11C..0x11F, 4byte: Z-Koord.
|
|
Mask[0x114..0x11F]=0x795D6DA15469470CDCE85CF1
|
|
0x120..0x125, 6byte: ECEF-Velocities/cm (3x signed 16bit-int)
|
|
|
|
Zur Umrechnung ecef2elli() kommt noch eine Differenz Geoid-Ellipsoid hinzu.
|
|
GPS Chip: u-blox UBX-G6010-ST
|
|
|
|
|
|
0x52, 0x53..0x62 16byte:
|
|
|
|
frame 0x00: e8 08 80 0c 03 00 00 0e 00 00 00 00 00 4b 34 37 : freq 400500 kHz (Payerne)
|
|
a1 f1 00 19 03 00 00 0e 00 00 00 00 00 4b 34 36 : freq 401000 kHz (Payerne)
|
|
b0 78 00 32 03 00 00 0e 00 00 00 00 00 4b 31 38 : freq 402000 kHz (Zagreb)
|
|
63 92 00 4b 03 00 00 0e 00 00 00 00 00 4b 33 37 : freq 403000 kHz (Zagreb)
|
|
ae 18 00 64 03 00 00 0f 00 00 00 00 00 4c 31 31 : freq 404000 kHz
|
|
d5 80 80 66 03 00 00 0e 00 00 00 00 00 4b 34 36 : freq 404100 kHz
|
|
dc e3 80 75 03 00 00 0e 00 00 00 00 00 4a 34 30 : freq 404700 kHz (Budapest)
|
|
c3 b0 00 0f 03 00 00 0e 00 00 00 00 00 4b 32 34 : freq 400600 kHz (Poprad)
|
|
41 ab 00 91 03 00 00 0f 00 00 00 00 00 4c 31 30 : freq 405800 kHz (Lindenberg)
|
|
^^0x56: k1
|
|
^^0x55: k0 freq = 400000 + (k0/2^8 + k1) * 2^2 * 10
|
|
0x80 = 00000001 -> 1/2^1
|
|
0x40 = 00000010 -> 1/2^2
|
|
0xC0 = 00000011 -> 3/4
|
|
Bsp.: k0,k1: 0x80 0x75 -> (117+1/2)*40 = 4700 -> 404700
|
|
|
|
frame 0x02: 06 0a 87 32 00 00 00 ff ff 00 00 00/01 00 ..
|
|
^^0x5E: burst kill?
|
|
0x5A/5B: kill timmer?
|
|
|
|
Ende-0x00/Anfang-0x01: Sonde-Id
|
|
0x00: 3e 09 00 32 03 00 00 0e 00 00 00 00 00 4b 31 39 : fq 402000
|
|
0x01: 33 30 32 39 33 25 4e 00 00 2c 01 12 05 b4 3c a4
|
|
-> 4b 31 39 33 30 32 39 33 : K1930293
|
|
0x00: f7 d7 00 32 03 00 00 0e 00 00 00 00 00 4b 31 39 : fq 402000
|
|
0x01: 33 30 32 36 30 25 4e 00 00 2c 01 12 05 b4 3c a4
|
|
-> 4b 31 39 33 30 32 36 30 : K1930260
|
|
0x00: 41 ab 00 91 03 00 00 0f 00 00 00 00 00 4c 31 30 : fq 405800
|
|
0x01: 34 30 30 31 30 f2 4e 00 00 58 02 12 05 b4 3c a4
|
|
-> 4c 31 30 34 30 30 31 30 : L1040010
|
|
|
|
0x01: nach ID, 2 byte: fw-version? 0x4ef2
|
|
M3830211, 0x4ef5: BK irrelevant?
|
|
default BK-timer 8.5hrs=510min? (Vaisala Statement 2016-08-22)
|
|
|
|
K1930293
|
|
[ 5866] 0x00: 3e 09 00 32 03 00 00 0e 00 00 00 00 00 4b 31 39 [OK] : fq 402000
|
|
[ 5867] 0x01: 33 30 32 39 33 25 4e 00 00 2c 01 12 05 b4 3c a4 [OK] : fw 0x4e25
|
|
[ 5868] 0x02: 06 0a 87 32 00 00 00 ff ff 00 00 00 00 03 d7 22 [OK] : BK 00
|
|
|
|
K1830006
|
|
[ 4387] 0x00: 28 8b 00 32 03 00 00 0e 00 00 00 00 00 4b 31 38 [OK] : fq 402000
|
|
[ 4388] 0x01: 33 30 30 30 36 25 4e 00 00 2c 01 12 05 b4 3c a4 [OK] : fw 0x4e25
|
|
[ 4389] 0x02: 06 0a 87 32 00 00 00 ff ff 00 00 01 00 03 ac 22 [OK] : BK 01
|
|
|
|
L2830508 (mit preamble)
|
|
[ 6835] 0x00: aa 9b 00 32 03 00 00 0e 00 00 00 00 00 4c 32 38 [OK] : fq 402000
|
|
[ 6836] 0x01: 33 30 35 30 38 f2 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef2
|
|
[ 6837] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 01 00 03 1d 23 [OK] : BK 01
|
|
|
|
L1250184 (ohne preamble)
|
|
[ 5764] 0x00: 0f 62 00 32 03 00 00 0e 00 00 00 00 00 4c 31 32 [OK] : fq 402000
|
|
[ 5765] 0x01: 35 30 31 38 34 25 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4e25
|
|
[ 5766] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 01 00 03 3c 22 [OK] : BK 01
|
|
|
|
L1810272
|
|
[ 6376] 0x00: 78 d6 00 32 03 00 00 0e 00 00 00 00 00 4c 31 38 [OK] : fq 402000
|
|
[ 6377] 0x01: 31 30 32 37 32 25 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4e25
|
|
[ 6378] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 00 00 03 c8 22 [OK] : BK 00
|
|
|
|
L2840452
|
|
[ 6274] 0x00: 2e b1 00 32 03 00 00 0e 00 00 00 00 00 4c 32 38 [OK] : fq 402000
|
|
[ 6275] 0x01: 34 30 34 35 32 f3 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef3
|
|
[ 6276] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 00 00 03 1c 23 [OK] : BK 00
|
|
|
|
L2840165
|
|
[ 6937] 0x00: f8 da 00 32 03 00 00 0e 00 00 00 00 00 4c 32 38 [OK] : fq 402000
|
|
[ 6938] 0x01: 34 30 31 36 35 f2 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef2
|
|
[ 6939] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 00 00 03 1a 23 [OK] : BK 00
|
|
|
|
M3550630
|
|
[ 3059] 0x31: 6c 9c 07 b1 00 3c 00 00 00 00 00 00 00 00 00 00 [OK]
|
|
[ 3060] 0x32: ff ff b5 f1 5c 02 07 00 fc fe ec 01 1e 19 00 00 [OK]
|
|
[ 3061] 0x00: 14 ff 00 32 03 00 00 0e 00 00 00 00 00 4d 33 35 [OK] : fq 402000
|
|
[ 3062] 0x01: 35 30 36 33 30 f3 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef3
|
|
[ 3063] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 00 00 03 bd 22 [OK] : BK 00
|
|
|
|
M2830093
|
|
[ 7445] 0x31: 6c 9c 07 b1 00 3c 00 00 00 00 00 00 00 00 00 00 [OK]
|
|
[ 7446] 0x32: ff ff ef f2 5b 02 07 00 f5 f4 a6 01 1f e5 00 00 [OK]
|
|
[ 7447] 0x00: d0 9f 00 73 03 00 00 0f 00 00 00 00 00 4d 32 38 [OK] : fq 404600
|
|
[ 7448] 0x01: 33 30 30 39 33 f3 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef3
|
|
[ 7449] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 01 00 03 14 23 [OK] : BK 01
|
|
|
|
M3830211 (sendet auch beim Abstieg)
|
|
[ 7751] 0x31: 6c 9c 07 b1 00 3c 88 77 00 00 00 00 00 00 00 00 [OK] ? 0x7788sec = 510min default BK timer?
|
|
[ 7752] 0x32: ff ff 6c ef 5a 02 07 00 fc fc 9e 01 0f 1e 00 00 [OK]
|
|
[ 7753] 0x00: dc 0f 00 64 03 00 00 0f 00 00 00 00 00 4d 33 38 [OK] : fq 404000
|
|
[ 7754] 0x01: 33 30 32 31 31 f5 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef5
|
|
[ 7755] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 01 00 03 0b 23 [OK] : BK 01
|
|
|
|
M4620137
|
|
[ 5813] 0x31: 6c 9c 07 b1 00 3c 88 77 00 00 00 00 00 00 00 00 [OK]
|
|
[ 5814] 0x32: ff ff 2f e8 5c 02 07 00 ff 03 c3 01 0e 22 00 00 [OK]
|
|
[ 5815] 0x00: 02 32 80 61 03 00 00 0f 00 00 00 00 00 4d 34 36 [OK] : fq 403900
|
|
[ 5816] 0x01: 32 30 31 33 37 f5 4e 00 00 58 02 12 05 b4 3c a4 [OK] : fw 0x4ef5
|
|
[ 5817] 0x02: 06 14 87 32 00 00 00 ff ff 00 00 00 00 03 19 23 [OK] : BK 00
|
|
|
|
frame 0x21: ff ff ff c6 ff ff ff c6 52 53 34 31 2d 53 47 00 : RS41-SG
|
|
ee 19 79 44 9a 39 79 44 52 53 34 31 2d 53 47 50 : RS41-SGP
|
|
|
|
|
|
[RXM-RAW 0x02 0x10]
|
|
0x093: 7C1E (L=0x1E=30 byte)
|
|
0x095: 2 byte: GPS week
|
|
0x097: 4 byte: iTOW
|
|
0x09B: 12x2 byte: Space Vehicle Number (1 byte) ,
|
|
Signal Quality,Strength (1 byte)
|
|
(0x0B3: 2 byte CRC32)
|
|
|
|
0x0B5: 7D59 (L=0x59=89 byte)
|
|
0x0B7: 4 byte: minPRmes = min{prMes[]}
|
|
0x0BB: 1 byte
|
|
0x0BC: 12x(4+3) byte: 4 byte PR: prMes = PR/100-minPRmes ,
|
|
3 byte DP: doMes = -DP/100*L1/c (DP 24bit signed)
|
|
(0x110: 2 byte CRC32)
|
|
|
|
|
|
[NAV-SOL 0x01 0x06]
|
|
0x112: 7B15 (L=0x15=21 byte)
|
|
0x114: 3x4 byte: ECEF-POS
|
|
0x120: 3x2 byte: ECEF-VEL
|
|
0x126: 1 byte: Number of SVs used in Nav Solution
|
|
0x127: 1 byte: sAcc/10 (in NAV-SOL 4 byte)
|
|
0x128: 1 byte: pDOP/10 (in NAV-SOL 2 byte)
|
|
(0x129: 2 byte CRC32)
|
|
|
|
|
|
|
|
Data whitening/scrambling:
|
|
Block shiften und gegen sich selbst XOR-en.
|
|
|
|
Wenn man die richtige Blocklaenge gefunden hat, erhaelt man enc_i ^ enc_j = dec_i ^ dec_j.
|
|
Wenn in einem Klartext dec_j viele Nullen stehen, erhaelt man im anderen Block den Klartext.
|
|
Somit erhaelt man auch die XOR-Maske fuer diesen Teil.
|
|
|
|
Frame 320=5x64 byte:
|
|
10B6CA11229612F804A1EAAC92622978C044887A4ACE6BA0A35822FC5F447F349D9BA3603B69B89197656C6875B40A2624E5AE26788CCDFC7717131EA9307DF8
|
|
A5B30C688252089833055902F944C6262652EE0F476CF4BBEB7B9DD6E25ED8993611D7626BE38846D57E1965F74ADD635DB1BC5410AD393D708208AC957D4E9A
|
|
65813E51B14908983205590EF944C62621E7179667556AC1FAB340130BF5A9E8017C0C71D39B55206864E7655AEF2E9ED043B4358BD7AD58595A3A51E27522CE
|
|
A36BC0BFBBF10BAC17FA790EF9442483DEFD0EB867CA545E45B0511F758E5CCC7C518E3DF3665C76A77A092FF5388691C65E60B60B5A9C34786E3BAEBF7B4CC1
|
|
96833E51B14908983205590EF944C6266D2FB9FF2F84E9B8F032260B90B403EAC7756786F09BAA2E82894215E4102E61D0BCB4B606AAF423786E3BAEBF7BA006
|
|
|
|
block1 ^ block4:
|
|
>>> hex(0x10B6CA11229612F804A1EAAC92622978C044887A4ACE6BA0A35822FC5F447F349D9BA3603B69B89197656C6875B40A2624E5AE26788CCDFC7717131EA9307DF8
|
|
^0xA36BC0BFBBF10BAC17FA790EF9442483DEFD0EB867CA545E45B0511F758E5CCC7C518E3DF3665C76A77A092FF5388691C65E60B60B5A9C34786E3BAEBF7B4CC1)
|
|
'0xb3dd0aae99671954135b93a26b260dfb1eb986c22d043ffee6e873e32aca23f8e1ca2d5dc80fe4e7301f6547808c8cb7e2bbce9073d651c80f7928b0164b3139L'
|
|
^^^^^^^^^^
|
|
block2 ^ block5:
|
|
>>> hex(0xA5B30C688252089833055902F944C6262652EE0F476CF4BBEB7B9DD6E25ED8993611D7626BE38846D57E1965F74ADD635DB1BC5410AD393D708208AC957D4E9A
|
|
^0x96833E51B14908983205590EF944C6266D2FB9FF2F84E9B8F032260B90B403EAC7756786F09BAA2E82894215E4102E61D0BCB4B606AAF423786E3BAEBF7BA006)
|
|
'0x33303239331b00000100000c000000004b7d57f068e81d031b49bbdd72eadb73f164b0e49b78226857f75b70135af3028d0d08e21607cd1e08ec33022a06ee9cL'
|
|
^^^^^^^^^^
|
|
|
|
Wenn im Klartext des einen Blocks viele Nullen stehen, erhaelt man durch XOR-en den Klartext des anderen:
|
|
...b0164b3139 3330323933...
|
|
FrameNr , SondeId : 0x16b0 , 4b31393330323933 (K1930293)
|
|
|
|
[ 5808] (K1930293) Mo 2014-07-07 12:36:12 (W 1800) lat: 46.04934 lon: 16.13034 h: 32347.21
|
|
|
|
Der XOR-Text mit den Nullen ist dann die scrambling-Maske:
|
|
Maske[0xFB..0x104]=0xAEBF7B4CC196833E51B1=Mask[0x3B..0x44]
|
|
|
|
|
|
Maske
|
|
LFSR: ab i=8 (mod 64):
|
|
m[16+i] = m[i] ^ m[i+2] ^ m[i+4] ^ m[i+6]
|
|
________________3205590EF944C6262160C2EA795D6DA15469470CDCE85CF1
|
|
F776827F0799A22C937C3063F5102E61D0BCB4B606AAF423786E3BAEBF7B4CC1
|
|
96833E51B1490898
|
|
|
|
|
|
|
|
|
|
Error Correction Code
|
|
CRC16 / Reed-Solomon RS(255,231)
|
|
(aehnlich wie RS92)
|
|
|
|
|
|
HEADER 8
|
|
RS-PARITY 48 = 2*24
|
|
DATA 264-462 (max 2*231=462)
|
|
|
|
DATA hat zu Beginn z.B. 0F oder F0,
|
|
dann Bloecke der Form IDLEN|DAT|CRC16:
|
|
IDLEN 2 (ID+LEN)
|
|
DAT LEN
|
|
CRC16 2 (poly=0x(1)1021, init=0xFFFF)
|
|
|
|
|
|
Reed-Solomon:
|
|
RS(255,231)
|
|
GF(2^8)=GF(2)[x]/(f): f=x^8+x^4+x^3+x^2+1 = 0x11D
|
|
Generator von GF(2^8)*: alpha=0x02 (primitive Einheitswurzel)
|
|
Generatorpolynom fuer RS-Code:
|
|
(X-alpha^0)...(X-alpha^23) =
|
|
X^24 + 0x7A X^23 + 0x76 X^22 + 0xA9 X^21 + 0x46 X^20 + 0xB2 X^19 + 0xED X^18 + 0xD8 X^17 + 0x66 X^16 + 0x73 X^15 + 0x96 X^14 + 0xe5 X^13 + 0x49 X^12
|
|
+ 0x82 X^11 + 0x48 X^10 + 0x3D X^9 + 0x2B X^8 + 0xCE X^7 + 0x01 X^6 + 0xED X^5 + 0xF7 X^4 + 0x7F X^3 + 0xD9 X^2 + 0x90 X + 0x75
|
|
|
|
"interleaved" RS(255,231)
|
|
255-231=24 parity bytes, kann 12 Bytes je Codewort reparieren.
|
|
Die 2 Codewoerter setzen sich zusammen aus den DATA-Bytes an den geraden bzw. ungeraden Positionen und ersten bzw. zweiten RS-PARITY-Teil.
|
|
|
|
|
|
2 Beispiele, Frame1 (320 byte) und Frame2 (518 byte):
|
|
1) 8635f44093df1a602c87e0fa0521e8943d9cef4c7a67393f6d39fb546461f2111b6447ab79a746c80350cda5344157f8c0c12234f46902220f792816174b313933303239331a00000300000a00002f0007322ce53e31991abf12dada3eb68468c16755d51c7a2a15310216060245f302000d08a31607821e08bb210219060243f302000000000000000000000000000000220d7c1e0807d03cdc071fd81ddb19d70a8d0eb602b60cb518d40692ff00ff00ff001c277d59b8d83301ff0f881f0f38f4fe18b283038735ff000000003eb8ff4947201e6e3aff55415f13fc6e005440440cf100009e9f7406f85800832b631719d70010bebc172a8b00000000000000000000000000000000000000000000a48b7b15366181193ef05d07e1245b1be0f721f801f60804107b0b76110000000000000000000000000000000000ecc7
|
|
2) 8635f44093df1a608f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa09b711c5c39977ed8fbf22377b3e5e1cee59fc644b19f0792896134b343032303234341c00000100000c00007a0007320f00000000008920bac20000000000000092697a2ae9030226fd015de502363208522a075f330874040228fd015de502000000000000000000000000000000e7917c1e4d0750f1921703fb01f8068d1fd811f70bd604d50afa17f913d90c8b20f9a16a7d5921103501ff440000006c1f00cd977e059ab7009566fd191d1affd82fbf143fb8ff5277180991faff9ca1d10d441b01927bf211dd190190999f0553a1ff9120b10c3847ff06eeee0e571301a2c0891c000000cddd1a0882d10011167b153c154217941930005fc50b1eb9fde107d2050902115a537ea6ed343030313030303120313037393020202033312e37203036373520303334392030373030203132383636203630303520313339333120363031342031343038322035383830203738313420383032372031303039203930392039353631353632203935303839323220343238383339313633382032393335383636203539343238203335323439203636393920333738332034363837203637303120363930312037393939049a762d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f35a
|
|
|
|
|
|
CRC:
|
|
|
|
1)
|
|
8635f44093df1a60 (HDR)
|
|
2c87e0fa0521e8943d9cef4c7a67393f6d39fb546461f2111b6447ab79a746c80350cda5344157f8c0c12234f4690222 (2xRS)
|
|
0f
|
|
7928 (L=0x28=40)
|
|
16174b313933303239331a00000300000a00002f0007322ce53e31991abf12dada3eb68468c16755 d51c (CRC-OK)
|
|
7a2a (L=0x2a=42)
|
|
15310216060245f302000d08a31607821e08bb210219060243f302000000000000000000000000000000 220d (CRC-OK)
|
|
7c1e (L=0x1e=30)
|
|
0807d03cdc071fd81ddb19d70a8d0eb602b60cb518d40692ff00ff00ff00 1c27 (CRC-OK)
|
|
7d59 (L=0x59=89)
|
|
b8d83301ff0f881f0f38f4fe18b283038735ff000000003eb8ff4947201e6e3aff55415f13fc6e005440440cf100009e9f7406f85800832b631719d70010bebc172a8b00000000000000000000000000000000000000000000 a48b (CRC-OK)
|
|
7b15 (L=0x15=21)
|
|
366181193ef05d07e1245b1be0f721f801f6080410 7b0b (CRC-OK)
|
|
7611 (L=0x11=17)
|
|
0000000000000000000000000000000000 ecc7 (CRC-OK)
|
|
|
|
2)
|
|
8635f44093df1a60 (HDR)
|
|
8f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa09b711c5c39977ed8fbf22377b3e5e1cee59fc644b19 (2xRS) [2 Fehler, korr: 8f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa49b711c5c39977ed8fbf22377b3e5e1cee59bc644b19 ]
|
|
f0
|
|
7928 (L=0x28=40)
|
|
96134b343032303234341c00000100000c00007a0007320f00000000008920bac200000000000000 9269 (CRC-OK)
|
|
7a2a (L=0x2a=42)
|
|
e9030226fd015de502363208522a075f330874040228fd015de502000000000000000000000000000000 e791 (CRC-OK)
|
|
7c1e (L=0x1e=30)
|
|
4d0750f1921703fb01f8068d1fd811f70bd604d50afa17f913d90c8b20f9 a16a (CRC-OK)
|
|
7d59 (L=0x59=89)
|
|
21103501ff440000006c1f00cd977e059ab7009566fd191d1affd82fbf143fb8ff5277180991faff9ca1d10d441b01927bf211dd190190999f0553a1ff9120b10c3847ff06eeee0e571301a2c0891c000000cddd1a0882d100 1116 (CRC-OK)
|
|
7b15 (L=0x15=21)
|
|
3c154217941930005fc50b1eb9fde107d205090211 5a53 (CRC-OK)
|
|
7ea6 (L=0xa6=166)
|
|
ed343030313030303120313037393020202033312e37203036373520303334392030373030203132383636203630303520313339333120363031342031343038322035383830203738313420383032372031303039203930392039353631353632203935303839323220343238383339313633382032393335383636203539343238203335323439203636393920333738332034363837203637303120363930312037393939 049a (CRC-OK)
|
|
762d (L=0x2d=45)
|
|
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 f35a (CRC-OK)
|
|
|
|
|
|
Reed-Solomon:
|
|
Fehler feststellen ist einfach, reparieren ist aufwendig.
|
|
Decoder:
|
|
http://www.ka9q.net/code/fec/
|
|
https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders
|
|
|
|
Codewort generieren bzw. parity bytes checken z.B. durch Polynomdivision (CRC).
|
|
|
|
>>> gen=rs_generator_poly(24)
|
|
>>> print ' '.join([hex(x) for x in gen])
|
|
0x1 0x7a 0x76 0xa9 0x46 0xb2 0xed 0xd8 0x66 0x73 0x96 0xe5 0x49 0x82 0x48 0x3d 0x2b 0xce 0x1 0xed 0xf7 0x7f 0xd9 0x90 0x75
|
|
|
|
1)
|
|
8635f44093df1a60
|
|
2c87e0fa0521e8943d9cef4c7a67393f6d39fb546461f2111b6447ab79a746c80350cda5344157f8c0c12234f4690222
|
|
0f792816174b313933303239331a00000300000a00002f0007322ce53e31991abf12dada3eb68468c16755d51c7a2a15310216060245f302000d08a31607821e08bb210219060243f302000000000000000000000000000000220d7c1e0807d03cdc071fd81ddb19d70a8d0eb602b60cb518d40692ff00ff00ff001c277d59b8d83301ff0f881f0f38f4fe18b283038735ff000000003eb8ff4947201e6e3aff55415f13fc6e005440440cf100009e9f7406f85800832b631719d70010bebc172a8b00000000000000000000000000000000000000000000a48b7b15366181193ef05d07e1245b1be0f721f801f60804107b0b76110000000000000000000000000000000000ecc7
|
|
>>> str='0f792816174b313933303239331a00000300000a00002f0007322ce53e31991abf12dada3eb68468c16755d51c7a2a15310216060245f302000d08a31607821e08bb210219060243f302000000000000000000000000000000220d7c1e0807d03cdc071fd81ddb19d70a8d0eb602b60cb518d40692ff00ff00ff001c277d59b8d83301ff0f881f0f38f4fe18b283038735ff000000003eb8ff4947201e6e3aff55415f13fc6e005440440cf100009e9f7406f85800832b631719d70010bebc172a8b00000000000000000000000000000000000000000000a48b7b15366181193ef05d07e1245b1be0f721f801f60804107b0b76110000000000000000000000000000000000ecc7'.decode('hex')
|
|
>>> len(str)
|
|
264
|
|
>>> msg1=str[262::-2]
|
|
>>> msg2=str[263::-2]
|
|
>>> code1=rs_encode_msg(msg1, 24)
|
|
>>> code2=rs_encode_msg(msg2, 24)
|
|
>>> print ''.join('%02x'%x for x in code1[-24:])
|
|
11f2616454fb396d3f39677a4cef9c3d94e82105fae0872c
|
|
>>> print ''.join('%02x'%x for x in code2[-24:])
|
|
220269f43422c1c0f8574134a5cd5003c846a779ab47641b
|
|
|
|
2)
|
|
8635f44093df1a60
|
|
8f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa09b711c5c39977ed8fbf22377b3e5e1cee59fc644b19
|
|
f0792896134b343032303234341c00000100000c00007a0007320f00000000008920bac20000000000000092697a2ae9030226fd015de502363208522a075f330874040228fd015de502000000000000000000000000000000e7917c1e4d0750f1921703fb01f8068d1fd811f70bd604d50afa17f913d90c8b20f9a16a7d5921103501ff440000006c1f00cd977e059ab7009566fd191d1affd82fbf143fb8ff5277180991faff9ca1d10d441b01927bf211dd190190999f0553a1ff9120b10c3847ff06eeee0e571301a2c0891c000000cddd1a0882d10011167b153c154217941930005fc50b1eb9fde107d2050902115a537ea6ed343030313030303120313037393020202033312e37203036373520303334392030373030203132383636203630303520313339333120363031342031343038322035383830203738313420383032372031303039203930392039353631353632203935303839323220343238383339313633382032393335383636203539343238203335323439203636393920333738332034363837203637303120363930312037393939049a762d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f35a
|
|
>>> str='f0792896134b343032303234341c00000100000c00007a0007320f00000000008920bac20000000000000092697a2ae9030226fd015de502363208522a075f330874040228fd015de502000000000000000000000000000000e7917c1e4d0750f1921703fb01f8068d1fd811f70bd604d50afa17f913d90c8b20f9a16a7d5921103501ff440000006c1f00cd977e059ab7009566fd191d1affd82fbf143fb8ff5277180991faff9ca1d10d441b01927bf211dd190190999f0553a1ff9120b10c3847ff06eeee0e571301a2c0891c000000cddd1a0882d10011167b153c154217941930005fc50b1eb9fde107d2050902115a537ea6ed343030313030303120313037393020202033312e37203036373520303334392030373030203132383636203630303520313339333120363031342031343038322035383830203738313420383032372031303039203930392039353631353632203935303839323220343238383339313633382032393335383636203539343238203335323439203636393920333738332034363837203637303120363930312037393939049a762d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f35a'.decode('hex')
|
|
>>> len(str)
|
|
462
|
|
>>> msg1=str[460::-2]
|
|
>>> msg2=str[461::-2]
|
|
>>> code1=rs_encode_msg(msg1, 24)
|
|
>>> code2=rs_encode_msg(msg2, 24)
|
|
>>> print ''.join('%02x'%x for x in code1)
|
|
f3000000000000000000000000000000000000000000002d9a3939203036313720383433372039363932333834353638333238363938322032383520363135203020303137302031373038203834203136313931353020363220303039332037303731202039302030303034a6531109d2e1b90b5f3094423c7b11d108dd000089a2130eeeff38b191a1059901ddf2921b0da1ff911852b8142fff1dfd95b70597006c00440110596af98bd9f9fad5d6f7d88df8fb17f1071e910000000000000000e5012804085f2a0836e50126032a6900000000ba8900000f077a00000100343232341328f0f7372fcbc581987e308817c31384d68ae2c98ebf25109b8f
|
|
>>> print ''.join('%02x'%x for x in code2)
|
|
5a000000000000000000000000000000000000000000000076043937313920303637362038333936203435203239203635392033313338343239303932353639393939302032383438203835323031343020333320303636383130372034303536202e332030373131303130ed7e5a020507fd1ec500191715151600821acd001cc00157ee06470c20ff539f9019117b0144d19cfa0977ff3fbfd81a1966009a7ecd1f0000ff35217da1200c13170a040b111f06010392504d7ce700000000000000025dfd027433075232025dfd02e97a92000000c2200000003200000c00001c3430304b9679194b64bc59ee1c5e3e7b3722bf8fed7799c3c511b749fa54
|
|
>>> print ''.join('%02x'%x for x in code1[-24:])
|
|
f7372fcbc581987e308817c31384d68ae2c98ebf25109b8f
|
|
>>> print ''.join('%02x'%x for x in code2[-24:])
|
|
194b64bc59ee1c5e3e7b3722bf8fed7799c3c511b749fa54
|
|
|
|
>>> par='8f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa09b711c5c39977ed8fbf22377b3e5e1cee59fc644b19'.decode('hex')
|
|
>>> parrev=par[::-1]
|
|
>>> parrev.encode('hex')
|
|
'194b64fc59ee1c5e3e7b3722bf8fed7799c3c511b709fa54f7372fcbc581987e308817c31384d68ae2c98ebf25109b8f'
|
|
|
|
194b64fc59ee1c5e3e7b3722bf8fed7799c3c511b709fa54 f7372fcbc581987e308817c31384d68ae2c98ebf25109b8f
|
|
194b64bc59ee1c5e3e7b3722bf8fed7799c3c511b749fa54 f7372fcbc581987e308817c31384d68ae2c98ebf25109b8f
|
|
^ ^
|
|
(wenn Fehler nur in den Paritaetsbytes auftreten, sind sie leicht zu finden)
|
|
|
|
|
|
[RS-DECODER]
|
|
|
|
./ecc-rs_vaisala 8635f44093df1a608f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa09b711c5c39977ed8fbf22377b3e5e1cee59fc644b19f0792896134b343032303234341c00000100000c00007a0007320f00000000008920bac20000000000000092697a2ae9030226fd015de502363208522a075f330874040228fd015de502000000000000000000000000000000e7917c1e4d0750f1921703fb01f8068d1fd811f70bd604d50afa17f913d90c8b20f9a16a7d5921103501ff440000006c1f00cd977e059ab7009566fd191d1affd82fbf143fb8ff5277180991faff9ca1d10d441b01927bf211dd190190999f0553a1ff9120b10c3847ff06eeee0e571301a2c0891c000000cddd1a0882d10011167b153c154217941930005fc50b1eb9fde107d2050902115a537ea6ed343030313030303120313037393020202033312e37203036373520303334392030373030203132383636203630303520313339333120363031342031343038322035383830203738313420383032372031303039203930392039353631353632203935303839323220343238383339313633382032393335383636203539343238203335323439203636393920333738332034363837203637303120363930312037393939049a762d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f35a
|
|
codeword1
|
|
errors: 0
|
|
F3000000000000000000000000000000000000000000002D9A3939203036313720383433372039363932333834353638333238363938322032383520363135203020303137302031373038203834203136313931353020363220303039332037303731202039302030303034A6531109D2E1B90B5F3094423C7B11D108DD000089A2130EEEFF38B191A1059901DDF2921B0DA1FF911852B8142FFF1DFD95B70597006C00440110596AF98BD9F9FAD5D6F7D88DF8FB17F1071E910000000000000000E5012804085F2A0836E50126032A6900000000BA8900000F077A00000100343232341328F0F7372FCBC581987E308817C31384D68AE2C98EBF25109B8F
|
|
codeword2
|
|
errors: 2
|
|
pos: 234 252
|
|
5A000000000000000000000000000000000000000000000076043937313920303637362038333936203435203239203635392033313338343239303932353639393939302032383438203835323031343020333320303636383130372034303536202E332030373131303130ED7E5A020507FD1EC500191715151600821ACD001CC00157EE06470C20FF539F9019117B0144D19CFA0977FF3FBFD81A1966009A7ECD1F0000FF35217DA1200C13170A040B111F06010392504D7CE700000000000000025DFD027433075232025DFD02E97A92000000C2200000003200000C00001C3430304B9679194B64BC59EE1C5E3E7B3722BF8FED7799C3C511B749FA54
|
|
frame:
|
|
8635f44093df1a608f9b1025bf8ec9e28ad68413c31788307e9881c5cb2f37f754fa49b711c5c39977ed8fbf22377b3e5e1cee59bc644b19f0792896134b343032303234341c00000100000c00007a0007320f00000000008920bac20000000000000092697a2ae9030226fd015de502363208522a075f330874040228fd015de502000000000000000000000000000000e7917c1e4d0750f1921703fb01f8068d1fd811f70bd604d50afa17f913d90c8b20f9a16a7d5921103501ff440000006c1f00cd977e059ab7009566fd191d1affd82fbf143fb8ff5277180991faff9ca1d10d441b01927bf211dd190190999f0553a1ff9120b10c3847ff06eeee0e571301a2c0891c000000cddd1a0882d10011167b153c154217941930005fc50b1eb9fde107d2050902115a537ea6ed343030313030303120313037393020202033312e37203036373520303334392030373030203132383636203630303520313339333120363031342031343038322035383830203738313420383032372031303039203930392039353631353632203935303839323220343238383339313633382032393335383636203539343238203335323439203636393920333738332034363837203637303120363930312037393939049a762d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f35a
|
|
|
|
./ecc-rs_vaisala 8635f44093df1a60421080e56396389c102cf6db9276308a11f9f8792cb620beae0662688bba0eb2c0bdfa3bd10f0368c07ad0ac33c77046f0792888134b343032303234341c00000100000d00007a000732013230323434254e00002c011205b43ca475537a2a95050229fd015be502d931084d2a075b3308ed060228fd015de50200000000000000000000000000000061d67c1e4d07a0ba92170e9003fa01f813b40c921ed811fa0bf504d20af920fa17f765137d59950b3501ffc43086200a1101420000000521008f527605b1b600faa7e10e3b1301acce8e1c78c5ff0de3c41479b6ff48781a09dcfdffa2f1c30d51190151e0e4113d1701e27da60504a4ffdb2511085bd1003f05bd0c8346ffda787b156d2f421735a22f00f88b0b1ea7fe220b23030902112a417ea5d0343030333030303120313036313320202033312e362030363733203033353220303730302031323235312033383030203133343036203535333920313430353820353239332037383030203830323120373334203931392039353533383738203937323839373820343238383338353332362032393032313631203539313039203335303539203637303020333738352034363838203636393920363839392038303030c8e4762e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bf08
|
|
codeword1
|
|
errors: 1
|
|
pos: 136
|
|
BF000000000000000000000000000000000000000000000076C830383938203936383620383330372035352030392036323920323533383438393239383835393939343731302030373332203534203335363431303820353220303032332037303631202031302030303034A54111092322A70BF82F35426D7BDA460C05005B11DBA4057D013DE450190DF1FFDC1A48B614E3FF788EAC130EA700B1768F210000010A86C4010B5913F7FAF9D2F5FAD892B4F8FA9017BA071ED60000000000000000E5012806085B2A08D9E50129052A53A4B4122C0025343001077A00000100343232341328F0BE20B62C79F8F9118A307692DBF62C109C389663E5801042
|
|
codeword2
|
|
errors: 2
|
|
pos: 106 176
|
|
0800000000000000000000000000000000000000000000002EE43030203936393620383435372030363930333931353131303236333838322037383720373335203120332032383038203935383031393520303320303331323130372035303336202E332033363131303130D07E2A02030BFE1E8B00A2172F1578FF83BD3FD10825FF04A6E21711E00151C3A2FD0978FF79C40DC51CCE013BE1FAB6055200050042112030FF35957D6517200A040B111F0C1301030E92A04D7C6100000000000000025DFD02ED33074D31025BFD02957A753C0501004E3432323200000D00001C3430304B88794670C733ACD07AC068030FD13BFABDC0B20EBA8B686206AE
|
|
frame:
|
|
8635f44093df1a60421080e56396389c102cf6db9276308a11f9f8792cb620beae0662688bba0eb2c0bdfa3bd10f0368c07ad0ac33c77046f0792888134b343032303234341c00000100000d00007a000732013230323434254e00002c011205b43ca475537a2a95050229fd015be502d931084d2a075b3308ed060228fd015de50200000000000000000000000000000061d67c1e4d07a0ba92170e9003fa01f813b40c921fd811fa0bf504d20af920fa17f765137d59950b3501ffc43086200a1101420000000521008f527605b1b600faa7e10e3b1301acce8e1c78c5ff0de3c41479b6ff48781a09dcfdffa2f1c30d51190150e0e4113d1701e27da60504a4ffdb2511085bd1003f05bd0c8346ffda787b156d2f421735a22f00f88b0b1ea7fe220b23030902112a417ea5d0343030313030303120313036313320202033312e362030363733203033353220303730302031323235312033383030203133343036203535333920313430353820353239332037383030203830323120373334203931392039353533383738203937323839373820343238383338353332362032393032313631203539313039203335303539203637303020333738352034363838203636393920363839392038303030c8e4762e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bf08
|
|
|
|
./rs41ecc -b --ecc rs41.wav
|
|
./rs41ecc -b --ecc --crc rs41.wav
|
|
./rs41ecc -b --ecc -r rs41.wav
|
|
|