Dear Pd-list,
I am trying to get a Razor AHRS sensor to work with Pd using its comport external. This sensor sends three angles (yaw, pitch, roll). Each of these angles is said to be sent as a 4 byte (single precision) float value.
This float value arrives in Pd from comport's outlet as three values 0-255. The byte order is little-endian.
I understand that a 4byte single precision float has a 1bit sign, an 8bit exponent and a 23bit mantissa.
After five hours of trying I am wondering how I could convert this number into a Pd float.
I would be delighted to receive any pointers as I have run out of ideas by now.
thank you so much! P
In the Pd svn I have an external [b2f] which probably does what you want. Not sure if it made in into Pd-extended yet as there don't seem to be many recent builds available, but it should be straightforward to compile.
http://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/mrpeach/ser...
Martin
On Sun, Oct 19, 2014 at 10:48 PM, Peter P. via Pd-list <pd-list@lists.iem.at
wrote:
Dear Pd-list,
I am trying to get a Razor AHRS sensor to work with Pd using its comport external. This sensor sends three angles (yaw, pitch, roll). Each of these angles is said to be sent as a 4 byte (single precision) float value.
This float value arrives in Pd from comport's outlet as three values 0-255. The byte order is little-endian.
I understand that a 4byte single precision float has a 1bit sign, an 8bit exponent and a 23bit mantissa.
After five hours of trying I am wondering how I could convert this number into a Pd float.
I would be delighted to receive any pointers as I have run out of ideas by now.
thank you so much! P
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Martin,
In the Pd svn I have an external [b2f] which probably does what you want. Not sure if it made in into Pd-extended yet as there don't seem to be many recent builds available, but it should be straightforward to compile.
Thanks, this looks good. I am just wondering how to compile it. I am on Linux and have a fresh svn checkout of the externals directory. mrpeach/serializer/ does not have a Makefile though, and the directory above it has a Makefile, which I can't get to work to compile the serializer. I must admit that I never really got fluent with what was once called the "new" build system for externals...
What could be a good way to do it in this case here?
Thank you so much! Peter