public static void DecodeCAT01I040(byte[] Data)
{
CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates MyCAT01I040 = new CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates();
// Get an instance of bit ops
Bit_Ops BO = new Bit_Ops();
BO.DWord[Bit_Ops.Bits0_7_Of_DWord] = Data[CAT01.CurrentDataBufferOctalIndex + 4];
BO.DWord[Bit_Ops.Bits8_15_Of_DWord] = Data[CAT01.CurrentDataBufferOctalIndex + 3];
BO.DWord[Bit_Ops.Bits16_23_Of_DWord] = Data[CAT01.CurrentDataBufferOctalIndex + 2];
BO.DWord[Bit_Ops.Bits24_31_Of_DWord] = Data[CAT01.CurrentDataBufferOctalIndex + 1];
DecodeAzimuthAndDistance(ref MyCAT01I040.LatLong, out MyCAT01I040.Measured_Distance, out MyCAT01I040.Measured_Azimuth, BO);
//////////////////////////////////////////////////////////////////////////////////
// Now assign it to the generic list
CAT01.I001DataItems[CAT01.ItemIDToIndex("040")].value = MyCAT01I040;
//////////////////////////////////////////////////////////////////////////////////
// Leave it at the current index for the next decode
CAT01.CurrentDataBufferOctalIndex = CAT01.CurrentDataBufferOctalIndex + 4;
}