question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bearing is initial bearing

See original GitHub issue

The implementation of bearing is about the initial bearing as from cited URL in the sources. IMHO this should be explicitly mentioned in the API. Maybe even implement final bearing as per above URL

For final bearing, simply take the initial bearing from the end point to the start point and reverse it (using θ = (θ+180) % 360).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
DenisCarrierecommented, Mar 5, 2017

I think adding an additional param would work.

This picture was helpful figuring out the difference between intial bearing (29 Deg) & final bearing (150 Deg). image

Proposed JSDocs

/**
 * Takes two {@link Point|points} and finds the geographic bearing between them.
 *
 * @name bearing
 * @param {Feature<Point>} start starting Point
 * @param {Feature<Point>} end ending Point
 * @param {boolean} [final=false] calculates the final bearing if true
 * @returns {number} bearing in decimal degrees
0reactions
DenisCarrierecommented, Mar 8, 2017

We can, since the repo is only 4 lines of code, it might be best to simply use arc as a dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can somebody explain to me the difference between initial ...
It means the direction you are walking in related to a map. When you look on a map and see you are at...
Read more >
Bearing (angle) - Wikipedia
The bearing is expressed in terms of 2 characters and 1 number: first, the character is either N or S; next is the...
Read more >
Derivation of initial bearing calculation - GIS Stack Exchange
I needed to make calculations of the initial bearing between two coordinates described in latitude/longitude. I have found one formulation ...
Read more >
How to Calculate Bearings - mathsathome.com
In mathematics, a bearing is defined as an angle measured clockwise from north. Bearings are usually written as a three-figure bearing. For example,...
Read more >
Initial bearing and final bearing. | Download Scientific Diagram
Initial bearing and final bearing. Source publication. FIG. 1: Our visualization at three ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found