GPS Stream parameter with python-library

iOS 11.2.1
Raspberry Pi Zero

I’m trying to send iPhone gps location to the Raspberry Pi at the moment

import BlynkLib
auth=“(auth token)”
blynk=BlynkLib.Blynk(auth)

@blynk.VIRTUAL_WRITE(2)
def show_location(param):
print(param)

then command

blynk.run()

the result shows the latitude, longitude, altitude and speed like below
(let me hide some numbers for the privacy)

“–.339733”
“—.489085”
“—.474854”
“0.000000”

I have a problem with these inseparable parameters.
originally param[0] is expected to indicate the latitude, and param[1] longitude… but it’s not how the params work.
“param” seems to indicate all of four numbers above, which is so weird

actually

list(param)

returns four each list (in which each digits are listed for some reason) instead of a list containing four the numbers

[“-”,“-”,“.”,“3”,“3”,“9”,“7”…]
[“-”,“-”,“-”,“.”,“4”,“8”,“9”,“0”…]
[…]
[…]

so how can i get each parameters separately?

2 Likes

Hi, did you solve this?

also can i ask how you print the the result latitude, longitude, altitude

1 Like