Questions tagged [azimuth]

An an angular measurement in a spherical coordinate system.

An azimuth is an angular measurement in a spherical coordinate system. The vector from an observer (origin) to a point of interest is projected perpendicularly onto a reference plane; the angle between the projected vector and a reference vector on the reference plane is called the azimuth.

An example is the position of a star in the sky. The star is the point of interest, the reference plane is the horizon or the surface of the sea, and the reference vector points north. The azimuth is the angle between the north vector and the perpendicular projection of the star down onto the horizon.

Azimuth is usually measured in degrees (°). The concept is used in navigation, astronomy, engineering, mapping, mining and artillery.

Useful Links

113 questions
88
votes
6 answers

Position of the sun given time of day, latitude and longitude

This question has been asked before a little over three years ago. There was an answer given, however I've found a glitch in the solution. Code below is in R. I've ported it to another language, however have tested the original code directly in R to…
SpoonNZ
  • 3,780
  • 1
  • 20
  • 25
9
votes
4 answers

Position of the Sun (azimuth) in Lua

There is only one function in LUA I could find online, but it gives wrong values (measured with professional online tools). It appears that from the sunrise till some time after the noon the math works, but after, the Sun's angle goes back to the…
Edi Budimilic
  • 4,526
  • 3
  • 19
  • 22
7
votes
2 answers

R function for position of sun giving unexpected results

I'd like to calculate the position of the sun given time, latitude, and longitude. I found this great question and answer here: Position of the sun given time of day, latitude and longitude. However, when I evaluate the function I get incorrect…
Tedward
  • 1,652
  • 15
  • 19
7
votes
2 answers

Calculate the date & time given the position of the sun (Azimuth & elevation) and latitude and longitude

Related to this extremely helpful question regarding finding the azimuth & elevation of the sun for a given date, and coordinates. I wish to find the inverse: times & dates the sun will be in that position of the sky. Therefore I am wondering could…
Brian Halpin
  • 169
  • 1
  • 14
6
votes
3 answers

Combine Gyroscope with accelerometer to get heading

I'm using an Android device to get the heading(azimuth, or yaw angle). Android API used the Accelerometer value + the mganetic field to compute a matrix rotation, the azimuth is then extracted form that matrix (aka…
Alexis
  • 1,825
  • 4
  • 23
  • 28
6
votes
2 answers

How to get the compass direction from azimuth on Android

I have to display which direction the user is pointing the Android device. I am using Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD to get the azimuth, pitch, roll. But I am to able to figure out how to get directions (North, south, east ,…
Android_enthusiast
  • 863
  • 5
  • 22
  • 41
6
votes
1 answer

Sensor values of TYPE_ROTATION_VECTOR aren't the same of different devices

I'm using sensor data of type ROTATION_VECTOR in my app. Using my Nexus 5 I can get azimuth from orientation[0] and can get the phones heading in the range shown in the picture below (it's very accurate). Since I've tried my app on different…
5
votes
1 answer

Compare device 3D orientation with the sun position

I am working on an app that requires the user to aim his iPhone to the sun in order to trigger a special event. I can retrieve the device 3D orientation quaternion based on the gyroscope and CoreMotion framework, from this I can get the yaw, roll…
Broco
  • 679
  • 1
  • 4
  • 16
4
votes
1 answer

Which one of these azimuth values is the right one? And why?

First of all, let's make clear that I want the Azimuth on the surface of the Earth, i.e. the angle between two locations, for example New York and Moscow. I am testing some azimuth calculations with my JS functions (shown below). For the points…
joaorodr84
  • 1,251
  • 2
  • 14
  • 33
4
votes
1 answer

Position of the sun given time of day, latitude and longitude in php

This is a php implementation of Josh r code to calculate the position of the sun for a given date and time : This is the corrected code after MvG help : function getSunPosition($lat, $long, $year, $month, $day, $hour, $min) { // From…
iero
  • 401
  • 3
  • 14
4
votes
3 answers

Python PyEphem calculation of Azimuth and Altitude

I am new to PyEphem and I am trying to figure out what it can do and how it works. As I do not want to use it as a black box and blindly trust whatever figure I get, I wanted to recreate an example that is explained here. The example calculates the…
hgus1294
  • 747
  • 14
  • 26
3
votes
1 answer

Limiting camera azimuth angle using OrbitControls

So, im building an architectural visualization with Three.js, and one of the things the user should be able to do is to click on things and orbit around them. The problem is that the camera is able to clip through wall. I fixed that by assigning…
3
votes
1 answer

Pygame Vector2.as_polar() and Vector2.from_polar() methods

Can someone please show me an example of using Vector2.as_polar() to get the distance and azimuthal angle, and then plugging that information back into Vector2.from_polar() to get the cartesian coordinates? Let's suppose we want the distance and…
Joel Castro
  • 485
  • 6
  • 20
3
votes
0 answers

Position of the sun given time of day, latitude and longitude - EDIT

This question has been asked before two times. In 2012, Position of the sun given time of day, latitude and longitude, Josh O'Brien gave a new version of the function sunPosition: sunPosition <- function(year, month, day, hour=12, min=0, sec=0, …
3
votes
0 answers

Pointing to Specific ClLocation Coordinate (Objective-C)

How can we point to a specific location coordinate regardless the device heading.I have tried Haversine Formula to compute bearing between two points and adding device heading to that angle.But still it create issues. -…
1
2 3 4 5 6 7 8