Skip to content

going NW returns bearing of 28.11 degrees? #292

@emiltin

Description

@emiltin

start from 1,1 and moving directly northwest (same distance north and west), returns a bearing of 28.11. should it not be 45?

using version 82ead0a.

(perhaps related to #261?)

Failed scenario: Bearing when going northwest
Time: 2012-06-09T10:06:33Z

<?xml version="1.0" encoding="UTF-8"?>
<osm generator="osrm-test" version="0.6">
  <node id="1" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z" lon="1.0" lat="1.0">
    <tag k="name" v="b"/>
  </node>
  <node id="2" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z" lon="1.000899199712256" lat="0.999100800287744">
    <tag k="name" v="a"/>
  </node>
  <way id="3" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z">
    <nd ref="2"/>
    <nd ref="1"/>
    <tag k="highway" v="primary"/>
    <tag k="name" v="ab"/>
  </way>
</osm>

[Scenario: Bearing when going northwest]
accessTag = bicycle
obeyOneways = yes
obeyBollards = no
useRestrictions = yes
takeMinimumOfSpeeds = yes
defaultSpeed = 15
primary = 15
cycleway = 15
footway = 5

Expected: {"from"=>"a", "to"=>"b", "route"=>"ab", "compass"=>"NW", "bearing"=>"45"}
Got: {"from"=>"a", "to"=>"b", "route"=>"ab", "bearing"=>"28.11", "compass"=>"NW"}

Attempt: route
Query: http://localhost:5000/viaroute?loc=0.999100800287744,1.000899199712256&loc=1.0,1.0&output=json&geomformat=cmp
Response: {"version": 0.3,"status":0,"status_message": "Found route between points","route_geometry": "kcbEqnbEsDpD","route_instructions": [["10","ab",140,0,0,"140m","NW",28.11],["15","",0,1,0,"","N",0.0]],"route_summary": {"total_distance":140,"total_time":34,"start_point":"ab","end_point":"ab"},"via_points":[[0.99910,1.00089 ],[1.00000,1.00000 ]],"hint_data": {"checksum":1044404970, "locations": ["AAAAAAEAAABPAQAAAgAAAHxZZ_Og0u8_RoYBAPmGAQA", "AAAAAAEAAAAAAAAAUQEAAAAAAAAAAAAAoIYBAKCGAQC"]},"transactionId": "OSRM Routing Engine JSON Descriptor (v0.3)"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions