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 setup '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 setup '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 log , [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
Dowload the code above place the [timestamp]_vehicleOut.txt log , [timestamp]_power_log.txt, and [timestamp]_quality_log.txt 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 which generates some plots and also creates input.csv file to be used to generate kml file. In order to generate kml file run
python3 kml_generator.py --input input.csv --output out.kml
The 'out.kml' file can be launched using Google Earth.
Google Earth can be downloaded and installed using this link.
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' is run 'input.csv' is generated and following the instruction above 'out.kml' file can be generated. A screenshot of 'out.kml' file is also shown below.
4) ACW 2023 Channel Sounder Demo in Lake Wheeler
The logs and the MATLAB code to generate the following results can be found in here. The code is 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. In 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. Here we use a simple log(x) function that seems to perform pretty well. In the code commented out is a non-linear model that also looks good, but modifying the tau values on the non-linear function has not worked out yet. If anyone is familiar with R they should be able to make use of this. It also adds a few non-essential things like a sample application requirement and intercepts (not fully implemented) and graphs it. R script generates the following graph.