public TrellisHalfRate()
 {
     ConstellationNode previous = null;
     for (int x = 0; x < 49; x++)
     {
         ConstellationNode node = new ConstellationNode();
         if (previous != null)
         {
             previous.connect(node);
         }
         previous = node;
         mConstellationNodes.Add(node);
     }
 }
        public TrellisHalfRate()
        {
            ConstellationNode previous = null;

            for (int x = 0; x < 49; x++)
            {
                ConstellationNode node = new ConstellationNode();
                if (previous != null)
                {
                    previous.connect(node);
                }
                previous = node;
                mConstellationNodes.Add(node);
            }
        }
        public void decode(RadioLog.Common.SafeBitArray message, int start, int end)
        {
            /* load each of the nodes with deinterleaved constellations */
            for (int index = 0; index < 49; index++)
            {
                Constellation c = getConstellation(message, index * 4);

                mConstellationNodes[index].setConstellation(c);
            }

            /* test to see if constellations are correct - otherwise correct them */
            ConstellationNode firstNode = mConstellationNodes[0];

            if (!firstNode.startsWith(Dibit.D0) || !firstNode.isCorrect())
            {
                firstNode.correctTo(Dibit.D0);
            }

            /* clear constellations from original message */
            message.ClearRange(start, end - start);

            /* replace with decoded values from the nodes */
            for (int index = 0; index < 49; index++)
            {
                ConstellationNode node = mConstellationNodes[index];

                if (node.firstBit())
                {
                    message.SetBit(start + (index * 2));
                }
                if (node.secondBit())
                {
                    message.SetBit(start + (index * 2) + 1);
                }
            }
        }
Exemple #4
0
 public void ShowConstellation(ConstellationData constellation)
 {
     focusNode         = NodeForConstellation(constellation);
     starPath.starSlot = focusNode.transform;
     focusObject       = focusNode.gameObject;
 }
 public void connect(ConstellationNode node)
 {
     mConnectedNode = node;
 }
 public void dispose()
 {
     mConnectedNode = null;
 }
 public void connect(ConstellationNode node)
 {
     mConnectedNode = node;
 }
 public void dispose()
 {
     mConnectedNode = null;
 }