Heads-I-Lose

Check-in [3a98087e88]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:WIP - 1st attempt at bringing together polyline and OSRM functionality

Compiles, but doesn't yet run.

The general principle is that it will get a previously saved polyline
and convert this into a list of compass headings and distances. It will
then sum up the distances of head, side and tail winds to see which
wins.

For the time being I'm focusing on summing up headwinds only.

Adds the following functions:

- build_list_of_wind_directions

Previously this didn't exist as a standalone function, rather it was
built into the main headsilose routine. Before it was fed with a
direction of travel and based on this it would work out which 16 point
compass headings were head, side or tail winds. Now it needs to work a
bit in reverse (although I haven't made the necessary changes yet - I
don't think1) and instead feed it with the actual wind direction and
it will use this to build the list of head, side and tail winds.

- get_compass_direction_for

Convert an angle into a 16-point compass direction

- head_side_or_tail_wind

Decided whether, for a given direction of heading, it is a head, side
or tailwind. Uses the lists from build_list_of_wind_directions.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk | origin/master
Files: files | file ages | folders
SHA3-256: 3a98087e8802f674bc5eae704f1e0a239150ed2d814e9fa8c5f6162483c90127
User & Date: base@atomicules.co.uk 2014-11-28 20:12:25.000
Context
2014-11-28
21:03
Do head | tail properly

Wasn't thinking straight when I first wrote that, obviously check-in: 5c494abd30 user: base@atomicules.co.uk tags: origin/master, trunk

20:12
WIP - 1st attempt at bringing together polyline and OSRM functionality

Compiles, but doesn't yet run.

The general principle is that it will get a previously saved polyline
and convert this into a list of compass headings and distances. It will
then sum up the distances of head, side and tail winds to see which
wins.

For the time being I'm focusing on summing up headwinds only.

Adds the following functions:

- build_list_of_wind_directions

Previously this didn't exist as a standalone function, rather it was
built into the main headsilose routine. Before it was fed with a
direction of travel and based on this it would work out which 16 point
compass headings were head, side or tail winds. Now it needs to work a
bit in reverse (although I haven't made the necessary changes yet - I
don't think1) and instead feed it with the actual wind direction and
it will use this to build the list of head, side and tail winds.

- get_compass_direction_for

Convert an angle into a 16-point compass direction

- head_side_or_tail_wind

Decided whether, for a given direction of heading, it is a head, side
or tailwind. Uses the lists from build_list_of_wind_directions.
check-in: 3a98087e88 user: base@atomicules.co.uk tags: origin/master, trunk
2014-11-27
19:12
Rename function to something more sensible check-in: 47dd9b33c8 user: base@atomicules.co.uk tags: origin/master, trunk
Changes
Unified Diff Side-by-Side Diff Patch
Changes to headsilose.erl.