Table of Contents

Generating Aircraft Tracks to Display on Rview with Corresponding Radar Data

In this tutorial we will be using data from the 190725_1757 CapeEx19 flight and KMLB radar data. First, you must have CoPAS repository installed in your home directory with the subsequent ADPAA/src/scripts subdirectories. For more information about this, type in ADPAA or CoPAS in the search bar above.

Within ADPAA there are scripts that allow the user to change/convert file types. In this data flow example, we will be using the script 'convert2acpos' in order to convert our aircraft data (within the .cap file in the respected PostProcessing directory) into a file that is readable by Titan and Rview.

To display radar data on Rview click this link: http://wiki.atmos.und.edu/doku.php?id=atmos:software:lrose:cshrc Then follow this work flow example to get both radar and aircraft track on one Rview display.

Once CoPAS is installed, you must go into the scripts directory:

cd ~/CoPAS/ADPAA/src/scripts/

Now, vim into the file names convert2acpos

vi convert2acpos

Now, in a separate terminal tab go into the PostProcessing directory

cd /nas/und/Florida/2019/Aircraft/CitationII_N555DS/FlightData/20190725_175413/PostProcessing/

Next open the .cap file using cplot2

cplot2 19_07_25_17_54_13.cap

Now, if you hover your mouse over the numerous variables listed in cplot2 you will notice that a full description of that product will appear. Also, notice in that description that a number is shown in the very begining of the description. In order to obtain the AIRCRAFT flight data we will need to know the numbers of the following aircraft variables: Time, POS_Lat, POS_Lon, POS_Alt, POS_Spd.

For the data from 190725_175413 those aircraft variables have the following numbers: 0,5,6,7,8

Now, back into the vim editor, you need to copy the lines from 126 to 131 which is:

if ($F_MNAME eq "Polcast 2012\n") {
$F_TAIL = "N98585";
# Define the output file values for this file.
# Need to pull out time,Latitude,Longitude,Altitude,Ground Speed,Flare BIP, Flare Eject
  @index_values=(0,7,8,12,9,13);
}

Once copied, paste on line 133 (just under the copied lines) and change the following so it matches with the the data you're working with. You will need to change the F_MNAME eq, the F_TAIL, and the @index_values (which are the numbers you found in cplot2. Note: capital letters matter here, also do not worry about the “Flare BIP, Flare Eject” variables and index_values (we do not need them and the script will run with or without them). At the end it should look like this:

if ($F_MNAME eq "CapeEx19\n") {
$F_TAIL = "N555DS";
# Define the output file values for this file.
# Need to pull out time,Latitude,Longitude,Altitude,Ground Speed,Flare BIP, Flare Eject
  @index_values=(0,5,6,7,8);
}

Now save in vim by first hitting ESC on your keyboard and typing in the following:

:wq

In order for the convert2acpos script to run with the modified changes you will need to update svn. In you terminal (still in cd ~/CoPAS/ADPAA/src/scripts/ directory) type:

svn update

A message may pop up because someone else may have made a similar change in that file. Press m for merge files and accept the changes you would like to keep.

Next you need to run the following:

adpaa -b source

Now, you should be able to run the convert2acpos script by calling a .cap file to return a .tit file

cd ~/nas/und/Florida/2019/Aircraft/CitationII_N555DS/FlightData/20190725_175413/PostProcessing/
convert2acpos < 19_07_25_17_54_13.cap > 19_07_25_17_54_13.tit

Check to see if your aircraft data is now in the new file and in the correct format:

vi 19_07_25_17_54_13.tit

Once this is complete, go into your data directory in projDir and create these subdirectories:

cd ~/projDir/data/
mkdir ascii
mkdir spdb
cd ascii
mkdir ac_posn
cd ../spdb
mkdir ac_posn

Next, you need to copy your *.tit file that you just generated into both of the newly created ac_posn subdirectories:

cp ~/nas/und/Florida/2019/Aircraft/CitationII_N555DS/FlightData/20190725_175413/PostProcessing/19_07_25_17_54_13.tit ~/projDir/data/ascii/ac_posn/
cp ~/nas/und/Florida/2019/Aircraft/CitationII_N555DS/FlightData/20190725_175413/PostProcessing/19_07_25_17_54_13.tit ~/projDir/data/spdb/ac_posn/

Once completed, you now need to generate some new params files:

AcPosnAscii2Spdb -print_params > ~/projDir/display/params/AcPosnAscii2Spdb.params
EsdAcIngest -print_params > ~/projDir/display/params/EsdAcIngest.params

Once the new params files are inserted into ~/projDir/display/params/ directory, open AcPosnAscii2Spdb.params in vim:

vi ~/projDir/display/params/AcPosnAscii2Spdb.params

In this params file you need to change the environment variables on lines 67 and 79. Where it says:

LINE 67: input_data_dir = "$(RAP_DATA_DIR)/ascii/ac_posn";
LINE 79: output_data_dir = "$(RAP_DATA_DIR)/spdb/ac_posn";

NOTE: THE TEXT “LINE 67” & “LINE 79” ARE NOT IN THE ACTUAL PARAMS FILE. THEY ARE DISPLAYED ON THIS PAGE FOR CLARITY.

You need to remove the RAP_ on both lines, so now it should look something like this:

LINE 67: input_data_dir = "$(DATA_DIR)/ascii/ac_posn";
LINE 79: output_data_dir = "$(DATA_DIR)/spdb/ac_posn";

Once completed, save and exit out of vim.

Next, we need to do some manipulations on the other params file (EsdAcIngest.params) we generated. Use vim and open up the EsdAcIngest.params file.

vi /projDir/display/params/EsdAcIngest.params

In this params file you need to change the mode on line 64 and the environment variables on lines 503 and 541. Where they say:

LINE 64: mode = REALTIME;
LINE 503: output_url = "$(RAP_DATA_DIR)/spdb/ac_posn";
LINE 541: ascii_url = "$(RAP_DATA_DIR)/spdb/ascii_ac_posn";

NOTE: THE TEXT “LINE 64”, “LINE 503”, & “LINE 541” ARE NOT IN THE ACTUAL PARAMS FILE. THEY ARE DISPLAYED ON THIS PAGE FOR CLARITY.

You need to change the mode to ARCHIVE and remove the RAP_ on lines 503 & 541, so now it should look something like this:

LINE 64: mode = ARCHIVE;
LINE 503: output_url = "$(DATA_DIR)/spdb/ac_posn";
LINE 541: ascii_url = "$(DATA_DIR)/spdb/ascii_ac_posn";

Once completed, save and exit out of vim.

Now, we need to do some manipulations in the Rview_copy.archive file. Open up this file in vim:

vi ~/projDir/display/params/Rview_copy.archive

Once opened in vim, scroll down to line 286 to the Aircraft Position Section. Now, on line 292 where it says:

LINE 292: Rview.ac_posn_archive_dir: $(DATA_DIR)/ascii/ac_posn

Copy and paste that line of code directly under the copied line and comment out the original line and change the new line so it looks like this:

LINE 292: #Rview.ac_posn_archive_dir: $(DATA_DIR)/ascii/ac_posn
LINE 293: Rview.ac_posn_archive_dir: $(DATA_DIR)/spdb/ascii_ac_pos

Next, we need to copy lines 296 through 302 and paste those lines on line 303. We need to comment-out the original copied lines (lines 296 through 302) and manipulate the new pasted lines so it should eventually look like this:

LINE 296: #Rview.ac_posn_back_time_margin: 300
LINE 297: #Rview.ac_posn_n_ident: 3
LINE 298: #Rview.ac_posn_idents: ZJRA ZJRB ZCAN
LINE 299: #Rview.ac_posn_colors: white orange cyan
LINE 300: #Rview.ac_posn_linestyles: 1 100.0 0.0, 1 4.0 2.0, 1 1.0 4.0, 1 1.0 3.0, 1 4.0 1.0
LINE 301: #Rview.ac_posn_max_speed_kts: 250
LINE 302: #Rview.ac_posn_max_bad_points: 2
LINE 303: Rview.ac_posn_n_ident: 1
LINE 304: Rview.ac_posn_idents: N555DS
LINE 305: Rview.ac_posn_colors: white
LINE 306: Rview.ac_posn_linestyles: 1 100.0 0.0, 1 4.0 2.0, 1 1.0 4.0, 1 1.0 3.0, 1 4.0 1.0
LINE 307: Rview.ac_posn_max_speed_kts: 250
LINE 308: Rview.ac_posn_max_bad_points: 2

NOTE: THE LINE NUMBERS ARE NOT IN THE ACTUAL PARAMS FILE. THEY ARE DISPLAYED ON THIS PAGE FOR CLARITY.

Once complete, save and exit out of vim.

Now we need to run AcPosnAscii2Spdb and EsdAcIngest. First, lets run AcPosnAscii2Spdb (for this you need to include a start and end date like so):

AcPosnAscii2Spdb -params ~/projDir/display/params/AcPosnAscii2Spdb.params -start "2019 07 25" -end "2019 07 26"

Now, lets run EsdAcIngest (for this we need to include '-f' and the path to our 19_07_25_17_54_13.tit file like so):

EsdAcIngest -f ~/projDir/data/spdb/ac_posn/19_07_25_17_54_13.tit -params ~/projDir/display/params/EscAcIngest.params

Once completed, there should now be a new subdirectory:

cd ~/projDir/data/spdb/ascii_ac_posn

You should now see that you have new files named:

20190725.data
20190725.indx

Once, you see that you have those two files (plus a few “_latest_data_info.*” files) you can now open Rview to view the radar data as well as your Aircraft Track!

Rview -params ~/projDir/display/params/Rview_copy.archive

On Rview, you will need to go to the time where the plane was airborne (or active) and you should see a white line overlayed on top of your radar data, this is the aircraft track!

Rview Reflectivity (dBZ) Color Scale Manipulation

The following steps allow the user to customize the color scale table which displays Reflectivity (dBZ).

You must first go into the following directory:

 cd ~/projDir/display/color_scale
 

The following file 'dbz_color' contains the information you can manipulate.

vi dbz_color

Rview - How to plot Differential Reflectivity (ZDR)

First thing you must do is go into the Rview params file. On line number 583 you must remove one of the hashtags from the line then add ZDR.

The original line will look like this:

## #fc dBZ mdvp:://$(DATA_HOST)::$(RADAR_CART_DIR) DBZ 720 dbz_color dbz_gray 0.0 100.0 5.0

You must change that line to look something like this:

#fc ZDR mdvp:://$(DATA_HOST)::$(RADAR_CART_DIR) ZDR 720 zdr_color zdr_gray -10.0 10.0 0.1

Save the params file and run Rview pointing to the newly updated params file

Rview -params ~/PATH/TO/PARAMS/FILE

Within the Rview GUI, you can switch between DBZ and ZDR by right clicking the field button on the top ribbon.