Skip to content

Commit

Permalink
Merge pull request #27 from CarletonURocketry/half-minutes
Browse files Browse the repository at this point in the history
Use half minutes and a signed offset for timestamp
  • Loading branch information
AngusJull authored Nov 13, 2024
2 parents 2d0a5ab + 7228e7e commit 22058cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion radio-packet-format/sections/block_formats.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% Some information about block timestamps that will be needed for virtually all blocks
\def\blocktimestampexp{
\paragraph{Measurement Time}
An unsigned 16 bit integer in units of milliseconds. This timestamp is meant to be added as an offset to the base
A signed 16 bit integer in units of milliseconds. This timestamp is meant to be added as an offset to the base
timestamp in the packet header. This is explained in section \ref{sec:pkt-hdr}.
}

Expand Down
14 changes: 7 additions & 7 deletions radio-packet-format/sections/packet_layout.tex
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ \subsection{Packet Header} \label{sec:pkt-hdr}

\paragraph{Timestamp}

This field is an unsigned 16 bit integer representing a number of minutes since power on. This timestamp serves as a
base timestamp to which measurement timestamp offsets are added to.
This field is an unsigned 16 bit integer representing a number of half-minutes since power on. This timestamp serves as
a base timestamp to which measurement timestamp offsets are added to.

For instance, the packet header may contain a value of 1 in this field, indicating the base timestamp is 1 minute since
power on. A subsequent block may be a temperature block with a measurement timestamp field containing the value of 12
For instance, the packet header may contain a value of 1 in this field, indicating the base timestamp is 30 seconds since
power on. A subsequent block may be a temperature block with a measurement timestamp field containing the value of +12
milliseconds. This value is to be added to the packet header field, meaning that the temperature measurement was taken
at 1 minute and 12 milliseconds after power on.
at 30 seconds and 12 milliseconds after power on.

This schema allows millisecond resolution on measurement time, while preserving a maximum mission duration of around
1092 hours, as seen in equation \ref{eq:max-mission-time}
546 hours, as seen in equation \ref{eq:max-mission-time}

\begin{equation} \label{eq:max-mission-time}
\frac{2^{16} - 1}{60} = 1092.25 \\
\frac{2^{16} - 1}{2*60} = 546.125 \\
\end{equation}

\paragraph{Num Blocks}
Expand Down

0 comments on commit 22058cb

Please sign in to comment.