android o gps.h,limegps.h

#ifndef _LIMEGPS_H

#define _LIMEGPS_H

#include

#include

#include // at C:\Program Files\PothosSDR\include

#include

#include

#ifdef WIN32

// To avoid conflict between time.h and pthread.h on Windows

#define HAVE_STRUCT_TIMESPEC

#endif

#include // at C:\Program Files\PothosSDR\include

#include "gpssim.h"

#define TX_FREQUENCY 1575420000

#define TX_SAMPLERATE 2500000

#define TX_BANDWIDTH 5000000

#define NUM_BUFFERS32

#define SAMPLES_PER_BUFFER(32 * 1024)

#define NUM_TRANSFERS16

#define TIMEOUT_MS1000

#define NUM_IQ_SAMPLES (TX_SAMPLERATE / 10)

#define FIFO_LENGTH (NUM_IQ_SAMPLES * 2)

// Interactive mode directions

#define UNDEF 0

#define NORTH 1

#define SOUTH 2

#define EAST 3

#define WEST 4

// Interactive keys

#define NORTH_KEY 'w'

#define SOUTH_KEY 's'

#define EAST_KEY 'd'

#define WEST_KEY 'a'

// Interactive mode

#define MAX_VEL 2.7 // 2.77 m/s = 10 km/h

#define DEL_VEL 0.4

#define DEL_TURN 4.5 // 45 deg/s

// Activate gamepad support

//#define USE_GAMEPAD

typedef struct {

char navfile[MAX_CHAR];

char umfile[MAX_CHAR];

int staticLocationMode;

int nmeaGGA;

int iduration;

int verb;

gpstime_t g0;

double llh[3];

int interactive;

int timeoverwrite;

int iono_enable;

} option_t;

typedef struct {

pthread_t thread;

pthread_mutex_t lock;

//int error;

lms_stream_t stream;

int16_t *buffer;

} tx_t;

typedef struct {

pthread_t thread;

pthread_mutex_t lock;

//int error;

int ready;

pthread_cond_t initialization_done;

} gps_t;

typedef struct {

option_t opt;

tx_t tx;

gps_t gps;

int status;

bool finished;

int16_t *fifo;

long head, tail;

size_t sample_length;

pthread_cond_t fifo_read_ready;

pthread_cond_t fifo_write_ready;

double time;

} sim_t;

extern void *gps_task(void *arg);

extern int is_fifo_write_ready(sim_t *s);

#endif

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值