From 482d511058ead125ba5f4173d5c8a8f6b30b93b6 Mon Sep 17 00:00:00 2001 From: gym487 Date: Tue, 12 Jul 2022 08:45:49 +0800 Subject: [PATCH] Fixed the bug that occurs when the location changes rapidly by disabling FLOAT_CARR_PHASE --- gpssim.h | 2 +- socket.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gpssim.h b/gpssim.h index 1f56d7c..2b72c32 100644 --- a/gpssim.h +++ b/gpssim.h @@ -1,7 +1,7 @@ #ifndef GPSSIM_H #define GPSSIM_H -#define FLOAT_CARR_PHASE // For RKT simulation. Higher computational load, but smoother carrier phase. +//#define FLOAT_CARR_PHASE // For RKT simulation. Higher computational load, but smoother carrier phase. #define TRUE (1) #define FALSE (0) diff --git a/socket.c b/socket.c index 8152b5f..262d73f 100644 --- a/socket.c +++ b/socket.c @@ -63,9 +63,9 @@ int udprecv(int s,void *dataa,int siz){ double llhr[3]={39.68,139,76}; void threadrecv(void *p){ - printf("listing\n"); short port=*(short*)p; int s=udpinit(port); + printf("listening on port %d\n",port); while(1){ udprecv(s,llhr,3*sizeof(double)); //printf("%lf%lf%lf\n",llhr[0],llhr[1],llhr[2]);