yq.wang | 99db6f5 | 2024-09-12 01:58:48 -0700 | [diff] [blame] | 1 | #ifndef _8122_AGNSS_H_ |
| 2 | #define _8122_AGNSS_H_ |
| 3 | //#define PYTHON_SUPPORT 1 |
| 4 | |
| 5 | typedef enum { |
| 6 | HD_EPH_INJECT_STATUS_SUCCESS, |
| 7 | HD_EPH_INJECT_STATUS_FAIL, |
| 8 | HD_EPH_INJECT_STATUS_WAIT_RETURN |
| 9 | } hd_eph_inject_status_type; |
| 10 | |
| 11 | typedef struct { |
| 12 | uint16_t year; //2000 ~ 0xffff |
| 13 | uint8_t month; // 1 ~ 12 |
| 14 | uint8_t day; //1 ~ 31 |
| 15 | uint8_t hour; // 0 ~ 24 |
| 16 | uint8_t min; // 0 ~ 60 |
| 17 | uint8_t second; // 0 ~ 60 |
| 18 | }HD_AGNSS_UTC_TIME_TYPE; |
| 19 | |
| 20 | /** |
| 21 | * @brief AGNSS星历注入、位置注入、时间注入。星历、位置、时间可选择性注入。 |
| 22 | * @param eph_file_path:从服务器下载的星历数据文件路径;若无则填NULL |
| 23 | |
| 24 | latitude:纬度,乘以10^7;若无则填0 |
| 25 | longitude:经度,乘以10^7;若无则填0 |
| 26 | altitude:高程,浮点,单位为m;若无则填0 |
| 27 | accuracy:精度;若无则填0 |
| 28 | |
| 29 | UTC_time:UTC时间;若无则填NULL |
| 30 | * @retval void |
| 31 | **/ |
| 32 | int hd_agnss_inject(const char *eph_file_path, int32_t latitude, int32_t longitude, float altitude, float accuracy, /****latitude和longitude由double型乘以10^7得到*****/ |
| 33 | HD_AGNSS_UTC_TIME_TYPE *UTC_time); |
| 34 | |
| 35 | |
| 36 | void hd_set_gnss_dev_fd(int fd); |
| 37 | |
| 38 | int hd_eph_inject_result_check(const uint8_t *pack, int pack_len); |
| 39 | |
| 40 | void hd_set_eph_inject_status(hd_eph_inject_status_type status); |
| 41 | |
| 42 | hd_eph_inject_status_type hd_get_eph_inject_status(void); |
| 43 | |
| 44 | #endif |
| 45 | |