def GPSPositionChanged(e):
source = e.device
print("%f, %f, %f") %(e.latitude, e.longitude, e.altitude)
ValueA=[(e.latitude)]
ValueB=[(e.longitude)]
ValueC=[(e.altitude)]
w.writerow ([ValueA])
w.writerow ([ValueB])
w.writerow ([ValueC])
This stores all the latitude longitude and altitude into a CSV file but they're all in the same row. I need them to go in rows A B and C.
Any ideas?
Edit: Here is the print statement of the terminal running if this was what you were after.
Press Enter to quit....
GPS Current Latitude: 52.930777
GPS Current Longitude: -1.133238
GPS Current Altitude: 30.300000
52.930777, -1.133240, 30.200000
52.930777, -1.133240, 30.300000
52.930777, -1.133238, 30.300000
52.930777, -1.133237, 30.400000
52.930775, -1.133235, 30.500000
52.930773, -1.133233, 30.700000
52.930773, -1.133232, 30.800000
52.930772, -1.133230, 30.900000
52.930772, -1.133227, 31.000000
52.930770, -1.133225, 31.200000
52.930770, -1.133223, 31.400000
52.930768, -1.133220, 31.500000
52.930767, -1.133218, 31.700000
Closing...
52.930753, -1.133198, 33.600000