fork download
  1. # LPPe format
  2. lat = 791996123
  3. lng = -1152496452
  4.  
  5. fLat = round(float(lat) * 90 / 2147483648, 10)
  6. fLong = round(float(lng) * 180 / 2147483648, 10)
  7.  
  8. print("LPPe:", fLat, fLong)
  9.  
  10.  
  11. #SUPL
  12. lat = 4080332
  13. lng = -3693382
  14.  
  15. fLat = round(float(lat) * 90 / 8388608, 10)
  16. fLong = round(float(lng) * 180 / 8388608, 10)
  17.  
  18. print("SUPL:", fLat, fLong)
  19.  
  20.  
  21.  
  22. '''
  23. elif mLongitude:
  24. iLong = mLongitude.group(1)
  25. fLong = float(iLong) * 180 / 2147483648
  26. fLong = round(fLong, 10)
  27. sLong = str(fLong)
  28.  
  29. elif mLongitude_negative:
  30. iLong = mLongitude_negative.group(1)
  31. fLong = -1 * float(iLong) * 180 / 2147483648
  32. fLong = round(fLong, 10)
  33. sLong = str(fLong)# your code goes here
  34.  
  35.  
  36. if mLatitude:
  37. iLat = mLatitude.group(1)
  38. fLat = float(iLat) * 90 / 8388608
  39. fLat = round(fLat, 10)
  40. sLat = str(fLat)
  41.  
  42. elif mLongitude:
  43. iLong = mLongitude.group(1)
  44. fLong = float(iLong) * 180 / 8388608
  45. fLong = round(fLong, 10)
  46. sLong = str(fLong)
  47.  
  48. elif mLongitude_negative:
  49. iLong = mLongitude_negative.group(1)
  50. fLong = -1 * float(iLong) * 180 / 8388608
  51. fLong = round(fLong, 10)
  52. sLong = str(fLong)
  53. '''
Success #stdin #stdout 0.02s 7312KB
stdin
Standard input is empty
stdout
('LPPe:', 33.1921740761, -96.6011366621)
('SUPL:', 43.7772130966, -79.2513799667)