gtechnocrat

Help processing GPS data  from a server

Discussion created by gtechnocrat on Jul 12, 2013
Latest reply on Jul 15, 2013 by rzufelt
I have having issues with processing data after it closing the connection for a database. nprompt is a list that takes string names
from two users. The print of the list shows the exact copy of the x y coordinates. Not sure whats wrong with my code.


for k in nprompt:
   if k == "t4":
        #Function to process lat and lon
        newLat = []
        newLon = []
        for x in lat:
            if x != 0:
                newLat.append(x/1000000)
            else:
                newLat.append(x)

        for x in lon:
            if x != 0:
                newLon.append(x/1000000)
            else:
                newLon.append(x)

for k in nprompt:
   if k =="taylor":
      #Function to process lat and lon
      newLat2 = []
      newLon2 = []
      for x in lat:
         if x != 0:
             newLat2.append(x/1000000)
         else:
             newLat2.append(x)

      for x in lon:
         if x != 0:
             newLon2.append(x/1000000)
         else:
             newLon2.append(x)
        

print newLat [5:40]
print newLat2 [:40]

Outcomes