Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 8329e63

Browse files
author
Dmitry Tatarinov
committed
Correct per review
1 parent 4c1b826 commit 8329e63

File tree

3 files changed

+245
-249
lines changed

3 files changed

+245
-249
lines changed

include/libswiftnav/nav_msg_glo.h

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,34 @@
2020

2121
/** Time mark in GLO nav string, GLO ICD, pg. 16 */
2222
#define GLO_TM (0x3E375096)
23+
/** Length of GLO time mark */
2324
#define GLO_TM_LEN 30
2425

26+
/* States of receiver GLO bitstream */
2527
typedef enum {
2628
INVALID = -1,
27-
SYNC_TM,
28-
GET_DATA_BIT
29-
} glo_decode_machine;
29+
SYNC_TM, /**< Time mark search */
30+
GET_DATA_BIT /**< Data bit receive */
31+
} glo_receive_machine;
3032

33+
/* The structure is used for GLO receive and decode bitstream */
3134
typedef struct {
32-
u32 string_bits[NAV_MSG_GLO_STRING_BITS_LEN];
33-
u32 tm_buff;
34-
u16 current_head_bit_index;
35-
u8 next_string_id;
36-
u8 meander_bits_cnt;
37-
u8 manchester;
38-
glo_decode_machine state;
35+
u32 string_bits[NAV_MSG_GLO_STRING_BITS_LEN]; /**< buffer for one GLO string */
36+
u16 current_head_bit_index; /**< how many bits written into GLO string buffer*/
37+
u16 nt; /**< tmp container for TOE calculation */
38+
u8 next_string_id; /**< what is the next string we need for parsing */
39+
u8 n4; /**< tmp container for TOE calculation */
40+
u8 hrs; /**< tmp container for TOE calculation */
41+
u8 min; /**< tmp container for TOE calculation */
42+
u8 sec; /**< tmp container for TOE calculation */
43+
glo_receive_machine state; /**< current state of receiver */
44+
u8 meander_bits_cnt:2; /**< counter for line code bits, MAX is 2 */
45+
u8 manchester:2; /**< 2 bits line code received */
3946
} nav_msg_glo_t;
4047

4148
void nav_msg_init_glo(nav_msg_glo_t *n);
4249
s8 process_string_glo(nav_msg_glo_t *n, ephemeris_t *e);
43-
u32 extract_word_glo(const nav_msg_glo_t *n, u16 bit_index, u8 n_bits); //TODO: remove after tests
50+
u32 extract_word_glo(const nav_msg_glo_t *n, u16 bit_index, u8 n_bits);
4451
s8 nav_msg_update_glo(nav_msg_glo_t *n, bool bit_val);
4552

4653
#endif /* LIBSWIFTNAV_NAV_MSG_GLO_H */

0 commit comments

Comments
 (0)