How to represent a DEC Single Precision Floating Point(DEC SPFP) Data Type

Hey,
I am working on a project where I need to format messages to send to a GPS receiver but some of the data types in the messages are DEC Single Precision Floating Point(DEC SPFP). At first I didn't know what this type was but after reading about it, it is a float type. So would it be ok for me to just store the values as a float instead of DEC SPFP type. Any help will be greatly appreciated. Also, if you know of a site that really provide info about this type of data type please share, I don't fully understand this data type.

Thanks in Advance
The following document gives a description of DEC SPFP.
http://www.irig106.org/docs/106-07/appendixO.pdf

The definition of a float is implementation specific, so you need to know your your machine stores floats. If your machine uses IEEE single precision float, you will find it to be very similar to DEC SPFP. The difference is that IEEE SPFP uses a bias of 127, while DEC uses a bias of 128.
IEEE-32 formula: (-1S)(1.F)(2(E-127))
DEC-32 SPFP: (-1S)(0.1F)(2(E-128))
Where S is the sign, F is the fraction, and E is the exponent.

If you need to deal with DEC SPFP extensively, write a class to manipulate them.
tnjgraham

I am working on this now and was wondering if you ever figured it out.
Topic archived. No new replies allowed.