public void addPacket(ZigBeeReceivePacket frame)
        {
            TelemetryPacket newPacket = new TelemetryPacket();
            String[] strings = Encoding.ASCII.GetString(frame.Data).Split(',');

            //Seperate each element
            try {
                newPacket.teamID = Convert.ToUInt16(strings[0]);
                newPacket.packetCount = Convert.ToUInt16(strings[1]);
                newPacket.altSensor = Convert.ToSingle(strings[2]);
                newPacket.pressure = Convert.ToSingle(strings[3]);
                newPacket.speed = Convert.ToSingle(strings[4]);
                newPacket.temp = Convert.ToSingle(strings[5]);
                newPacket.voltage = Convert.ToSingle(strings[6]);
                newPacket.latitudeGPS = Convert.ToSingle(strings[7]);
                newPacket.longitudeGPS = Convert.ToSingle(strings[8]);
                newPacket.altitudeGPS = Convert.ToSingle(strings[9]);
                newPacket.satellitesGPS = Convert.ToUInt16(strings[10]);
                newPacket.speedGPS = Convert.ToSingle(strings[11]);
                newPacket.lastImageCommandTime = Convert.ToUInt16(strings[12]);
                newPacket.imageCommandCount = Convert.ToUInt16(strings[13]);

                packets.Add(newPacket);
            } catch(Exception e)
            {

            }
        }
        public void newPhoto(ZigBeeReceivePacket frame)
        {
            currentPhotoNumber = Convert.ToByte(frame.Data[1]);
            currentNumberPackets = BitConverter.ToUInt16(frame.Data, 2);
            currentPhotoLength = BitConverter.ToUInt16(frame.Data, 4);

            rawData = new byte[currentPhotoLength];
            frameStuff = new bool[currentNumberPackets];
            receivedPackets = 0;
        }
        public void addPacket(ZigBeeReceivePacket frame)
        {
            UInt16 packetNumber = BitConverter.ToUInt16(frame.Data, 1);
            frameStuff[packetNumber] = true;
            byte dataLength = Convert.ToByte(frame.Data[3]);
            for(int i = 4; i < frame.Data.Length; i++)
            {
                rawData[(packetNumber * 210) + (i - 4)] = frame.Data[i];
            }

            if(checkAllReceived())
                assembleImage();

            Console.WriteLine("Recieved: " + packetNumber.ToString() + "\tTotal packets: " + receivedPackets.ToString());
        }