Check-in [5c494abd30]

 ```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([_, _, 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). ``` ``` | | ``` ```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). ```