summaryrefslogtreecommitdiffstats
path: root/Kod/bilbana/yc4/detect_missed.m
diff options
context:
space:
mode:
Diffstat (limited to 'Kod/bilbana/yc4/detect_missed.m')
-rw-r--r--Kod/bilbana/yc4/detect_missed.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/Kod/bilbana/yc4/detect_missed.m b/Kod/bilbana/yc4/detect_missed.m
new file mode 100644
index 0000000..caad2ac
--- /dev/null
+++ b/Kod/bilbana/yc4/detect_missed.m
@@ -0,0 +1,9 @@
+function [out] = detect_missed( position, segment, track)
+%DETECT_MISSED Retunerar true om position ligger utanför nuvarande segment
+%
+track_len = [2.53 3.05 4.73 7.68 8.98 10.93 14.96 17.57 19.60;
+ 0 0 0 0 0 0 0 0 0 ]; % TODO bana 2
+a = track_len(track, segment);
+out = a <= position;
+end
+