longitude reading measured in degrees with a 1x10^-7 degree lsb, signed 2’s complement
I am receiving data from a gps unit via a udp packet. Lat/Lng values are in hex. Example Data 13BF71A8 = Latitude (33.1313576) BA18A506 = Longitude (-117.2790010) The documentation explains that longitude/latitude readings are measured in degrees with a 1x10^-7 degree lsb, signed 2’s complement. For the Latitude I can convert using this formula: 13BF71A8 = 331313576 * 0.0000001 = 33.1313576 This code works for Lat but not for Lng: function convertLat(h){ var latdec = parseInt(h,16); var lat = latdec * 0.0000001; return lat; } console.log("LAT: " + convertLat("13BF71A8")); I am having trouble