Questions tagged [bearing]
122 questions
6
votes
4 answers
android - how can I get the bearing degree between two locations?
As title said, I have current location, and want to know the bearing in degree from my current location to other location. I have read this post, is the value return by location.getBearing() my answer?
Let say it simply: from the picture, I expect…

user3143433
- 157
- 1
- 9
5
votes
2 answers
Bearing between two points
Ive been using the geopy package , which does a great job, however some of the results i get are inconsistant or come with a relatively large displacement, i suspect that the problem resides with my bearing calculation:
def…

242Eld
- 225
- 2
- 5
- 13
5
votes
3 answers
calculating a gps coordinate given a point, bearing and distance
I have a problem which draws my back in some project for some time now.
I'm basically looking to trap a polygon using x, y points drawn by some script I've written.
lat, lon are the center GPS cords of the polygon and I'm looking for its surrounding…

242Eld
- 225
- 2
- 5
- 13
5
votes
2 answers
How to draw a line at a bearing angle in matlab?
I'm trying to simulate the movement of a target in Matlab, whose initial x and y co-ordinates, true bearing and speed (in m/s) are specified. I am wondering if there is a way to simply draw a straight line, at the specified bearing angle to show the…

Bilal Hussain
- 73
- 1
- 6
4
votes
2 answers
Average bearing of a linestring
How can I compute a bearing that represent a non-straight linestring geometry?
For example, Given this linestring:
LINESTRING(-100.06372406847015 25.4583895045113,-95.14184906847015 30.197590679284158,-100.67895844347015…

CuriousDeveloper
- 849
- 2
- 8
- 27
4
votes
1 answer
What scale is initial bearing in returned from Location.distanceBetween()
When calling Location.distanceBetween() and getting the initial and final bearing, what scale is the bearing in? I'm getting negative values, which doesn't make sense to me. Bearing goes from 0 to 360 degrees (relative or absolute, it doesn't…

Turbo
- 2,490
- 4
- 25
- 30
4
votes
2 answers
Given point of (latitude,longitude), distance and bearing, How to get the new latitude and longitude
I found a piece of code on web. It calculates the Minimum bounding rectangle by a given lat/lon point and a distance.
private static void GetlatLon(double LAT, double LON, double distance, double angle, out double newLon, out double newLat)
…

gfan
- 1,027
- 1
- 14
- 28
4
votes
3 answers
How do I get the correct bearing (magnetic orientation) regardless of screen orientation?
I want to get the current magnetic orientation regardless of the current screen orientation (landscape or portrait).
I found this example, but it's not orientation independant, right? And this didn't help me either. I did also read…

felixd
- 383
- 2
- 7
- 20
4
votes
2 answers
Android Location.distanceTo(...) and Location.bearingTo(...) not returning correct results
I've been though dozens of posts on this so please do not flag this as a duplicate because it isn't.
So running the following code:
private void testLocation(){
double currentLat = 51.43376;
double currentLng = -2.86221;
double destLat…

Adam Davies
- 2,742
- 4
- 33
- 52
3
votes
5 answers
Geoalgorithm for finding coordinates of point from a known location by distance and bearing
I'd like to use Google maps static API to display a map with a path overlay indicating a boundary.
AFAICT the static API doesn't support polygons, so I intend to circumvent this by drawing the boundary using paths.
To do this I need to determine the…

Ben Aston
- 53,718
- 65
- 205
- 331
3
votes
1 answer
GMSMapView update camera position so that it will always show direction towards top during navigation
I have used bearing property to rotate camera on mapview and not able to position the camera so that it will always show the navigation towards top.
Below is the screenshot of google map app, which automatically rotate it self during the navigation…

Anand Suthar
- 3,678
- 2
- 30
- 52
3
votes
1 answer
Difference (angle) between two bearings
Using geosphere::bearing I can calculate the bearing of two lines, but is it possible to calculate the angle between the two bearings ?
Of course you can try and subtract or sum up the bearings but in specific cases where one is negative and the…

adl
- 1,390
- 16
- 36
3
votes
2 answers
Bearing calculation in C#
I want to calculate bearing between 2 GPS positions, I foollowed this page recommandations for my algorythm:
public static double Bearing(IPointGps pt1, IPointGps pt2)
{
double x = Math.Cos(pt1.Latitude) * Math.Sin(pt2.Latitude) -…

user6106573
- 193
- 2
- 11
3
votes
0 answers
Android Google Maps - Orientation arrow for the position marker
I'm using Google Map developer, but my position marker doesn't show the orientation or bearing of the calculated position.
Google Map library: compile 'com.google.android.gms:play-services-maps:8.1.0'

Always Wei
- 281
- 2
- 4
3
votes
1 answer
Arrow pointing from a gps position to another not pointing in right direction in JavaScript
I searched a lot on internet and also on stackoverflow, but somehow I cannot seem to get it right! I am trying to get an arrow to point from 1 GPS direction to another.
I have attached a test HTML which exactly explains my problem.
I cannot get the…

Bocaxica
- 3,911
- 3
- 37
- 54