This Xcos block allows to easily convert time between different time frames.
This Xcos block allows to easily convert time between different time frames. To configure the blocks choose frame to convert ("Convert from", "Convert to") by writing its abreviation into respective edit box in "Block parameters" dialog. Supported frames are:
Julian time frames are stored as single double value, and caledar date is stored in 6x1 column vector [year;month;day;hour;minute;second]. In case of calendar date being a block input, values are checked according to rules:
Input: Nx1 double (for "Convert from" other than "cal" N = 1, for time frame equal to "cal" N = 6)
Output: Nx1 double (for "Convert to" other than "cal" N = 1, for time frame equal to "cal" N = 6)
Convert from = cjd
Convert to = cal
macros/TIMEFRAME_CONVERSION.sci
macros/AB_timeframe_conversion.sci