This shows you the differences between two versions of the page.
milestone_3_task_3 [2023/03/02 18:45] scott [ADC Buffer] |
milestone_3_task_3 [2024/03/09 16:18] (current) scott [Demonstration Videos and other Links] |
||
---|---|---|---|
Line 55: | Line 55: | ||
* [[https://www.youtube.com/watch?v=y_XvR_NCjQA|Video Demonstration of Shooter Mode]] | * [[https://www.youtube.com/watch?v=y_XvR_NCjQA|Video Demonstration of Shooter Mode]] | ||
* [[https://www.youtube.com/watch?v=s7QPsCfhY-w|Video Demonstration of Continuous Mode]] | * [[https://www.youtube.com/watch?v=s7QPsCfhY-w|Video Demonstration of Continuous Mode]] | ||
- | * [[https://en.wikipedia.org/wiki/Insertion_sort| Wikipedia page on insertion sort.]] | + | * [[https://en.wikipedia.org/wiki/Insertion_sort|Wikipedia page on insertion sort.]] |
- | * [[https://courses.cs.vt.edu/~csonline/Algorithms/Lessons/InsertionCardSort/index.html|Tutorial of insertion sort using cards.]] | + | |
* [[https://en.wikipedia.org/wiki/Selection_sort|Wikipedia page on selection sort.]] | * [[https://en.wikipedia.org/wiki/Selection_sort|Wikipedia page on selection sort.]] | ||
- | * [[https://courses.cs.vt.edu/csonline/Algorithms/Lessons/SelectionCardSort/selectioncardsort.swf|Tutorial of selection sort using cards.]] | ||
---- | ---- | ||
Line 70: | Line 68: | ||
* lasertag/detector.h | * lasertag/detector.h | ||
* lasertag/main.c | * lasertag/main.c | ||
- | * support/bufferTest.h | + | * lasertag/support/bufferTest.h |
- | * support/bufferTest.c | + | * lasertag/support/bufferTest.c |
- | * support/runningModes.h | + | * lasertag/support/runningModes.h |
- | * support/runningModes.c | + | * lasertag/support/runningModes.c |
You are expected to create and implement the following files. See the provided header files (.h) for a description of each function. | You are expected to create and implement the following files. See the provided header files (.h) for a description of each function. | ||
Line 277: | Line 275: | ||
To pass off your system to the TAs, you must do the following: | To pass off your system to the TAs, you must do the following: | ||
- | - Demonstrate an isolated test of your detector (see instructions for the isolated test below). | + | - Demonstrate an isolated test of your hit detection algorithm (see instructions for the isolated test below). |
- Demonstrate a system test of the entire laser-tag system as implemented thus far (see instructions below regarding shooter and continuous modes). | - Demonstrate a system test of the entire laser-tag system as implemented thus far (see instructions below regarding shooter and continuous modes). | ||
- Run "./check_and_zip.py 390m3-3" to create a .zip file of your project. Submit only one .zip file per team. The TAs will give credit to both members of the team. | - Run "./check_and_zip.py 390m3-3" to create a .zip file of your project. Submit only one .zip file per team. The TAs will give credit to both members of the team. | ||
==== 1. Detector Isolated Test ==== | ==== 1. Detector Isolated Test ==== | ||
- | You will write ''detector_runTest()'' and demonstrate its operation to the TAs. You will also demonstrate your system running in the provided shooter and continuous modes. | + | You will write ''detector_runTest()'' and demonstrate its operation to the TAs. Interrupts are not enabled for this test. |
- | ''detector_runTest()'' will test the detector using the isolated test described below. | + | ''detector_runTest()'' will test your hit detection algorithm following the steps described below. As a suggestion, organize your hit detection algorithm into a local sub function named ''hit_detect()'' so it can be called by the test. This sub function should also be called by ''detector()''. |
=== Isolated Test Details === | === Isolated Test Details === | ||
- | For this test, simply provide power data for the detector by calling ''filter_setCurrentPowerValue()'' for each of the 10 frequencies. Then call ''detector()'', which should retrieve the power values. The isolated test must perform the test upon two sets of data as described below: | + | For this test, simply provide power data for your hit detect function by calling ''filter_setCurrentPowerValue()'' for each of the 10 frequencies. Then call your hit detect function, which should retrieve the power values. The isolated test must perform the test upon two sets of data as described below: |
- | - Create a first set of power data and provide a fudge-factor value that will detect a hit when you invoke ''detector()''. After running ''detector()'', you would invoke ''detector_hitDetected()'' to determine if a hit occurred. | + | - Create a first set of power data (10 calls to ''filter_setCurrentPowerValue()'') and provide a fudge-factor value that will detect a hit when you invoke ''hit_detect()''. After calling ''hit_detect()'', you would invoke ''detector_hitDetected()'' to determine if a hit occurred. |
- | - Create a second set of power data that will not detect a hit when you invoke ''detector()''. Use the same fudge-factor as you used for the first set of data. Again, invoke ''detector_hitDetected()'' to determine if a hit occurred. | + | - Create a second set of power data that will not detect a hit when you invoke ''hit_detect()''. Use the same fudge-factor as you used for the first set of data. Again, invoke ''detector_hitDetected()'' to determine if a hit occurred. |
==== 2. System Demonstration ==== | ==== 2. System Demonstration ==== | ||
- | Add the provided shooter and continuous mode functions using the provided source code. Demonstrate your system in both shooter and continuous mode and show that your system runs the same as the videos: | + | Enable the shooter and continuous mode test functions provided in main.c. Demonstrate your system in both shooter and continuous mode and show that your system runs the same as the videos: |
* [[https://www.youtube.com/watch?v=y_XvR_NCjQA|Video Demonstration of Shooter Mode]] | * [[https://www.youtube.com/watch?v=y_XvR_NCjQA|Video Demonstration of Shooter Mode]] | ||
* [[https://www.youtube.com/watch?v=s7QPsCfhY-w|Video Demonstration of Continuous Mode]] | * [[https://www.youtube.com/watch?v=s7QPsCfhY-w|Video Demonstration of Continuous Mode]] | ||
Line 302: | Line 300: | ||
* Run-time in timerIsr should be 10-20% or less. | * Run-time in timerIsr should be 10-20% or less. | ||
- | Note that the performance values shown below are "ballpark" figures. Don't worry too much if your statistics vary a fair amount from those shown below. These numbers were achieved using -O3 optimization. You can follow this [[https://www.youtube.com/watch?v=osogOHBzlHI|video]] to modify the compiler optimization settings in your SDK. | + | Note that the performance values shown below are "ballpark" figures. Don't worry too much if your statistics vary a fair amount from those shown below. |
The picture shown below is for shooter mode. | The picture shown below is for shooter mode. |