@@ -193,7 +193,7 @@ describe('Label_H1 POS', () => {
193193 expect ( decodeResult . decoded ) . toBe ( true ) ;
194194 expect ( decodeResult . decoder . decodeLevel ) . toBe ( 'partial' ) ;
195195 expect ( decodeResult . formatted . description ) . toBe ( 'Position Report' ) ;
196- expect ( decodeResult . formatted . items . length ) . toBe ( 12 ) ;
196+ expect ( decodeResult . formatted . items . length ) . toBe ( 14 ) ;
197197 expect ( decodeResult . formatted . items [ 0 ] . label ) . toBe ( 'Destination' ) ;
198198 expect ( decodeResult . formatted . items [ 0 ] . value ) . toBe ( 'MMGL' ) ;
199199 expect ( decodeResult . formatted . items [ 1 ] . label ) . toBe ( 'Arrival Runway' ) ;
@@ -204,29 +204,34 @@ describe('Label_H1 POS', () => {
204204 'Estimated Time of Arrival' ,
205205 ) ;
206206 expect ( decodeResult . formatted . items [ 3 ] . value ) . toBe ( '10:33:16' ) ;
207- expect ( decodeResult . formatted . items [ 4 ] . label ) . toBe ( 'Route Status' ) ;
208- expect ( decodeResult . formatted . items [ 4 ] . value ) . toBe ( 'Route Planned' ) ;
209- expect ( decodeResult . formatted . items [ 5 ] . label ) . toBe ( 'Origin' ) ;
210- expect ( decodeResult . formatted . items [ 5 ] . value ) . toBe ( 'MMTJ' ) ;
211- expect ( decodeResult . formatted . items [ 6 ] . label ) . toBe ( 'Destination' ) ;
212- expect ( decodeResult . formatted . items [ 6 ] . value ) . toBe ( 'MMGL' ) ;
213- expect ( decodeResult . formatted . items [ 7 ] . label ) . toBe ( 'Departure Runway' ) ;
214- expect ( decodeResult . formatted . items [ 7 ] . value ) . toBe ( '27O' ) ;
215- expect ( decodeResult . formatted . items [ 8 ] . label ) . toBe ( 'Departure Procedure' ) ;
216- expect ( decodeResult . formatted . items [ 8 ] . value ) . toBe (
217- 'TUMA2B: >> SANFE > UT4 >> LMM' ,
207+ expect ( decodeResult . formatted . items [ 4 ] . label ) . toBe ( 'Altitude' ) ;
208+ expect ( decodeResult . formatted . items [ 4 ] . value ) . toBe ( '35000 feet' ) ;
209+ expect ( decodeResult . formatted . items [ 5 ] . label ) . toBe (
210+ 'Outside Air Temperature (C)' ,
218211 ) ;
219- expect ( decodeResult . formatted . items [ 9 ] . label ) . toBe ( 'Arrival Procedure' ) ;
220- expect ( decodeResult . formatted . items [ 9 ] . value ) . toBe ( 'LONV1D' ) ;
221- expect ( decodeResult . formatted . items [ 10 ] . label ) . toBe ( 'Approach Procedure' ) ;
212+ expect ( decodeResult . formatted . items [ 5 ] . value ) . toBe ( '-45 degrees' ) ;
213+ expect ( decodeResult . formatted . items [ 6 ] . label ) . toBe ( 'Route Status' ) ;
214+ expect ( decodeResult . formatted . items [ 6 ] . value ) . toBe ( 'Route Planned' ) ;
215+ expect ( decodeResult . formatted . items [ 7 ] . label ) . toBe ( 'Origin' ) ;
216+ expect ( decodeResult . formatted . items [ 7 ] . value ) . toBe ( 'MMTJ' ) ;
217+ expect ( decodeResult . formatted . items [ 8 ] . label ) . toBe ( 'Destination' ) ;
218+ expect ( decodeResult . formatted . items [ 8 ] . value ) . toBe ( 'MMGL' ) ;
219+ expect ( decodeResult . formatted . items [ 9 ] . label ) . toBe ( 'Departure Runway' ) ;
220+ expect ( decodeResult . formatted . items [ 9 ] . value ) . toBe ( '27O' ) ;
221+ expect ( decodeResult . formatted . items [ 10 ] . label ) . toBe ( 'Departure Procedure' ) ;
222222 expect ( decodeResult . formatted . items [ 10 ] . value ) . toBe (
223+ 'TUMA2B: >> SANFE > UT4 >> LMM' ,
224+ ) ;
225+ expect ( decodeResult . formatted . items [ 11 ] . label ) . toBe ( 'Arrival Procedure' ) ;
226+ expect ( decodeResult . formatted . items [ 11 ] . value ) . toBe ( 'LONV1D' ) ;
227+ expect ( decodeResult . formatted . items [ 12 ] . label ) . toBe ( 'Approach Procedure' ) ;
228+ expect ( decodeResult . formatted . items [ 12 ] . value ) . toBe (
223229 'ILSZ29 starting at PLADE(29O)' ,
224230 ) ;
225- expect ( decodeResult . formatted . items [ 11 ] . label ) . toBe ( 'Message Checksum' ) ;
226- expect ( decodeResult . formatted . items [ 11 ] . value ) . toBe ( '0x9d1c' ) ;
231+ expect ( decodeResult . formatted . items [ 13 ] . label ) . toBe ( 'Message Checksum' ) ;
232+ expect ( decodeResult . formatted . items [ 13 ] . value ) . toBe ( '0x9d1c' ) ;
227233 expect ( decodeResult . remaining . text ) . toBe (
228- 'PR1754,231,350,189,,0,0,,M45,185,,,P16,P0,36000,,1565,250' ,
229- ) ;
234+ '1754,231,189,,0,0,,185,,,P16,P0,36000,,1565,250' ) ;
230235 } ) ;
231236
232237 test ( 'variant 1 with offset' , ( ) => {
@@ -292,7 +297,7 @@ describe('Label_H1 POS', () => {
292297 expect ( decodeResult . decoded ) . toBe ( true ) ;
293298 expect ( decodeResult . decoder . decodeLevel ) . toBe ( 'partial' ) ;
294299 expect ( decodeResult . formatted . description ) . toBe ( 'Position Report' ) ;
295- expect ( decodeResult . formatted . items . length ) . toBe ( 12 ) ;
300+ expect ( decodeResult . formatted . items . length ) . toBe ( 14 ) ;
296301 expect ( decodeResult . formatted . items [ 0 ] . label ) . toBe ( 'Aircraft Position' ) ;
297302 expect ( decodeResult . formatted . items [ 0 ] . value ) . toBe ( '51.323 N, 4.878 E' ) ;
298303 expect ( decodeResult . formatted . items [ 1 ] . label ) . toBe ( 'Altitude' ) ;
@@ -313,20 +318,26 @@ describe('Label_H1 POS', () => {
313318 expect ( decodeResult . formatted . items [ 6 ] . value ) . toBe (
314319 'LEIB..CIV.N872.MEDIL.UN872.KOVIN.UM728.RESMI.UN857.DISAK..DIRMO..ETAMO..ADEKA..MOKDI..MEN..BADAM..KANIG..KENAS.N855.POS' ,
315320 ) ;
316- expect ( decodeResult . formatted . items [ 7 ] . label ) . toBe ( 'Arrival Runway' ) ; // FIXME should remove
317- expect ( decodeResult . formatted . items [ 7 ] . value ) . toBe ( '' ) ; // FIXME should remove
318- expect ( decodeResult . formatted . items [ 8 ] . label ) . toBe ( 'Fuel On Board' ) ;
319- expect ( decodeResult . formatted . items [ 8 ] . value ) . toBe ( '89' ) ;
320- expect ( decodeResult . formatted . items [ 9 ] . label ) . toBe (
321+ expect ( decodeResult . formatted . items [ 7 ] . label ) . toBe ( 'Altitude' ) ;
322+ expect ( decodeResult . formatted . items [ 7 ] . value ) . toBe ( '37000 feet' ) ;
323+ expect ( decodeResult . formatted . items [ 8 ] . label ) . toBe (
324+ 'Outside Air Temperature (C)' ,
325+ ) ;
326+ expect ( decodeResult . formatted . items [ 8 ] . value ) . toBe ( '-47 degrees' ) ;
327+ expect ( decodeResult . formatted . items [ 9 ] . label ) . toBe ( 'Arrival Runway' ) ; // FIXME should remove
328+ expect ( decodeResult . formatted . items [ 9 ] . value ) . toBe ( '' ) ; // FIXME should remove
329+ expect ( decodeResult . formatted . items [ 10 ] . label ) . toBe ( 'Fuel On Board' ) ;
330+ expect ( decodeResult . formatted . items [ 10 ] . value ) . toBe ( '89' ) ;
331+ expect ( decodeResult . formatted . items [ 11 ] . label ) . toBe (
321332 'Estimated Time of Arrival' ,
322333 ) ;
323- expect ( decodeResult . formatted . items [ 9 ] . value ) . toBe ( '12:45:03' ) ;
324- expect ( decodeResult . formatted . items [ 10 ] . label ) . toBe ( 'Fuel Remaining' ) ;
325- expect ( decodeResult . formatted . items [ 10 ] . value ) . toBe ( '73' ) ;
326- expect ( decodeResult . formatted . items [ 11 ] . label ) . toBe ( 'Message Checksum' ) ;
327- expect ( decodeResult . formatted . items [ 11 ] . value ) . toBe ( '0x53b2' ) ;
334+ expect ( decodeResult . formatted . items [ 11 ] . value ) . toBe ( '12:45:03' ) ;
335+ expect ( decodeResult . formatted . items [ 12 ] . label ) . toBe ( 'Fuel Remaining' ) ;
336+ expect ( decodeResult . formatted . items [ 12 ] . value ) . toBe ( '73' ) ;
337+ expect ( decodeResult . formatted . items [ 13 ] . label ) . toBe ( 'Message Checksum' ) ;
338+ expect ( decodeResult . formatted . items [ 13 ] . value ) . toBe ( '0x53b2' ) ;
328339 expect ( decodeResult . remaining . text ) . toBe (
329- '290016,191/PR1496,150,370,191,,55,10,248028,M47,30,P19,P0/FHCIV,105208,273K,3226,175,M41,252027,450,N,221,62.MEDIL,105411,267K,3439,172,M44,250028,459,N,203,15.PITHI,105533,259K,3584,170,M47,249028,456,N,203,10.LESDO,105859,252K,3700,167,M47,248028,456,N,203,25.KOVIN,110153,252K,3700,164,M47,248028,456,N,203,21.DUCRA,110705,252K,3700,160,M47,248028,456,N,213,37.RESMI,111101,251K,3700,156,M47,248028,455,N,213,28.DEKOD,111325,251K,3700,154,M47,248028,455,N,192,17.DISAK,111438,251K,3700,153,M47,248028,454,N,172,9.DIRMO,112306,251K,3700,145,M47,248028,454,N,178,63.ETAMO,112514,250K,3700,143,M47,248028,453,N,158,16.ADEKA,113339,250K,3700,136,M47,248028,454,N,147,64.MOKDI,114139,251K,3700,129,M47,248028,454,N,181,59.MEN,114429,251K,3700,127,M47,248028,454,N,181,21.BADAM,114843,251K,3700,123,M47,248028,454,N,179,31.KANIG,120154,250K,3700,111,M47,248028,453,N,185,97.KENAS,121800,250K,3700,98,M47,248028,453,N,177,119.POS,122257,250K,3018,96,M45,248023,395,N,182,34.LEIB,124503,150K,2,89,P15,000000,161,N,231,103' ,
340+ '290016,191/PR1496,150,191,,55,10,248028,30,P19,P0/FHCIV,105208,273K,3226,175,M41,252027,450,N,221,62.MEDIL,105411,267K,3439,172,M44,250028,459,N,203,15.PITHI,105533,259K,3584,170,M47,249028,456,N,203,10.LESDO,105859,252K,3700,167,M47,248028,456,N,203,25.KOVIN,110153,252K,3700,164,M47,248028,456,N,203,21.DUCRA,110705,252K,3700,160,M47,248028,456,N,213,37.RESMI,111101,251K,3700,156,M47,248028,455,N,213,28.DEKOD,111325,251K,3700,154,M47,248028,455,N,192,17.DISAK,111438,251K,3700,153,M47,248028,454,N,172,9.DIRMO,112306,251K,3700,145,M47,248028,454,N,178,63.ETAMO,112514,250K,3700,143,M47,248028,453,N,158,16.ADEKA,113339,250K,3700,136,M47,248028,454,N,147,64.MOKDI,114139,251K,3700,129,M47,248028,454,N,181,59.MEN,114429,251K,3700,127,M47,248028,454,N,181,21.BADAM,114843,251K,3700,123,M47,248028,454,N,179,31.KANIG,120154,250K,3700,111,M47,248028,453,N,185,97.KENAS,121800,250K,3700,98,M47,248028,453,N,177,119.POS,122257,250K,3018,96,M45,248023,395,N,182,34.LEIB,124503,150K,2,89,P15,000000,161,N,231,103' ,
330341 ) ;
331342 } ) ;
332343
0 commit comments