-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
30 lines (24 loc) · 975 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Define array photoNames[]
# Every 0.25 seconds:
# Take a photo
# Add it to photoNames[]
# Find diff between now photo and the one before
# Calculate the speed using that
# Add that entry to the dict array
# Have 600*4 iterations happened (600 being 10 minutes in seconds and 4 being the number of iterations per secons) yet?
# If so, break the loop
# Else, find the current time and then wait until the next quarter-second before going back to the top
# Find the average of the data
# Output it as per guidelines
import photoManager
import physicsCalculator
import diffChecker
import finals
import time
data = [] # Within which we have a number of dictionaries, containing the estimatedHeight, estimatedDistance, time, and estimatedSpeed
photoNames = []
for i in range(600*4):
photoNames.append(takePhoto())
if photoNames.length > 2:
distance = findDiff(photoNames[0:], photoNames[1:])
time.sleep(0.25)