Overview
This end-to-end sample experiment includes one fixed node and one portable node and it uses GE2 sample experiment as the radio software and VCS1 sample experiment as the vehicle software. It also includes instructions and code for post-processing the results generated by the experiment.
1) Setting up the experiment
Create an experiment with one fixed node and one portable node. For radio software follow GE2 sample experiment to set up 'startGNURadio-ChannelSounder-TX.sh' as the radio application in the fixed node and 'startGNURadio-ChannelSounder-RX.sh' as the radio application in the portable node. For vehicle software follow VCS1 sample experiment to set up 'startPreplannedTrajectory.sh' as the vehicle application in the portable node. All of the applications are run in their default configurations. In the /root/Results folder of the portable node there will be three logs named [timestamp]_vehicleOut.txt, [timestamp]_power_log.txt, and [timestamp]_quality_log.txt. You will use these logs below for post-processing.
2) Post-processing
Channel Sounder Post-processing Code Link: [download]
Usage
Download the code above and place the [timestamp]_vehicleOut.txt, [timestamp]_power_log.txt, and [timestamp]_quality_log.txt logs from your experiment in the logs folder. Edit 'main.m' so that 'fname_gps', 'fname_power', and 'fname_quality' variables use the new logs. Run 'main.m' in MATLAB. It generates some plots and creates an input.csv file to be used to generate the KML file. To generate the KML file, run
python3 kml_generator.py --input input.csv --output out.kml
The 'out.kml' file can be opened in Google Earth.
You can download and install Google Earth from the Google Earth Pro page.
If the kml_generator.py gives the error "No module named PIL" run
pip3 install Pillow
3) Sample Results
To generate sample plots below we have generated log files using the instructions in Step 1 and they are already in the logs folder: The vehicle log named '2023-05-03_17_16_58_vehicleOut.txt' and radio logs named '2023-05-03_17_16_58_power_log.txt' and '2023-05-03_17_16_58_quality_log.txt' are used to generate the results below. Downloading the code in Section 1 and running 'main.m' without any modifications should generate the following plots. Once 'main.m' has run, it generates 'input.csv'. Following the instructions above, you can then generate the 'out.kml' file. A screenshot of 'out.kml' file is also shown below.
4) AERPAW Community Workshop (ACW) 2023 Channel Sounder Demo in Lake Wheeler
The logs and the MATLAB code to generate the following results can be downloaded from here. The code is a slightly modified version of the code given above where the TX location and log files are updated to match the actual demo performed. The demo contains a portable node mounted on a rover in a fixed position running 'startGNURadio-ChannelSounder-TX.sh' as the radio application. On the second portable node, mounted on a UAV, we run 'startGNURadio-ChannelSounder-RX.sh' as the radio application and 'startPreplannedTrajectory.sh' as the vehicle application. We used a plan file which can be downloaded from the link for the trajectory of the UAV. Please see the instructions in the first Section on how to run the code to generate the following results.
5) ACW 2023 Channel Sounder Demo in Lake Wheeler: Post-processing in Python and R
An alternative post-processing script that uses Python and R can be found here.
The mergeVehiclePower.py Python script takes the vehicle logs and power logs as input. Because the power logs are much more frequently updated than the position logs, it linearly interpolates between the nearest 2 vehicle locations in time. Then it writes out a csv file named "power_distance_scatter.txt" which just has the distance from the transmitter (as calculated with geopy) and the power. Example usage:
python3 mergeVehiclePower.py -p 2023-05-11_10_40_44_power_log.txt -v 2023-05-11_10_40_44_vehicleOut.txt -d .
The vehicleDistance.py file just takes the vehicle log and calculates a time-series of distance to the transmitter (location defined in the file). This is just a sanity check script mainly. Example usage:
python3 vehicleDistance.py -v 2023-05-11_10_40_44_vehicleOut.txt -d .
The "xy_quantile_regression.r" file takes the mergeVehiclePower.py output csv and performs quantile regression. You can fit it to various models. By default, the script uses a simple log(x) model. The code also includes a non-linear model, but it is commented out. Its tau values still need tuning. Users who know R can use it as a starting point. It also adds intercepts (not fully implemented) and plots the result. The R script generates the following graph.