Jul-12-2017, 06:51 PM
Hi,
I am very new to python coding and have a question that is hopefully a simple fix.
I am an intern for a company who is developing some drones for agricultural use and need to export some data from the drone's companion computer. It is not important that you are familiar with MAVLink, but I'll explain it a bit for clarification.
When the drone's flight controller is hooked up to my laptop via USB, I am able to connect MAVLink and see the real time location values, such as latitude, longitude and altitude. By inserting a specific link into the web browser, I am able to see those values display. However, this information changes. For example, if if I run that link when the controller is flat, and then run it again with it turned 90 degrees, I'll get different attributes in the web browser.
To sum it up: I have a web browser link that holds a short amount of constantly changing information. I am already able to export the text from the browser using the short code below...but that textfile it generates only holds the information that the link held at the exact time I can the code. So, I need a way to make this textfile update every 10 seconds or so with the changing information, and store the old values.
E.g.
VALUE(S) #1 @10 seconds
VALUE(S) #2 @20 seconds
VALUE(S) #3 @30 seconds
Multiple textfiles is fine too...I just need a way to export the changing information from the link in some type of thread.
Thanks in advance!
I am very new to python coding and have a question that is hopefully a simple fix.
I am an intern for a company who is developing some drones for agricultural use and need to export some data from the drone's companion computer. It is not important that you are familiar with MAVLink, but I'll explain it a bit for clarification.
When the drone's flight controller is hooked up to my laptop via USB, I am able to connect MAVLink and see the real time location values, such as latitude, longitude and altitude. By inserting a specific link into the web browser, I am able to see those values display. However, this information changes. For example, if if I run that link when the controller is flat, and then run it again with it turned 90 degrees, I'll get different attributes in the web browser.
To sum it up: I have a web browser link that holds a short amount of constantly changing information. I am already able to export the text from the browser using the short code below...but that textfile it generates only holds the information that the link held at the exact time I can the code. So, I need a way to make this textfile update every 10 seconds or so with the changing information, and store the old values.
E.g.
VALUE(S) #1 @10 seconds
VALUE(S) #2 @20 seconds
VALUE(S) #3 @30 seconds
Multiple textfiles is fine too...I just need a way to export the changing information from the link in some type of thread.
Thanks in advance!
import urllib urllib.urlretrieve("link here", "test1.txt")P.S. I cant provide the actual link since it's my first post on this forum...for anti-spam measures.