1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #ifndef _ANT_LIST_HPP_
- #define _ANT_LIST_HPP_
- #include <math.h>
- #include <array>
- #include <deque>
- #include <tuple>
- #include <memory>
- #include <algorithm>
- #include "line.h"
- #include "point.h"
- struct path
- {
- line_v m_line;
- double m_slope=0;
- };
- struct algo_config
- {
- const char*desc;
- int min_msg_cnt;
- int best_msg_cnt;
- int min_wait_time;
- int max_wait_time;
- };
- struct ant
- {
- static algo_config g_config[];
- int m_site_id;
- int m_algo; //TOF:0,TDOA:1
- int m_num_dims; //1维:0,2维:1,3维:2
- point m_position;
- std::vector<path> m_path;
- int index()const;
- const algo_config&config()const;
- };
- struct ant_list
- {
- std::vector<ant*> m_ant_list;
- ant*get(uint32_t site_id,uint32_t ant_id)
- {
- return 0;
- }
- void load_from_db()
- {
-
- }
- static ant_list*instance();
- };
- struct client;
- struct site
- {
- std::vector<ant*> m_ant_list;
- std::shared_ptr<client> m_socket;
- };
- struct site_list
- {
- std::vector<site*> m_site_list;
- site*get(uint32_t site_id)
- {
- return 0;
- }
- void load_from_db()
- {
-
- }
- static site_list*instance();
- };
- struct loc_message
- {
- ant* m_ant;
- uint64_t m_num_ticks; //tof时间片或tdoa相对root时间
- loc_message();
- loc_message(ant*a,uint64_t num_ticks)
- :m_ant(a)
- ,m_num_ticks(num_ticks)
- {}
- int tool_index()const;
- };
- #endif
|