Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.position_convert(pos)
- lat = pos.latitude
- lng = pos.longitude
- lat = (lat * 0xffffff) + 90
- puts lat
- bytes = []
- bytes << lat % 256
- bytes << (lat % 256**2) - bytes[0]
- bytes << lat - bytes[0] - bytes[1]
- y bytes
- bytes.pack('a3a3')
- end
Add Comment
Please, Sign In to add comment