title: Converting bytes to floats in Swift when receiving bluetooth communications
body: <p>I am trying to write an iOS app in Swift that uses the CoreBluetooth framework. I know how to initiate and obtain the values and subscribe to the values I want from the Bluetooth BLE peripheral that I'm using and I'm receiving the values properly. I was looking for help in understanding how to convert the hex code values to a signed floating point number.</p>
  <p>Here is the data characteristic information:</p>
  <p><a href="https://i.stack.imgur.com/Xzjbw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xzjbw.png" alt="enter image description here" /></a></p>
  <p>Here are a couple data examples:</p>
  <ol>
  <li>The gauge displays 0.52705 inches and I receive 0xc0ec063f0100.</li>
  <li>The gauge displays -0.41250 and I receive 0x3333d3be0100.<br />
  I understand the last 2 bytes (bytes 5 and 6).</li>
  </ol>
  <p>I just can't figure out how to convert the first 4 bytes back to the values shown on the gauge display.  Thank you!</p>