The base station receives the data TDOA

The main station receives the node synchronization signal sent by the synchronization, the code is defined as S information. Tag and the node sent the positioning signal, the code signal is defined as T.

Code using interrupts and frame filtering module receives only concerned with their own set of good information, informed by interrupting the top, rather than for a long time in rotation mode.

Reference frame filtering Bowen: https://www.cnblogs.com/tuzhuke/p/10503052.html

Core code base as follows:

1 Enable receive interrupt

dwt_setinterrupt(DWT_INT_RFCG | (DWT_INT_ARFE | DWT_INT_RFSL | DWT_INT_SFDT | DWT_INT_RPHE | DWT_INT_RFCE | DWT_INT_RFTO /*| DWT_INT_RXPTO*/), 1);

2 receives the information and records the time stamp and time stamp own reception information transmitted

Switch (msg_f-> messageData [ 0 ]) 
{ 
    Case  ' S ' :
         // Save SEQ
         // Save RX timestamp 
        last_rx_ts = get_rx_timestamp_u64 (); // Get receiving timestamp 

        // last_rx_ts = 0x123456789A; test number
         // 64-bit into two data shift numbers, for the liquid crystal display 
        l8_timestamp = last_rx_ts & 0xFF ; 
        h32_timestamp = last_rx_ts >> . 8 ; 

        sprintf (lcd_display_str, " % 08X% 02X " , h32_timestamp, l8_timestamp); 
        OLED_ShowString ( 0, . 4 , (uint8_t * ) lcd_display_str); 

        // Toggle the LED indicating successful reception 
        ledValue = ~ ledValue; 
        GPIO_WriteBit (with GPIOA, GPIO_Pin_1 | | GPIO_Pin_2 GPIO_Pin_3, ledValue); 

        // Save DELAYED TX timestamp
         // send information acquired Sync node timestamp
         // information starting position 2, respectively. 6. 5. 4. 3 2 
        last_rx_ts = 0 ; 
        final_msg_get_ts ( & msg_f-> messageData [ 2 ], & last_rx_ts);
         // to shift data into two 64-bit numbers, with to the liquid crystal display 
        l8_timestamp = last_rx_ts & 0xFF ; 
        h32_timestamp = last_rx_ts >>8;

        sprintf(lcd_display_str, "%08X%02X",h32_timestamp,l8_timestamp);
        OLED_ShowString(0,6,(uint8_t *)lcd_display_str);
        break;

The above code simply receiving the transmitted time signal synchronizing node, up through the liquid crystal display, the display contrast and synchronizing node actually needs to be done, there are many, are summarized as follows

The base station 3 receives the logic function

In addition to the above logic portion needs to implement

A. that the principal portion, needs to receive the synchronization signal and the intermediate two successive label positioning can be considered a complete signal received sequence.

For node receives the synchronization signal S, the sequence numbers to be recorded twice before and after the synchronization signal, only the difference between both 1, if packet loss occurs, needs to be discarded

B positioning signal, by the same principle portion, a positioning signal to be clamped in the synchronization signals, but also record the positioning signal sequence.

C after when receiving a synchronization signal S, started to accept start sequence, the next signal to be received positioning signal T, if there is, then the next one of the positioning signals from other nodes T. Finally, the synchronization signal S, a full tag received sequence, through the serial port or a network port to the location engine. The last will also need a synchronization signal as a sequence start.

Guess you like

Origin www.cnblogs.com/tuzhuke/p/11689881.html