rasProject_01 / weSweetHome  R. 240
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
dcf77recPerData_t Struct Reference

Data for one received DCF77 AM period. More...

#include <weDCF77.h>

Data Fields

uint32_t cbTic
 The system tick at second's start (notation). More...
 
uint32_t per
 The period's duration. More...
 
char sysClk [14]
 The system time as text hh:mm:ss.mmm at second's start. More...
 
uint32_t tic
 The GpioD time tick. More...
 
uint32_t tim
 The modulation's duration. More...
 

Detailed Description

Data for one received DCF77 AM period.

: __ _ _
:.......______| |________| |_________| ::.....
: `a `b `c

This structure holds the minimal values of one received DCF77 modulation period, i.d. amplitude 15% from a to b and full modulation from b to c = next a.
Nothing is said about a correct timing signal or a receiver module error or EMI.

Field Documentation

◆ tic

uint32_t tic

The GpioD time tick.

This is the tick (see get_current_tick()) at point a, i.e. begin of 15% AM. get_current_tick() is a unsigned 32 bit μs counter wrapping around about every 72 min.
For a correct modulation signal this marks a second's begin.
As described at dcf77recPerData_t::per, with lower grade AM receiver modules it may also mark the beginning of a non filtered spike.

The current uint32_t tick is got by get_current_tick(int pi). It can be used in user to calculate how far in past the the last received DCF77 second's start is.
delay = get_current_tick(::thePi) - recStruc.tic
will work even when the unsigned 32 bit tick wraps around about every 72 min.

◆ sysClk

char sysClk[14]

The system time as text hh:mm:ss.mmm at second's start.

In fact it is the time when the call back function for start of 15% AM is called.

◆ cbTic

uint32_t cbTic

The system tick at second's start (notation).

In fact it is the time when the call back function for start of 15% AM is called. By the event to callback delay cbTic should be later than tic.

◆ tim

uint32_t tim

The modulation's duration.

This is the time from point a to b in μs. With a correct signal this difference is the length of the transmitted serial bit. Ideally it would be either 100000μs for logical 0 respectively FALSE or 200000μs for logical 1 respectively TRUE.

◆ per

uint32_t per

The period's duration.

This is the time from point a to c in μs. This difference is the full period. Ideally it would be either 1000000μs for seconds 0 to 57 and 2000000μs for the seconds 58 and 59 combined. In the case of a leap second the numbers would be 0 to 58 and 59 and 60.

Hence this variable's value is the real source of all information, like start of minute and the serial telegram.

For real world DCF77 AM receivers one will see a wide range instead of these ideal numbers. Additionally, lower grade receivers (the Pollin module being the most prominent of them) will insert false ON periods. Sometimes those "spikes" affect a third of all seconds. Additionally some seconds will be infected by more than one spike.

Obviously, without some filtering one would never get sensible information from lower grade modules or conditions.
For the very first one or two receptions (after registering the receive call back, usually dcf77receiveRec) this value and dcf77recPerData_t::tim will be wrong.


The documentation for this struct was generated from the following file: