Open main menu

DAVE Developer's Wiki β

Changes

Alarm recordings
It is worth mentioning the naming scheme used for the BMP files. From the programming perspective, each frame retrieved from the sensor image is an instance of a class—the application software makes use of the object-oriented programming (OOP) model, in fact. Interestingly, these instances, besides raw pixel data, include a timestamp as well. This timestamp, which has a 20ns resolution, is based on a local clock integrated into the image sensor. Every time a new frame is captured, it is associated with the current value of a free-running counter. This counter is clocked by the aforementioned local clock. That being the case, timestamps are not that useful if taken separately, as they are expressed as an absolute value, which is not related to any usable reference clock. They can be extremely valuable, however, if used as relative quantities, for instance when it comes to determining the elapsed time between two frames. Let's assume that we want to measure the time between two frames (ΔT), say F1 and F2. Let TS1 and TS2 be the associated timestamps respectively. To calculate ΔT expressed in ns, we just need to do (TS2-TS1)x20. An example of the use of such a method is described in [[#Real-timeness and frame dropping|this section]].
When saving the frames as BMP files, the timestamp value would be lost. In order to To avoid losing this information, file names are used to preserve formatted such that timestamps are preserved too. See for example the following list, which refers to an alarm saved triggered on TBDAugust 6th, 2020 at 10:30:08 Central European Summer Time (CEST):
<pre class="board-terminal">
sysadmin@hfrcpoc1-0:/mnt/alarms/2020-08-06_10.30.08_CEST$ ll
-rw-rw-r-- 1 sysadmin sysadmin 2764854 ago 6 10:31 003332_+3.046812160.bmp
</pre>
The name of the subdirectory (<code>2020-08-06_10.30.08_CEST</code>) is self explanatory. File names formatting is a little bit trickier and looks like this:
<pre><progressive counter>_<time offset relative to alarm frame></pre>
<pre class="board-terminal">
sysadmin@hfrcpoc1-0:/mnt/alarms/2020-08-06_10.30.08_CEST$ ls | wc -l
3333
</pre>
4,650
edits