Version 11 (modified by 13 years ago) (diff) | ,
---|
Getting Measurements While Driving for the 6250 in Linux
Required Packages
We are using a USB GPS dongle and the required packages for it are gpsd and its dependencies.
For the python script to be able to communicate with gpsd, we will need the python-gps package as well.
The names of the data files created use the current date and time, therefore we will need the dateutil python package also.
sudo apt-get install gpsd python-gps python-dateutil
Script Configuration
Next you should open the config.py file in a text editor and look at the global variable/constants. There are options to execute scans for the RSSI values and/or iperf tests. The output to those tests are put in separate directories under the file names based on the current date and time. As it stands, these are the current variables and Constants:
#---------------------------------------------------------------------- # Global Variables / Constants #---------------------------------------------------------------------- # Global debug to output console DEBUG = True # Select internet connection - Function debug mode USE_WIRED_CONNECTION = False USE_WIFI_CONNECTION = False USE_WIMAX_CONNECTION = True # Automatically connect even when disconnected AUTO_CONNECT = True # Global to write the date and column headers WRITE_FILE_HEADER = True # Global for which data set to get RUN_RSSI = True RUN_IPERF = False RUN_PING = True RUN_DOWNLOAD = False GET_LOCATION = True # Pause through loop PRESS_ANY_KEY = False # Directory constants - The name of the file is the date and time RSSI_DIRECTORY = "./rssi/" IPERF_DIRECTORY = "./iperf/" WGET_DIRECTORY = "./wget/" PING_DIRECTORY = "./ping/" CREATE_DIRS_IF_NOT_EXIST = True # Iperf server IPERF_SERVER = "iperf.wiscnet.net" # Running a wget comand, the file to download WGET_FILENAME = "1Mtestfile.img" WGET_FILE_URL = "www.cs.wisc.edu/~dmeyer/" + WGET_FILENAME PING_URL = "128.105.22.11"
Notes
- The iperf is not tested extensively yet.
- The GPS session is closed each time at the end of the loop and created again at the beginning of the loop. This is done because the output of the USB GPS dongle is an asynchronous operation, and is contingent upon the surroundings. If this is taken out, your RSSI or Mbps data will more than likely not match to the correct GPS location.
- That being said, it does take a little time to acquire a valid GPS location.
Script Execution
Open a command line and cd to the directory of the script and type:
python main.py
Script Changes
If anybody has any changes they would like to request, bugs to report, Ubuntu packages missed, or an update they would like to submit, email: Derek Meyer
Attachments (2)
- gpsData.py (9.9 KB) - added by 13 years ago.
-
python_tests_v2.tar.gz (4.4 KB) - added by 13 years ago.
Version 2 of the Python Data Acquisition script
Download all attachments as: .zip