[ADB] FW: ARINC 813 - Draft RLE Algorithm

Peter Grau Peter.Grau at sae-itc.org
Mon Sep 26 09:33:42 EDT 2016


Hello All,
   Marcin Kolesinski, Rockwell Collins, has developed the following 2D run-length encoding algorithm for Project Paper 813.  This is #99 on the Action Item List.   Please review this so we can discuss it on Wednesday’s call.
Best Regards,
                         Peter
To minimize size of the encoded data, suggest putting this directly into A813 as a custom alrogrithm, and the array dimensions will actually be attribute values (numpostspertileaxis from corresponding Grid element)...scale factor will be hardcoded.

NOTE RE A814: Other RLE functions perhaps incorrectly describe arrays as 1D, 2D, or 3D....really, they are Nx1, Nx2, or Nx3, where N is the array length. The example below is a true 2D array (MxN). The other RLE functions might be better described as 1D array of values, 1D array of value pairs, 1D array of value triplets, etc.

Code


Description


Number Of Arguments


Argument Data Type


Content Data Type


Output Data Type


Function definition



0x80?


Run-length encoding of (relative to previous value in row) of 2 dimensional Count Array of scaled integer values


1


Count


Count


DoubleNum


Section TBD



<SECTION> Run-length encoding function: 2 dimensional array of terrain elevations

ScaleFactor = TBD

args[0] is a reference value; it can be any valid integer, which when used with the encoding/decoding algorithm below, does not cause the data type of <content> to overflow. For data the does not contain any Default values, this could be the scaled representation of the first value (e.g. Value[0] / ScaleFactor), which would allow the first encoded array entry (<content[0][0]>) to simply be zero.

Encoding function:

for j = 0, j < numpostspertileaxis, j = j + 1

if(Value[j][0] is Default)

<content[j][0]> = Default (corresponding integer representation)

else if ((j == 0) or (Value[j - 1][0] is Default))

<content[j][0]> = (Value[j][0] / ScaleFactor) - args[0]

else

<content[j][0]> = (Value[j][0] / ScaleFactor) - <content[j-1][0]>



for i = 1, i < numpostspertileaxis, i = i + 1

if(Value[j][i] is Default)

<content[j][i]> = Default (corresponding integer representation)

else if (Value[j][i-1] is Default)

<content[j][i]> = (Value[j][i] / ScaleFactor) - args[0]

else

<content[j][i]> = (Value[j][i] / ScaleFactor) - <content[j][i-1]>



Decoding function:

for j = 0, j < numpostspertileaxis, j = j + 1

if(<content[j][0]> is Default)

Value[j][0] = Default

else if ((j == 0) or (<content[j – 1][0]> is Default))

Value[j][0] = (<content[j][0]> + args[0]) * ScaleFactor

else

Value[j][0] = (<content[j][0]> + <content[j-1][0]) * ScaleFactor



for i = 1, i < numpostspertileaxis, i = i +1

if(<content[j][i]> is Default)

Value[j][i] = Default

else if (<content[j][i-1]> is Default)

<Value[j][i]> = (<content[j][i]> + args[0]) * ScaleFactor

else

<Value[j][i]> = (<content[j][i]> + <content[j][i-1]) * ScaleFactor



========================================
Thanks,

Marcin Kolesinski
SA Apps Software Architect


Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message. Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or proprietary material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender and delete it from your computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.sae-itc.org/pipermail/adb/attachments/20160926/56e5dc8f/attachment-0001.html>


More information about the ADB mailing list