Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Do head | tail properly
Wasn't thinking straight when I first wrote that, obviously |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | origin/master |
Files: | files | file ages | folders |
SHA3-256: |
5c494abd30c131f2e926ced19d81089f |
User & Date: | base@atomicules.co.uk 2014-11-28 21:03:09 |
Context
2014-11-28
| ||
21:29 |
Make use of atan2 unsigned
Hadn't realised it returns negative numbers. check-in: 0fe524de48 user: base@atomicules.co.uk tags: origin/master, trunk | |
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 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 - 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, sidecheck-in: 3a98087e88 user: base@atomicules.co.uk tags: origin/master, trunk | |
Changes
Changes to headsilose.erl.
︙ | ︙ | |||
149 150 151 152 153 154 155 | lists:map(fun(X) -> nth_wrap(Index+X, Compass) end, WindList) end, [HeadwindList, SidewindList, TailwindList]). | | | | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | lists:map(fun(X) -> nth_wrap(Index+X, Compass) end, WindList) end, [HeadwindList, SidewindList, TailwindList]). convert_lats_longs_to_distance_heading([_Head1 | [ _Head2 | Rest]]) -> %All co-ords are diff, so just ignore first two convert_lats_longs_to_distance_heading_(Rest, []). convert_lats_longs_to_distance_heading_([Lat | [Lon | Rest]], List_distance_headings) -> %Want to map through the list convert co-ords to distance and heading Distance = math:sqrt(math:pow(Lat,2) + math:pow(Lon,2)), Heading = math:atan2(Lon, Lat), Compass_direction = get_compass_direction_for(Heading), convert_lats_longs_to_distance_heading_(Rest, [{Distance, Compass_direction}]++List_distance_headings); convert_lats_longs_to_distance_heading_([], List_distance_headings) -> lists:reverse(List_distance_headings). |
︙ | ︙ |