Research Article
Robust Data Compression for Irregular Wireless Sensor Networks Using Logical Mapping
Pseudocode 1
Pseudocode for 1-dimensional DCT transform. From lines
to
, a sensor calculates only the coefficient that corresponds to the sensor virtual index
.
//Broadcast local reading to | //the cluster | broadcast (reading) | | //collect neighbors’ reading in | //specified interval | while not timeout | do | data [packet·virtual index] | = packet·reading | | //Compression with DCT transform | //Calculate only row of ⋆ data | // is the virtual index of this node | for ← to cluster_dim | coeffcoeff + [] [] ⋆ data [] | | //Quantization | coeff = round (coeff/) | | //Only transmit a nonzero coefficient | if coeff ! = 0 | send (coeff) |
|