Check-in [3022ce9541]

 ```188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 ``` ``` end, Distance_headings_list). reverse_journey(Distance_headings_list) -> %Don't actually need a correctly ordered reverse route, as long as we have directions and distances. lists:map( fun({Distance, Compass_direction}) -> Reverse_direction = Compass_direction + math:pi(), {Distance, Reverse_direction} 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, ``` ``` | > > > > > > > > | < ``` ```188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 ``` ``` end, Distance_headings_list). reverse_journey(Distance_headings_list) -> %Don't actually need a correctly ordered reverse route, as long as we have directions and distances. lists:map( fun({Distance, Heading}) -> %Because can't have functions in guards Pi = math:pi(), Reverse_heading = if Heading < Pi -> Heading + Pi; Heading >= Pi -> Heading - Pi end, Compass_direction = get_compass_direction_for(Reverse_heading), {Distance, Compass_direction} 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, ```