-
Notifications
You must be signed in to change notification settings - Fork 0
/
gps.i
64 lines (59 loc) · 2.3 KB
/
gps.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%module gps
%inline %{
#include <stdio.h>
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <pthread.h>
extern pthread_mutex_t mutex;
extern void gps_init(char *ip, char *port);
extern void gps_finish();
extern void setup_socket();
extern void close_socket();
extern double get_longitude();
extern double get_latitude();
extern double get_height();
extern double get_time();
extern double get_error();
extern u32 socket_read(u8 *buff, u32 n, void *context);
extern void *gps_thread();
extern void sbp_pos_llh_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_baseline_ned_callback(u16 sender_id, u8 len, u8 msg[],
void *context);
extern void sbp_vel_ned_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_dops_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_gps_time_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_imu_raw_callback(u16 sender_id, u8 len, u8 msg[], void *context);
%}
%import "sbp.h"
%import "system.h"
%import "navigation.h"
%import "gps.h"
extern pthread_mutex_t mutex;
extern void gps_init(char *ip, char *port);
extern void gps_finish();
extern void setup_socket();
extern void close_socket();
extern double get_longitude();
extern double get_latitude();
extern double get_height();
extern double get_time();
extern double get_error();
extern u32 socket_read(u8 *buff, u32 n, void *context);
extern void *gps_thread();
extern void sbp_pos_llh_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_baseline_ned_callback(u16 sender_id, u8 len, u8 msg[],
void *context);
extern void sbp_vel_ned_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_dops_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_gps_time_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern void sbp_imu_raw_callback(u16 sender_id, u8 len, u8 msg[], void *context);
extern msg_pos_llh_t pos_llh;
extern msg_baseline_ned_t baseline_ned;
extern msg_vel_ned_t vel_ned;
extern msg_dops_t dops;
extern msg_gps_time_t gps_time;
extern msg_imu_raw_t imu_raw;