Skip to content

Commit cb48e6a

Browse files
committed
Move the definition of UBX-CFG-TP5 - as suggested in #78
1 parent 8025eba commit cb48e6a

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

Diff for: src/u-blox_structs.h

+35-35
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,41 @@ typedef struct
12061206
UBX_CFG_RATE_data_t *callbackData;
12071207
} UBX_CFG_RATE_t;
12081208

1209+
// UBX-CFG-TP5 (0x06 0x31): Time pulse parameters
1210+
const uint16_t UBX_CFG_TP5_LEN = 32;
1211+
1212+
typedef struct
1213+
{
1214+
uint8_t tpIdx; // Time pulse selection (0 = TIMEPULSE, 1 = TIMEPULSE2)
1215+
uint8_t version; // Message version (0x01 for this version)
1216+
uint8_t reserved1[2];
1217+
int16_t antCableDelay; // Antenna cable delay: ns
1218+
int16_t rfGroupDelay; // RF group delay: ns
1219+
uint32_t freqPeriod; // Frequency or period time, depending on setting of bit 'isFreq': Hz_or_us
1220+
uint32_t freqPeriodLock; // Frequency or period time when locked to GNSS time, only used if 'lockedOtherSet' is set: Hz_or_us
1221+
uint32_t pulseLenRatio; // Pulse length or duty cycle, depending on 'isLength': us_or_2^-32
1222+
uint32_t pulseLenRatioLock; // Pulse length or duty cycle when locked to GNSS time, only used if 'lockedOtherSet' is set: us_or_2^-32
1223+
int32_t userConfigDelay; // User-configurable time pulse delay: ns
1224+
union
1225+
{
1226+
uint32_t all;
1227+
struct
1228+
{
1229+
uint32_t active : 1; // If set enable time pulse; if pin assigned to another function, other function takes precedence.
1230+
uint32_t lockGnssFreq : 1; // If set, synchronize time pulse to GNSS as soon as GNSS time is valid. If not set, or before GNSS time is valid, use local clock.
1231+
uint32_t lockedOtherSet : 1; // If set the receiver switches between the timepulse settings given by 'freqPeriodLocked' & 'pulseLenLocked' and those given by 'freqPeriod' & 'pulseLen'.
1232+
uint32_t isFreq : 1; // If set 'freqPeriodLock' and 'freqPeriod' are interpreted as frequency, otherwise interpreted as period.
1233+
uint32_t isLength : 1; // If set 'pulseLenRatioLock' and 'pulseLenRatio' interpreted as pulse length, otherwise interpreted as duty cycle.
1234+
uint32_t alignToTow : 1; // Align pulse to top of second (period time must be integer fraction of 1s). Also set 'lockGnssFreq' to use this feature.
1235+
uint32_t polarity : 1; // Pulse polarity: 0: falling edge at top of second; 1: rising edge at top of second
1236+
uint32_t gridUtcGnss : 4; // Timegrid to use: 0: UTC; 1: GPS; 2: GLONASS; 3: BeiDou; 4: Galileo
1237+
uint32_t syncMode : 3; // Sync Manager lock mode to use:
1238+
// 0: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, never switch back to 'freqPeriod' and 'pulseLenRatio'
1239+
// 1: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, and switch back to 'freqPeriod' and 'pulseLenRatio' as soon as time gets inaccurate
1240+
} bits;
1241+
} flags;
1242+
} UBX_CFG_TP5_data_t;
1243+
12091244
// TIM-specific structs
12101245

12111246
// UBX-TIM-TM2 (0x0D 0x03): Time mark data
@@ -1849,39 +1884,4 @@ typedef struct
18491884
UBX_HNR_INS_data_t *callbackData;
18501885
} UBX_HNR_INS_t;
18511886

1852-
// UBX-CFG-TP5 (0x06 0x31): Time pulse parameters
1853-
const uint16_t UBX_CFG_TP5_LEN = 32;
1854-
1855-
typedef struct
1856-
{
1857-
uint8_t tpIdx; // Time pulse selection (0 = TIMEPULSE, 1 = TIMEPULSE2)
1858-
uint8_t version; // Message version (0x01 for this version)
1859-
uint8_t reserved1[2];
1860-
int16_t antCableDelay; // Antenna cable delay: ns
1861-
int16_t rfGroupDelay; // RF group delay: ns
1862-
uint32_t freqPeriod; // Frequency or period time, depending on setting of bit 'isFreq': Hz_or_us
1863-
uint32_t freqPeriodLock; // Frequency or period time when locked to GNSS time, only used if 'lockedOtherSet' is set: Hz_or_us
1864-
uint32_t pulseLenRatio; // Pulse length or duty cycle, depending on 'isLength': us_or_2^-32
1865-
uint32_t pulseLenRatioLock; // Pulse length or duty cycle when locked to GNSS time, only used if 'lockedOtherSet' is set: us_or_2^-32
1866-
int32_t userConfigDelay; // User-configurable time pulse delay: ns
1867-
union
1868-
{
1869-
uint32_t all;
1870-
struct
1871-
{
1872-
uint32_t active : 1; // If set enable time pulse; if pin assigned to another function, other function takes precedence.
1873-
uint32_t lockGnssFreq : 1; // If set, synchronize time pulse to GNSS as soon as GNSS time is valid. If not set, or before GNSS time is valid, use local clock.
1874-
uint32_t lockedOtherSet : 1; // If set the receiver switches between the timepulse settings given by 'freqPeriodLocked' & 'pulseLenLocked' and those given by 'freqPeriod' & 'pulseLen'.
1875-
uint32_t isFreq : 1; // If set 'freqPeriodLock' and 'freqPeriod' are interpreted as frequency, otherwise interpreted as period.
1876-
uint32_t isLength : 1; // If set 'pulseLenRatioLock' and 'pulseLenRatio' interpreted as pulse length, otherwise interpreted as duty cycle.
1877-
uint32_t alignToTow : 1; // Align pulse to top of second (period time must be integer fraction of 1s). Also set 'lockGnssFreq' to use this feature.
1878-
uint32_t polarity : 1; // Pulse polarity: 0: falling edge at top of second; 1: rising edge at top of second
1879-
uint32_t gridUtcGnss : 4; // Timegrid to use: 0: UTC; 1: GPS; 2: GLONASS; 3: BeiDou; 4: Galileo
1880-
uint32_t syncMode : 3; // Sync Manager lock mode to use:
1881-
// 0: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, never switch back to 'freqPeriod' and 'pulseLenRatio'
1882-
// 1: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, and switch back to 'freqPeriod' and 'pulseLenRatio' as soon as time gets inaccurate
1883-
} bits;
1884-
} flags;
1885-
} UBX_CFG_TP5_data_t;
1886-
18871887
#endif

0 commit comments

Comments
 (0)