Commit 74b823c1 authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

Merge branch 'testrasp'

parents 5f7fce4e 4d9e81b4
SRC_DIR=src/
OBJ_DIR=lib/
HDR_DIR=include/
LIB_DIR=./lib/
USR_DIR=usr/
BIN_DIR=bin/
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
OBJ_FILES = $(patsubst $(SRC_DIR)%.cpp,$(OBJ_DIR)%.o,$(SRC_FILES))
USR_FILES = $(wildcard $(USR_DIR)*.cpp)
USR_TARGET = $(patsubst $(USR_DIR)%.cpp,%,$(USR_FILES))
#--------------------------------------
CC=g++
CCFLAGS=-g -lrt -std=c++11 -pthread
EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.SECONDARY:
all: $(USR_TARGET:%=$(BIN_DIR)%)
%: $(BIN_DIR)%
@echo ---- DONE ----
$(BIN_DIR)%: $(USR_DIR)%.cpp $(LIB_DIR)libLogger.so
$(CC) $(CCFLAGS) -no-pie $< -o $@ -I$(HDR_DIR) -L$(LIB_DIR) -Wl,-rpath,"\$$ORIGIN/../$(LIB_DIR)" -lLogger
# $(CC) $(CCFLAGS) $< -o $@ -I$(HDR_DIR) -L$(LIB_DIR) -lLogger
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
$(CC) $(CCFLAGS) -fPIC -c -o $@ $< -I$(HDR_DIR)
$(LIB_DIR)libLogger.so: $(filter-out $(OBJ_DIR)$(EXCL) ,$(OBJ_FILES))
$(CC) $^ -shared -o $@
clean:
rm -f $(BIN_DIR)*
rm -f $(OBJ_DIR)*
rm -f $(LIB_DIR)libLogger.so
Makefile.dynamic
\ No newline at end of file
SRC_DIR=src/
OBJ_DIR=lib/
HDR_DIR=include/
LIB_DIR=./lib/
USR_DIR=usr/
BIN_DIR=bin/
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
OBJ_FILES = $(patsubst $(SRC_DIR)%.cpp,$(OBJ_DIR)%.o,$(SRC_FILES))
USR_FILES = $(wildcard $(USR_DIR)*.cpp)
USR_TARGET = $(patsubst $(USR_DIR)%.cpp,%,$(USR_FILES))
#--------------------------------------
CC=g++
CCFLAGS=-g -lrt -std=c++11 -lpthread
EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.SECONDARY:
all: $(LIB_DIR)libLogger.so $(USR_TARGET:%=$(BIN_DIR)%)
%: $(BIN_DIR)%
@echo ---- DONE ----
$(BIN_DIR)%: $(USR_DIR)%.cpp
$(CC) $(CCFLAGS) -no-pie $< -o $@ -I$(HDR_DIR) -L$(LIB_DIR) -Wl,-rpath,"\$$ORIGIN/../$(LIB_DIR)" -lLogger
# $(CC) $(CCFLAGS) $< -o $@ -I$(HDR_DIR) -L$(LIB_DIR) -lLogger
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
$(CC) $(CCFLAGS) -fPIC -c -o $@ $< -I$(HDR_DIR)
$(LIB_DIR)libLogger.so: $(filter-out $(OBJ_DIR)$(EXCL) ,$(OBJ_FILES))
$(CC) $^ -shared -o $@
clean:
rm -f $(BIN_DIR)*
rm -f $(OBJ_DIR)*
rm -f $(LIB_DIR)libLogger.so
SRC_DIR=./src/
OBJ_DIR=./lib/
HDR_DIR=./include/
USR_DIR=./usr/
BIN_DIR=./bin/
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
OBJ_FILES = $(patsubst $(SRC_DIR)%.cpp,$(OBJ_DIR)%.o,$(SRC_FILES))
USR_FILES = $(wildcard $(USR_DIR)*.cpp)
USR_TARGET = $(patsubst $(USR_DIR)%.cpp,%,$(USR_FILES))
#--------------------------------------
CC=g++
CCFLAGS=-g -lrt -std=c++11 -pthread
EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.SECONDARY:
all: $(USR_TARGET:%=$(BIN_DIR)%)
%: $(BIN_DIR)%
@echo ---- DONE ----
$(BIN_DIR)%: $(filter-out $(OBJ_DIR)$(EXCL) ,$(OBJ_FILES)) $(USR_DIR)%.cpp
$(CC) $(CCFLAGS) -o $(@) $^ -I./include/
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
$(CC) $(CCFLAGS) -c -o $@ $< -I$(HDR_DIR)
clean:
rm $(BIN_DIR)*
rm $(OBJ_DIR)*
# !01<ObsDaq V5.6.0>!01<Apr 1 2017 20:38:27>
# !01SNOD-56A17021
# PROBLEM DESCRIPTION:
# --------------------
# Data is received in blocks of 38 records (see example below). A time lag
# of ~60 ms is observed after each of these blocks until new data arrives.
# INFO:
# -----
# Was running in free-run mode ($01CB) at 640 Hz (dd=92). Internal trigger is
# switched off (#01PP00000000).
# ObsDAQ is connected to laptop via RS485 and RS485-USB converter.
# Time is time of first byte of record arriving at serial port. Serial port is
# noncanonical and provides data as it becomes available. I have carefully
# checked no other part of the code is blocking code execution.
2018 11 09 10 19 41.79071 -0.00417 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.79088 -0.00418 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.79091 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85007 -0.00414 -0.00383 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85009 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85011 -0.00417 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85012 -0.00416 -0.00385 -0.00088 -99999.00 -99999.00
2018 11 09 10 19 41.85014 -0.00416 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85016 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85017 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85019 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85021 -0.00416 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85023 -0.00417 -0.00387 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85024 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85026 -0.00417 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.85028 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85029 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85031 -0.00417 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.85033 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85034 -0.00415 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85036 -0.00416 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85038 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85039 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85041 -0.00416 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.85043 -0.00418 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.85045 -0.00418 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.85046 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85049 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85051 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85054 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85056 -0.00416 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85058 -0.00417 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85060 -0.00417 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85061 -0.00415 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.85063 -0.00418 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85065 -0.00417 -0.00383 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.85067 -0.00416 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.85068 -0.00418 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.85070 -0.00418 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85072 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.85074 -0.00417 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.90968 -0.00419 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.90971 -0.00416 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.90973 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.90974 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.90976 -0.00416 -0.00384 -0.00088 -99999.00 -99999.00
2018 11 09 10 19 41.90978 -0.00415 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.90979 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.90981 -0.00416 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.90983 -0.00416 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.90985 -0.00417 -0.00383 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.90987 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.90989 -0.00417 -0.00386 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.90990 -0.00418 -0.00386 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.90992 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.90994 -0.00415 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.90996 -0.00417 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.90997 -0.00418 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.90999 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91001 -0.00416 -0.00386 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.91003 -0.00419 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.91004 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91006 -0.00415 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91008 -0.00418 -0.00386 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.91009 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91011 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91013 -0.00418 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91014 -0.00418 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.91016 -0.00417 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91018 -0.00417 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91020 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91021 -0.00417 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91023 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91025 -0.00418 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.91027 -0.00417 -0.00387 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 41.91028 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91030 -0.00417 -0.00386 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.91032 -0.00418 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.91034 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96923 -0.00418 -0.00387 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96926 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96927 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96929 -0.00418 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96931 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96932 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96934 -0.00417 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96936 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96938 -0.00418 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96939 -0.00417 -0.00383 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96941 -0.00418 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96943 -0.00419 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96944 -0.00416 -0.00386 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.96946 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96948 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96949 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96951 -0.00417 -0.00383 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96953 -0.00416 -0.00383 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.96955 -0.00417 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.96956 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96958 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96961 -0.00418 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96962 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96964 -0.00418 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.96966 -0.00419 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96968 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96969 -0.00416 -0.00386 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 41.96971 -0.00419 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96973 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96976 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96978 -0.00419 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96980 -0.00416 -0.00383 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96981 -0.00416 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96983 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 41.96985 -0.00418 -0.00386 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 41.96987 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96989 -0.00419 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 41.96990 -0.00417 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02850 -0.00417 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.02852 -0.00417 -0.00384 -0.00095 -99999.00 -99999.00
2018 11 09 10 19 42.02855 -0.00419 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02858 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02861 -0.00415 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02863 -0.00417 -0.00384 -0.00088 -99999.00 -99999.00
2018 11 09 10 19 42.02866 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02868 -0.00417 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02871 -0.00418 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02874 -0.00418 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02876 -0.00416 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02879 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02882 -0.00418 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02884 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02887 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02890 -0.00417 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02893 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02896 -0.00415 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02899 -0.00415 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.02901 -0.00416 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02902 -0.00416 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02904 -0.00418 -0.00383 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02906 -0.00417 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.02908 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02909 -0.00419 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02912 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02915 -0.00415 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02917 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.02919 -0.00418 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02920 -0.00418 -0.00383 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.02922 -0.00414 -0.00383 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.02924 -0.00418 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.02926 -0.00416 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.02928 -0.00416 -0.00386 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.02930 -0.00416 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.02932 -0.00418 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.02934 -0.00416 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.02935 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.08807 -0.00418 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08809 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08810 -0.00417 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08812 -0.00418 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08814 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08815 -0.00416 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.08817 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08819 -0.00418 -0.00385 -0.00088 -99999.00 -99999.00
2018 11 09 10 19 42.08821 -0.00416 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08822 -0.00418 -0.00383 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.08824 -0.00417 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.08826 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.08828 -0.00417 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08829 -0.00416 -0.00384 -0.00088 -99999.00 -99999.00
2018 11 09 10 19 42.08831 -0.00415 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08833 -0.00417 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08834 -0.00418 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.08836 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.08838 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08840 -0.00417 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.08841 -0.00416 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.08843 -0.00417 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.08845 -0.00418 -0.00386 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08847 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08848 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08850 -0.00418 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08852 -0.00418 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08853 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08855 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08857 -0.00418 -0.00386 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.08859 -0.00416 -0.00383 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.08860 -0.00415 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08862 -0.00416 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.08864 -0.00416 -0.00386 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08866 -0.00418 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08867 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.08869 -0.00419 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.08871 -0.00416 -0.00386 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.14737 -0.00417 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14741 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14743 -0.00416 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.14744 -0.00417 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.14746 -0.00417 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14748 -0.00416 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.14750 -0.00415 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14752 -0.00417 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.14754 -0.00416 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.14755 -0.00415 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14757 -0.00417 -0.00383 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14759 -0.00419 -0.00385 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.14761 -0.00417 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.14762 -0.00417 -0.00384 -0.00092 -4.08 -99999.00
2018 11 09 10 19 42.14764 -0.00418 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14766 -0.00416 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14768 -0.00415 -0.00385 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.14770 -0.00417 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14771 -0.00417 -0.00383 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14773 -0.00416 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.14775 -0.00417 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14776 -0.00415 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14778 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14780 -0.00418 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14782 -0.00418 -0.00386 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14783 -0.00416 -0.00385 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.14785 -0.00418 -0.00384 -0.00093 -99999.00 -99999.00
2018 11 09 10 19 42.14787 -0.00417 -0.00384 -0.00092 -99999.00 -99999.00
2018 11 09 10 19 42.14788 -0.00416 -0.00384 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14790 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14792 -0.00417 -0.00385 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14794 -0.00416 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.14796 -0.00416 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.14798 -0.00417 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14799 -0.00419 -0.00385 -0.00091 -99999.00 -99999.00
2018 11 09 10 19 42.14801 -0.00415 -0.00384 -0.00090 -99999.00 -99999.00
2018 11 09 10 19 42.14803 -0.00417 -0.00384 -0.00089 -99999.00 -99999.00
2018 11 09 10 19 42.14805 -0.00416 -0.00386 -0.00091 -99999.00 -99999.00
......@@ -14,14 +14,16 @@ To compile the software package, call 'make' in the directory where the makefile
The structure of folders in this directory is as follows:
/DOC Contains automatically generated documentation
/UML Simple UML diagram (can be viewed with umbrello)
/lib Compiled static library files
/include C++ header files
/src C++ source files
/usr C++ source files for user programs
/bin Contains compiled binaries of user programs
DOCFILE Directives for automatic generation of documentation using doxygen
LICENSE Creative Commons Attribution-NonCommercial 4.0 International License
makefile make directives.
/UML ContainSimple UML diagram (can be viewed with umbrello)
/lib ContainCompiled static library files
/include ContainC++ header files
/src ContainC++ source files
/usr ContainC++ source files for user programs
/bin ContainContains compiled binaries of user programs
DOCFILE ContainDirectives for automatic generation of documentation using doxygen
LICENSE ContainCreative Commons Attribution-NonCommercial 4.0 International License
Makefile.static Make directives using static libraries.
Makefile.dynamic Make directives using dynamic libraries. Not working with RPi3 and Stretch
Makefile Symlink to used makefile.
......@@ -11,7 +11,7 @@
//#include <driver_serial_emulate.hpp>
#include <driver_serial.hpp>
#include <driver_obs.hpp>
#include "Obs_Calibration.hpp"
#include "Obs_Calibration_Vector.hpp"
class Driver_Obs_Serial: protected driver_obs {
......@@ -35,7 +35,7 @@ Driver_Obs_Serial(std::string port, buffer_obs* buffer);
/** Constructor with calibration */
Driver_Obs_Serial(std::string port, buffer_obs* buffer,
Obs_Calibration* cal);
Obs_Calibration_Vector* cal);
/**
* Constructors of derived classes must call [set_term(term,termlen)]
......@@ -83,12 +83,16 @@ int waitanswer(double timeout);
/** Flush the buffer of the serial port. */
virtual int flush();
/** Initialize the instrument with automatic determination of the baud rate */
virtual int set_baud(char* init_chars[], int init_chars_num);
/** Initialize the instrument with automatic determination of the baud rate */
virtual int set_baud(const char* init_chars);
/** Initialize the instrument with given baud rate */
/** Automatic determination of the baud rate */
virtual int find_baud(char* init_chars[], int init_chars_num);
/** Automatic determination of the baud rate */
virtual int find_baud(const char* init_chars);
/** Automatic determination of the baud rate */
virtual int find_baud(Driver_Obs_Serial* context,int(Driver_Obs_Serial::*check_baud)(int));
/** Set given baud rate */
virtual int set_baud(int baud);
/** Check if baud rate is correct */
virtual int check_baud(int baud);
/** Set the termination characters. */
virtual int set_term(const char* term,int termlen);
......
......@@ -2,13 +2,14 @@
#define INCLUDE_OBS_CALIBRATION_VECTOR_HPP_
#include <vector>
#include <string> // String
#include <data_obs_vector.hpp>
#include <data_obs_scalar.hpp>
#include <Obs_Calibration.hpp>
#include <unordered_map>
class Obs_Calibration_Vector: public Obs_Calibration {
class Obs_Calibration_Vector {
//
// Private class variables
......@@ -16,6 +17,9 @@ class Obs_Calibration_Vector: public Obs_Calibration {
private:
/** File for ADC calibration constants */
std::string file_ADC="";
/** The offset */
double offset[3];
/** The scale value */
......@@ -25,6 +29,22 @@ private:
/** Non-zero calibration constants */
char do_cal;
/** ADC calibration constant */
struct adc_cal {
std::string scale="";
std::string offset="";
std::string comment="";
bool operator==(const adc_cal& a) const {
return (scale == a.scale && offset == a.offset);
}
};
/** Map containing the ADC calibration key-value pairs */
std::unordered_map<std::string, struct adc_cal> map_ADC;
/** ADC Offsets */
std::vector<int> adc_offset;
/** ADC scale values */
......@@ -44,6 +64,7 @@ public:
/** Constructor with vector values */
Obs_Calibration_Vector(double* offset, double* scale);
/** Constructor with individual values */
Obs_Calibration_Vector(double scale_X, double scale_Y, double scale_Z,
double offset_X=0, double offset_Y=0, double offset_Z=0);
......@@ -61,11 +82,32 @@ public:
int calibrate(data_obs_scalar* sdata);
/** Get the calibration constants for the ADC */
int get_adc_calibrate(int* offset, int* scale, int config);
int get_adc_calibrate(std::string config, std::string &offset,
std::string &scale);
/** Add a calibration constant for the ADC */
int add_adc_calibrate(int offset, int scale, int config);
/** Add a calibration constant for the ADC */
int add_adc_calibrate(std::string config, std::string offset,
std::string scale, std::string comment);
/** Save the calibration constants to file */
int save_adc_calibrate(std::string filename);
int save_adc_calibrate();
/** Read the calibration constants from file */
int read_adc_calibrate(std::string filename);
int read_adc_calibrate();
/** Parse an ADC calibration line */
int parse_adc_calibration(std::string line,
std::string& config, struct adc_cal& cal);
int parse_adc_calibration(std::string line,
std::string& config, struct adc_cal& cal, std::string& comment);
/** Set the internal ADC calibration file */
int set_adc_calibrate(std::string filename);
/** Get the internal ADC calibration file */
std::string get_adc_calibrate();
};
......
/*
* File: Parameters_Reader.hpp
* Author: mors
*
* Created on October 25, 2018, 11:15 AM
*/
#ifndef PARAMETERS_READER_HPP
#define PARAMETERS_READER_HPP
// C++ headers
#include <string>
#include <unordered_map>
/****************************************************************************
****************************************************************************
*
* This class provides a reader for a simple parameter file.
*
****************************************************************************
***************************************************************************/
class Parameters_Reader {
//
// Private class variables
//
private:
/** Map containing the parameter key-value pairs */
std::unordered_map<std::string, std::string> parMap;
//
// Constructors
//
/** Standard constructor (Initialize with values from parameter file) */
public: Parameters_Reader(std::string filename);
/** Standard constructor */
public: Parameters_Reader();
//
// Public Methods
//
public:
/** Read parameters from file, overwrite existing values */
int read(std::string filename);
/** Search for value from key */
std::string get_str(std::string key);
int get_int(std::string key);
double get_dbl(std::string key);
/** Add a key-value pair */
int add(std::string key, std::string val);
int add(std::string key, int val);
int add(std::string key, double val);
};
#endif /* PARAMETERS_READER_HPP */
......@@ -29,7 +29,7 @@ protected: int day;
protected: int hour;
protected: int min;
protected: int sec;
protected: int msec;
protected: long msec;
//
// Constructors
......@@ -40,7 +40,8 @@ public: data_obs();
/** Copy Constructor */
public: data_obs(data_obs* data);
/** Initialize with given time */
public: data_obs(int year, int mon, int day, int hour, int min, int sec, int msec);
public: data_obs(int year, int mon, int day, int hour, int min, int sec,
long msec);