Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | Bug fix - Forgetting than list indexes start at 1
Which means I also need to wrap around the list if I get 16 segments. This means I probably could have just simply added Pi (previous commit) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | origin/master |
Files: | files | file ages | folders |
SHA3-256: |
598ec92c320398994f01864ce8e95fe6 |
User & Date: | base@atomicules.co.uk 2014-12-12 12:49:38 |
2014-12-14
| ||
21:53 | Update README to suit osrm branch check-in: ee1cd9e7e0 user: base@atomicules.co.uk tags: origin/master, trunk | |
2014-12-12
| ||
12:49 |
Bug fix - Forgetting than list indexes start at 1
Which means I also need to wrap around the list if I get 16 segments. This means I probably could have just simply added Pi (previous commit) | |
12:49 |
Commit in haste: Repent at leisure. Fix reverse journey
Had not actually tried out my changes, or, it seems, used my brain at all - Can't simply just add Pi on, need to keep it within 2*Pi limit | |
Changes to headsilose.erl.
︙ | ︙ | |||
205 206 207 208 209 210 211 | end, Distance_headings_list). get_compass_direction_for(Heading) -> %In a way this is a waste of time as could just do headwind, etc based on angles, but since already have some code, why not? Segment = 2*math:pi()/16, | | > | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | end, Distance_headings_list). get_compass_direction_for(Heading) -> %In a way this is a waste of time as could just do headwind, etc based on angles, but since already have some code, why not? Segment = 2*math:pi()/16, Segments = erlang:round(Heading/Segment)+1, Compass = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"], %Handle the case of Segments = 16. Need to wrap around. nth_wrap(Segments, Compass). head_side_or_tail_wind(Direction, [Headwinds, Sidewinds, Tailwinds]) -> [Headwind, Sidewind, Tailwind] = lists:map( fun(Winds) -> lists:member(Direction, Winds) end, |
︙ | ︙ |