Add TimeSeries to ETF format
For the LSAT project we'd like to plot additional data such as robot position, velocity, acceleration, etc., next to the Gantt chart. Specifying these arbitrary shaped data using Signals is not efficient, therefore this proposal to extend the ETF format with a new element TimeSeries.
TimeSeries have the following requirements:
- data element in a TimeSeries are connected by a line in a plot
- multiple series (e.g., velocity-x and velocity-y) can be plotted in one plot
- a legend shows the mapping of colors to data-series
- TimeSeries can be filtered (similar to Signals)
Hereby a first proposal for the new format:
Each TimeSeries consists of one mandatory line starting with a TS
tag, followed by one or more series which start with TSS
tag followed by lines with TSP
or TSR
tags:
-
TS
to start a TimeSeries and give attributes such as a name -
TSS
defines a series within a TimeSeries and its attributes such as name and color and the renderer (e.g. step, linear, or spline) -
TSP
to provide the data points of a TimeSeries as a space-separated list. Each element consists of a comma-separated tuple of a timestamp and a data point -
TSR
to define a time range (start:step:end) and a data element for each time-step as a space-separated list
The TS line specifies a TimeSeries identifier (unique within the TimeSeries of the trace), and a number of attributes for the TimeSeries. A TSS line has a TimeSeries identifier that specifies the TimeSeries it belongs to, followed by a series identifier. The TSP and TSR lines have a TimeSeries and series identifier they belong to, followed by the data points, either as a set of points or as a range.
Example:
TS 1 ; name=Robot-1 velocity
TSS 1 1 ; name=velocity plot X,color=red
TSP 1 1 0.3,0.4 0.4,0.5 0.5,0.6
TSP 1 1 1.7,0.6 1.8,0.8 1.9,1.0 2.0,1.2
TSS 1 2 ; name=velocity plot Y,color=blue
TSP 1 2 0.0,0.0 1.0,0.0
TSR 1 2 1.1:0.1:2.0 0.2 0.4 0.6 0.6 0.5 0.4 0.3 0.2 0.1 0.0
Note that it is possible to specify multiple TSP or TSR lines for one series (TSS tag). These segments should not overlap in time and should be consecutive when parsing an ETF file from top to bottom. The last value in a TSD or TSR line is connected in the plot to the first element in the next TSD or TSR line with the same TimeSeries and series identifiers.