SatCat5
satcat5::ptp::CoeffPII Struct Reference

Detailed Description

Loop-filter coefficients for use with the "ControllerPII" class.

All floating-point calculations can be run at build-time. (This is also based on Stephens & Thomas 1995.)

Definition at line 295 of file ptp_filters.h.

#include <ptp_filters.h>

Public Member Functions

constexpr CoeffPII (double tau_secs)
 Calculate tracking-loop coefficients.
 
 CoeffPII (const CoeffPII &t)=default
 
CoeffPIIoperator= (const CoeffPII &t)=default
 
bool ok () const
 Are all coefficients large enough to mitigate rounding error?
 

Static Public Attributes

static constexpr unsigned SCALE1 = 70
 Fixed-point scaling of each coefficient by 2^-N. More...
 
static constexpr unsigned SCALE2 = 64
 Fixed-point scaling of each coefficient by 2^-N. More...
 
static constexpr unsigned SCALE = SCALE1 + SCALE2
 Fixed-point scaling of each coefficient by 2^-N. More...
 

Static Protected Member Functions

static constexpr double k1 (double tau)
 
static constexpr double k2 (double tau)
 
static constexpr double k3 (double tau)
 
static constexpr double kratio (double tau)
 
static constexpr double fw_gain ()
 

Protected Attributes

u64 kp
 
u64 ki
 
u64 kr
 

Member Data Documentation

◆ SCALE

constexpr unsigned satcat5::ptp::CoeffPII::SCALE = SCALE1 + SCALE2
staticconstexpr

Fixed-point scaling of each coefficient by 2^-N.

Optimized for time constants circa 1-3600 seconds.

Definition at line 314 of file ptp_filters.h.

◆ SCALE1

constexpr unsigned satcat5::ptp::CoeffPII::SCALE1 = 70
staticconstexpr

Fixed-point scaling of each coefficient by 2^-N.

Optimized for time constants circa 1-3600 seconds.

Definition at line 312 of file ptp_filters.h.

◆ SCALE2

constexpr unsigned satcat5::ptp::CoeffPII::SCALE2 = 64
staticconstexpr

Fixed-point scaling of each coefficient by 2^-N.

Optimized for time constants circa 1-3600 seconds.

Definition at line 313 of file ptp_filters.h.


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