<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello Phil:<br>
This could be the subject of a week-long workshop; but I will tell you how I have been coding it so far, using something that works nicely with DRF as it is today.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When the user tells the system to start data acquisition, the Data Engine is to wait until the exact top of the next second to begin collecting data (plus or minus a few nanoseconds, anyway). Then, the unix time is passed as a uint_32 (unix
 time being an integer second like 1633795200, which is about 4 PM today). I plug that into the global_start_sample in digital_rf_create_write_hdf5 (as modified by sample rate numerator & denominator, which usually work out to 1). This single time stamp is
 used from then on, assuming that the DE clock is totally accurate. I think this is what you describe in your email; I like the simplicity of this, and I hope we can continue to use it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-regards- Bill AB4EJ<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> TangerineSDR <tangerinesdr-bounces@lists.tapr.org>
<b>On Behalf Of </b>Phil Erickson via TangerineSDR<br>
<b>Sent:</b> Tuesday, September 22, 2020 10:13 AM<br>
<b>To:</b> TAPR TangerineSDR Modular Software Defined Radio <tangerinesdr@lists.tapr.org><br>
<b>Cc:</b> Phil Erickson <phil.erickson@gmail.com><br>
<b>Subject:</b> [EXTERNAL] [TangerineSDR] Simple question regarding time stamps<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  Instead of searching through my cluttered inbox, I thought I'd ask a question about time stamps in the PSWS architecture: are these stored as floats/doubles or as integers?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">  I ask because we at Haystack (specifically Ryan Volz) have just run into yet another "doesn't port to architecture XXX" problem / regression test failure with a time stamp stored as a double in a DigitalRF implementation (on a RPi - 32
 vs 64 bit), so I wanted to remind myself of what had been decided here.  Our strong experience is that doing integer time stamps is greatly preferred because it has much less risk and is more future-proof.  Digital RF for example uses integer ratios (M / N)
 for encoding of fractional sample rates for this very reason.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">  I'm sure this has been discussed already, so if someone can point me to the particular place in the spec, that would be great.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">73<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Phil W1PJE<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">----<br>
Phil Erickson<br>
<a href="mailto:phil.erickson@gmail.com" target="_blank">phil.erickson@gmail.com</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>