This commit is contained in:
gym487 2020-11-13 18:51:36 +08:00
commit 4673325aa7
3 changed files with 9 additions and 7 deletions

View File

@ -15,7 +15,7 @@ to RF using software-defined radio (SDR) platforms, such as
### Building with GCC ### Building with GCC
``` ```
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim $ gcc gpssim.c -lm -lpthread -O3 -o gps-sdr-sim
``` ```
### Realtime by Gnuradio ### Realtime by Gnuradio

View File

@ -1661,10 +1661,10 @@ void usage(void)
" -s <frequency> Sampling frequency [Hz] (default: 2600000)\n" " -s <frequency> Sampling frequency [Hz] (default: 2600000)\n"
" -b <iq_bits> I/Q data format [1/8/16] (default: 16)\n" " -b <iq_bits> I/Q data format [1/8/16] (default: 16)\n"
" -i Disable ionospheric delay for spacecraft scenario\n" " -i Disable ionospheric delay for spacecraft scenario\n"
" -v Show details about simulated channels\n", " -v Show details about simulated channels\n"
" -n <port> Use TCP connect to Gnuradio TCP-Source for\n realtime simulation.\n", " -n <port> Use TCP connect to Gnuradio TCP-Source for\n realtime simulation.\n"
"-w Connect with map server(/mapserver/mapper.py) by udp on port 5678.\n", "-w Connect with map server(/mapserver/mapper.py) by udp on port 5678.\n",
(USER_MOTION_SIZE)/10.0,STATIC_MAX_DURATION); (double)((USER_MOTION_SIZE)/10.0),(int)STATIC_MAX_DURATION);
return; return;
} }
@ -1850,9 +1850,11 @@ int main(int argc, char *argv[])
sscanf(optarg,"%hd",&port); sscanf(optarg,"%hd",&port);
usesocket=true; usesocket=true;
break;
case 'w': case 'w':
staticLocationMode = TRUE; staticLocationMode = TRUE;
webflag=1; webflag=1;
break;
default: default:
break; break;

View File

@ -8,7 +8,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/shm.h> #include <sys/shm.h>
#include <sys/time.h>
@ -57,10 +57,10 @@ int udpinit(short port){
} }
int udprecv(int s,void *dataa,int siz){ int udprecv(int s,void *dataa,int siz){
struct sockaddr from; struct sockaddr from;
return recvfrom(s, dataa, siz, 0,&from,sizeof(from)); return recvfrom(s, dataa, siz, 0,&from,0);
} }
double llhr[3]={39.68,139,76,10}; double llhr[3]={39.68,139,76};
void threadrecv(){ void threadrecv(){
printf("listing\n"); printf("listing\n");