Would it be possible to add an the epoch timestamp along with the duration based mode for ousterFileReader?
3 views (last 30 days)
Show older comments
Would it be possible to add an arguement to allow absolute time in the form of an epoch time to be imported in the ousterFileReader object along with the relative "duration" time?
0 Comments
Answers (1)
Yatharth
on 28 Aug 2023
Hi, I understand that you need an "absoluteTime" property along with already exisiting "Duration" property for "ousterFileReader".
To achieve this, you can modify the ousterFileReader class or create a wrapper class that extends it. Here's an example of how you can implement this:
classdef CustomOusterFileReader < ousterFileReader
properties
absoluteTime % Absolute time in epoch format
end
methods
function obj = CustomOusterFileReader(filename, duration, absoluteTime)
% Call the superclass constructor
obj@ousterFileReader(filename, duration);
% Assign the absolute time property
obj.absoluteTime = absoluteTime;
end
end
end
In this example, we create a new class called CustomOusterFileReader that extends the ousterFileReader class. We add a new property absoluteTime to store the absolute time in epoch format. While creating the object for CustomOusterFileReader you'll need to provide three inputs filename, duration, absoluteTime.
You can also refer to the ousterFileReader documentation and use properties like "StartTime" , "EndTime" they might be useful according to your need.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!