Skip to content

Commit 82fead7

Browse files
Merge branch 'race-of-a-lifetime' into 'master'
notes and solution code for Race See merge request !2
2 parents 18eada5 + cda0058 commit 82fead7

File tree

3 files changed

+1722
-0
lines changed

3 files changed

+1722
-0
lines changed

race_of_a_lifetime/notes.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
## Overview
3+
Connect with board over serial, send it your coordinates, go somewhere. If you move too fast, you'll be disqualified, if you go to slow, you won't get there in time.
4+
5+
Format:
6+
37.430000 24.980000
7+
37.430000 24.980000
8+
9+
Destination 1:
10+
Delftechpark 49, 2628 XJ Delft, The Netherlands
11+
51.9979258 4.3834606
12+
13+
Binary search speed allowed:
14+
1 degree lat too big
15+
0.9 degrees lat is fine
16+
0.8 degrees lat is fine
17+
0.7 degrees lat is fine
18+
0.4 degrees lat is fine
19+
Looks like I'm allowed 100km/h
20+
21+
Positions are sent in degrees, but:
22+
* It sounds like every message is an "hour".
23+
* A degree of latitude is about 111km.
24+
* A degree of longitude is between 111, and 0, depending on latitude
25+
* The math to determine longitude give latitude is annoying, but easy to find and transcribe...
26+
27+
I got it. Given a mission to South China Sea. Time to go real
28+
Grep for:
29+
```
30+
Location: 30.83 122.81
31+
```
32+
Know that, can take flights from:
33+
CDG, PVG, SFO
34+
35+
CDG: 49.0096906 2.5457305
36+
SFO: 37.6213129,-122.3811494
37+
PVG: 31.1443439,121.806079
38+
39+
So, need to:
40+
- write a semi-interactive tool, takes a destination from me, and goes there
41+
- relays output to me
42+
43+
Rest of the work is done in ``race.rb``
44+

0 commit comments

Comments
 (0)