From a177ec446598382b91cabbce032aa580badffe70 Mon Sep 17 00:00:00 2001 From: frydaddy07 Date: Fri, 27 Nov 2015 10:06:26 -0500 Subject: Positioning Work. Very Important MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I figured out how to track a robot’s orientation regardless of position or how many turns it has done. This is based on the fact that orientation is entirely dependent on how far the wheels have turned. When the distance is equal, the orientation is the same as the start. when the distance is different, we can observe and measure a the degree to which the difference has affected orientation by factoring in the track (distance between wheels, also radius of the curved path). Using this information, I built some pseudo code that should provide the ability to estimate position with an unknown accuracy. --- Nate's Position Testing/Shooter Testing/Makefile | 69 ++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Nate's Position Testing/Shooter Testing/Makefile (limited to 'Nate's Position Testing/Shooter Testing/Makefile') diff --git a/Nate's Position Testing/Shooter Testing/Makefile b/Nate's Position Testing/Shooter Testing/Makefile new file mode 100644 index 0000000..5d6b7fc --- /dev/null +++ b/Nate's Position Testing/Shooter Testing/Makefile @@ -0,0 +1,69 @@ +# Universal C Makefile for MCU targets + +# Path to project root (for top-level, so the project is in ./; first-level, ../; etc.) +ROOT=. +# Binary output directory +BINDIR=$(ROOT)/bin +# Subdirectories to include in the build +SUBDIRS=src + +# Nothing below here needs to be modified by typical users + +# Include common aspects of this project +-include $(ROOT)/common.mk + +ASMSRC:=$(wildcard *.$(ASMEXT)) +ASMOBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(ASMSRC:.$(ASMEXT)=.o)) +HEADERS:=$(wildcard *.$(HEXT)) +CSRC=$(wildcard *.$(CEXT)) +COBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(CSRC:.$(CEXT)=.o)) +CPPSRC:=$(wildcard *.$(CPPEXT)) +CPPOBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(CPPSRC:.$(CPPEXT)=.o)) +OUT:=$(BINDIR)/$(OUTNAME) + +.PHONY: all clean upload _force_look + +# By default, compile program +all: $(BINDIR) $(OUT) + +# Remove all intermediate object files (remove the binary directory) +clean: + -rm -f $(OUT) + -rm -rf $(BINDIR) + +# Uploads program to device +upload: all + $(UPLOAD) + +# Phony force-look target +_force_look: + @true + +# Looks in subdirectories for things to make +$(SUBDIRS): %: _force_look + @$(MAKE) --no-print-directory -C $@ + +# Ensure binary directory exists +$(BINDIR): + -@mkdir -p $(BINDIR) + +# Compile program +$(OUT): $(SUBDIRS) $(ASMOBJ) $(COBJ) $(CPPOBJ) + @echo LN $(BINDIR)/*.o $(LIBRARIES) to $@ + @$(CC) $(LDFLAGS) $(BINDIR)/*.o $(LIBRARIES) -o $@ + @$(MCUPREFIX)size $(SIZEFLAGS) $(OUT) + $(MCUPREPARE) + +# Assembly source file management +$(ASMOBJ): $(BINDIR)/%.o: %.$(ASMEXT) $(HEADERS) + @echo AS $< + @$(AS) $(AFLAGS) -o $@ $< + +# Object management +$(COBJ): $(BINDIR)/%.o: %.$(CEXT) $(HEADERS) + @echo CC $(INCLUDE) $< + @$(CC) $(INCLUDE) $(CFLAGS) -o $@ $< + +$(CPPOBJ): $(BINDIR)/%.o: %.$(CPPEXT) $(HEADERS) + @echo CPC $(INCLUDE) $< + @$(CPPCC) $(INCLUDE) $(CPPFLAGS) -o $@ $< -- cgit v1.2.3