Re: hex value ==> floating point value



"Q" <dont@xxxxxxxxxx> wrote in message
news:45cc5a40$0$331$e4fe514c@xxxxxxxxxxxxxxxxx
Question:

For our GPS application I need to convert the minutes part (heximal value)
to a decimal/floating point value.

So: 41609218 (4 bytes) has to be converted to: 14.034 (approx)

(format of the float is IEEE-754 )

Thanx in advance for any help!!!!

You could try pack/unpack, they might be useful in this case.

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
spam@xxxxxxxxxxxxx | rot13(xvzzb@xxxxxxxxxxxxx)


.



Relevant Pages

  • hex value ==> floating point value
    ... For our GPS application I need to convert the minutes part ... to a decimal/floating point value. ... (format of the float is IEEE-754) ...
    (comp.lang.php)
  • Re: short float ???
    ... you mention that "this format is used in the NVIDIA graphic cards, ... floatingpoint" format natively? ... we now have two competing hardware definitions for a "short float". ...
    (comp.std.c)
  • Re: short float ???
    ... you mention that "this format is used in the NVIDIA graphic cards, ... floatingpoint" format natively? ... Although those specific platforms are fairly popular, ... float", or will standard promotion rules apply and computations be ...
    (comp.std.c)
  • Re: Beginner String formatting question
    ... I have a GPS receiver that transmits ... InputTuple = line.split ... write a FormatCoord function (within the Format module) to do the same ...
    (comp.lang.python)
  • Re: Socket & PrintWriter issue-- writing a float to a C client
    ... memcpy(&flt, buffer, 4); ... such as that a float is represented in C memory as 4 ... bytes in IEEE little-endian format -- in which case something like the above ...
    (comp.lang.java.programmer)