2
I need to convert a string HEX for decimal, to string uses the Complement of Two standard and IEEE-754 to define the number of decimal places
It is a tracking system, according to the manual to string C1B6DF66 corresponds to -22,8590813 and C23C1762 corresponds to -47,0228348.
var fb = Convert.ToUInt32(hx,16);
var twosComp2 = (~fb + 1);
var y= BitConverter.ToSingle(BitConverter.GetBytes((int)twosComp2), 0);
I’m using the code above but I can’t get the same result.