LoRa Payload Description

public static int GetVersion(byte[] payload)
{
	return payload[0];
}

public static SoundValues DecodeFirstMeasurement(byte[] payload)
{
	var values = new List<double>();
	for (var i = 1; i < 13; i += 2)
	{
		var bytes = payload.Skip(i).Take(2).ToArray();
		values.Add(((bytes[0] << 8) | bytes[1]) / (double)100);
	}

	return new SoundValues
	{
		dBA_fast = values[0],
		dBA_slow = values[1],
		dBC_fast = values[2],
		dBC_slow = values[3],
		LeqA = values[4],
		LeqC = values[5]
	};
}

public static SoundValues DecodeSecondMeasurement(byte[] payload)
{
	var values = new List<double>();
	for (var i = 13; i < 25; i += 2)
	{
		var bytes = payload.Skip(i).Take(2).ToArray();
		values.Add(((bytes[0] << 8) | bytes[1]) / (double)100);
	}

	return new SoundValues
	{
		dBA_fast = values[0],
		dBA_slow = values[1],
		dBC_fast = values[2],
		dBC_slow = values[3],
		LeqA = values[4],
		LeqC = values[5]
	};
}

public static double DecodeVoltage(byte[] payload)
{
	var bytes = payload.Skip(25).Take(2).ToArray();
	return ((bytes[0] << 8) | bytes[1]) / (double)1000;
}

public static Location DecodeLocation(byte[] payload)
{
	return new Location
	{
		Latitude = (double)BitConverter.ToInt32(new ReadOnlySpan<byte>(payload, 27, 4)) / (double)10000000,
		Longitude = (double)BitConverter.ToInt32(new ReadOnlySpan<byte>(payload, 31, 4)) / (double)10000000,
	};
}
LoRa Payload Description - Version 2.0