samedi 26 novembre 2016

how to compute GPS data

I need to compute GPS data with the following information provided.

Bits       size description 
Bits 0-25   26  Latitude    Location latitude   Latitude as 26-bit integer * 100,000
Bits 26-51  26  Longitude   Location longitude  Longitude as 26-bit integer * 100,000

Int32 – Latitude (decimal degrees xx.xxxxxx) * 1,000,000 Int32 – Longitude (decimal degrees yyy.yyyyyy) * 1,000,000

Based on the above information, I understand that 1) latitude value could be +-90.xxxxxx i.e. it needs 7 bits to accommodate value of 90 (2 ^ 7). based on the information how do I compute the Latitude and convert into mantissa (7 bits) and exponent (19 bits) part. Also, how about the sign bit ? for example the value 87.45 needs to be stored in a way that 87 gets stored to 7 bits where as 19 bits stores the value 45.

2) Similar Longitude value could be +-180 which requires 8 bits to accommodate value of 180 (2 ^8)based on the information how do I compute the Longitude and convert into mantissa (8 bits) and exponent(18 bits) part. Also, how about the sign bit ?

for example the value 130.50 needs to be stored in a way that 130 gets stored to 8 bits where as 18 bits stores the value 50.

Aucun commentaire:

Enregistrer un commentaire