Align gps timepulse with the top of the utc second

master
Richard Meadows 2015-06-27 19:16:19 +01:00
rodzic 4dde7ed37c
commit c7d9054c3d
2 zmienionych plików z 22 dodań i 2 usunięć

Wyświetl plik

@ -200,6 +200,22 @@ enum {
UBX_POWERSAVE_OFF = 0,
UBX_POWERSAVE_ON = 1,
};
/**
* UBX TP5 Flags
*/
enum {
UBX_TP5_ENABLE = (1 << 0),
UBX_TP5_LOCK_TO_GPS = (1 << 1),
UBX_TP5_LOCKED_OTHER = (1 << 2),
UBX_TP5_IS_FREQ = (1 << 3),
UBX_TP5_IS_LENGTH = (1 << 4),
UBX_TP5_ALIGN_TO_TOW = (1 << 5),
UBX_TP5_ALIGN_FALLING = (0 << 6),
UBX_TP5_ALIGN_RISING = (1 << 6),
UBX_TP5_USE_GRID_UTC = (0 << 7),
UBX_TP5_USE_GRID_GPS = (1 << 7),
};
/**
* =============================================================================

Wyświetl plik

@ -371,8 +371,12 @@ void gps_set_timepulse_five(uint32_t frequency)
/* Define the settings we want */
ubx_cfg_tp5.payload.tpIdx = 0;
ubx_cfg_tp5.payload.antCableDelay = 50; /* 50 nS */
/* GPS time, duty cyle, frequency, lock to GPS, active */
ubx_cfg_tp5.payload.flags = 0x80 | 0x8 | 0x3;
/* frequency, lock to GPS, active */
ubx_cfg_tp5.payload.flags =
UBX_TP5_ENABLE | UBX_TP5_LOCK_TO_GPS | UBX_TP5_IS_FREQ |
UBX_TP5_ALIGN_RISING | UBX_TP5_USE_GRID_UTC;
ubx_cfg_tp5.payload.freqPeriod = frequency;
ubx_cfg_tp5.payload.pulseLenRatio = 0x80000000; /* 50 % duty cycle*/