Add the option to define a custom user motion size
This commit is contained in:
parent
25f88d48ae
commit
4b16857401
3
.gitignore
vendored
3
.gitignore
vendored
@ -41,3 +41,6 @@ gps-sdr-sim-lut
|
||||
|
||||
# Netbeans project folder
|
||||
nbproject/*
|
||||
|
||||
# Last used USER_MOTION_SIZE variable
|
||||
.user-motion-size
|
||||
|
19
Makefile
19
Makefile
@ -6,15 +6,32 @@ all: gps-sdr-sim
|
||||
SHELL=/bin/bash
|
||||
CC=gcc
|
||||
CFLAGS=-O3 -Wall -D_FILE_OFFSET_BITS=64
|
||||
ifdef USER_MOTION_SIZE
|
||||
CFLAGS+=-DUSER_MOTION_SIZE=$(USER_MOTION_SIZE)
|
||||
endif
|
||||
LDFLAGS=-lm
|
||||
|
||||
gps-sdr-sim: gpssim.o
|
||||
${CC} $< ${LDFLAGS} -o $@
|
||||
|
||||
gpssim.o: .user-motion-size
|
||||
|
||||
.user-motion-size: .FORCE
|
||||
@if [ -f .user-motion-size ]; then \
|
||||
if [ "`cat .user-motion-size`" != "$(USER_MOTION_SIZE)" ]; then \
|
||||
echo "Updating .user-motion-size"; \
|
||||
echo "$(USER_MOTION_SIZE)" >| .user-motion-size; \
|
||||
fi; \
|
||||
else \
|
||||
echo "$(USER_MOTION_SIZE)" > .user-motion-size; \
|
||||
fi;
|
||||
|
||||
clean:
|
||||
rm -f gpssim.o gps-sdr-sim *.bin
|
||||
rm -f gpssim.o gps-sdr-sim *.bin .user-motion-size
|
||||
|
||||
time: gps-sdr-sim
|
||||
time ./gps-sdr-sim -e brdc3540.14n -u circle.csv -b 1
|
||||
time ./gps-sdr-sim -e brdc3540.14n -u circle.csv -b 8
|
||||
time ./gps-sdr-sim -e brdc3540.14n -u circle.csv -b 16
|
||||
|
||||
.FORCE:
|
||||
|
16
README.md
16
README.md
@ -18,6 +18,22 @@ to RF using software-defined radio (SDR) platforms, such as
|
||||
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim
|
||||
```
|
||||
|
||||
### Using bigger user motion files
|
||||
|
||||
In order to use user motion files with more than 30000 samples (at 10Hz), the `USER_MOTION_SIZE`
|
||||
variable can be set to the maximum time of the user motion file in seconds. It is advisable to do
|
||||
this using make so gps-sdr-bin can update the size when needed. e.g:
|
||||
|
||||
```
|
||||
$ make USER_MOTION_SIZE=4000
|
||||
```
|
||||
|
||||
This variable can also be set when compiling directly with GCC:
|
||||
|
||||
```
|
||||
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim -DUSER_MOTION_SIZE=4000
|
||||
```
|
||||
|
||||
### Generating the GPS signal file
|
||||
|
||||
A user-defined trajectory can be specified in either a CSV file, which contains
|
||||
|
Loading…
Reference in New Issue
Block a user