Fix GPS nav-solve phase seeding for cold PVT
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#ifndef GPS_NAV_PHASE_H
|
||||
#define GPS_NAV_PHASE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gps/gps_ip_defines.h"
|
||||
|
||||
static inline bool gps_nav_phase_control_armed(uint32_t control)
|
||||
{
|
||||
return ((control & (1u << GPS_TRCK_NAV_SOLVE_INTR_EN_POS)) != 0u) &&
|
||||
((control & (1u << GPS_TRCK_NAV_SOLVE_FLAG_EN_POS)) != 0u);
|
||||
}
|
||||
|
||||
static inline bool gps_nav_phase_preserve_seed_after_how(
|
||||
bool previously_seeded,
|
||||
uint32_t control)
|
||||
{
|
||||
return previously_seeded && gps_nav_phase_control_armed(control);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user