Combining several channels in an output

The output can combine data from different channels.

All sources must be defined at the beginning of the template:

For each record, you need to determine which channel is used, using the primaryDataSource element:

Then for each filed, you can use either one source or the other:

If there is no corresponding data in the second channel at the date of the record in the main one, the previous value is repeated.

If no previous value is available, the field is left blank.

For instance, if the main channel is primary-nav @2Hz and the second channel is GPS @1Hz, you will have this kind of output:

primary-nav 12:00:00.5 48.56789 4.53457 gps

primary-nav 12:00:01.5 48.56789 4.53457 gps

primary-nav 12:00:02.5 48.56789 4.53457 gps 12:00:02.0 48.125716 4.56865

primary-nav 12:00:03.5 48.56789 4.53457 gps 12:00:03.0 48.125716 4.56865

primary-nav 12:00:04.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

primary-nav 12:00:05.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

primary-nav 12:00:06.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

primary-nav 12:00:07.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865