public static double[] DecodePPGSamples(string bits) { // Each packet contains a 16 bit timestamp, followed by 6, 24-bit samples. double[] samples = new double[Constants.MUSE_PPG_SAMPLE_COUNT]; for (int i = 0; i < Constants.MUSE_PPG_SAMPLE_COUNT; i++) { samples[i] = PacketConversion.ToUInt24(bits, 16 + (i * 24)); // Initial offset by 16 bits for the timestamp. } return(samples); }