Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then we need to add a new plotting layer for the date labels. Using the information above we can build the list of strings we want to show along the track and use the Input Visualiser and Symbol Plotting to define the plot:

Code Block
languagepy
#Read waypoint times from table
#These are seconds elapsed since the middle of the release interval
tt=values(tbl,"time")

#Build the list of date strings to be plotted 
ttLst=nil
for i=1 to count(tt) do
    d=releaseMidDate + second(tt[i])
    ttLst = ttLst & [ "  " & string(d,"dd") & "/" & string(d,"HH")]
end for    

#visualiser
iv_date = input_visualiser(
	   input_plot_type	:	"geo_points",
	   input_longitude_variable	:	mLon,
	   input_latitude_variable	:	mLat	  	  
	)

#line attributes
sym_date=msymb(symbol_type: "text",
         symbol_text_list: ttLst,
         symbol_text_font_size: 0.3,
         symbol_text_font_colour: "navy"
        ) 

...

The macro to use is 'plot_tr_step3.mv'. We will see how this macro works.

First, we read the CSV file using a Table Reader:

Code Block
languagepy
#The input file
dIn="result_tr_single"
inFile=dIn  & "/tr_r1.csv"

#Read table (CSV) data
tbl=read_table(table_filename: inFile,
    table_header_row: "2",
    table_meta_data_rows: "1")

Next

This is a fairly long and advanced macro so we will not examine it here but try to encourage you to open it and study how it works.

Having run the macro you will get a plot The first difference is that we need to determine the middle of the release interval since the trajectory waypoint times are given in seconds elapsed since this date. The release date reading part needs to be modified like this: