azimuth

How to calculate azimut & elevation relative to a camera direction of view in 3D …?

荒凉一梦 提交于 2020-08-25 07:45:45
问题 I'm rusty a bit here. I have a vector (camDirectionX, camDirectionY, camDirectionZ) that represents my camera direction of view. I have a (camX, camY, camZ) that is my camera position. Then, I have an object placed at (objectX, objectY, objectZ) How can I calculate, from the camera point of view, the azimut & elevation of my object ?? 回答1: The first thing I would do, to simplify the problem, is transform the coordinate space so the camera is at (0, 0, 0) and pointing straight down one of the

Mahony's algorithm - Yaw angle becomes unstable when rotating device fast

寵の児 提交于 2020-01-15 12:23:50
问题 I'm newbie in sensor and IMU so my question is probably very basic for others, but it's already puzzled me for days. I'm using Mahony's algorithm to calculate Euler angle of my device; the three angles looks correct when put the device static or move/rotate the device slowly; however, the Yaw angle will become unstable and incorrect if rotating the device fast. Could someone help me solve this issue ? My device uses MPU-9150, I use the 6 parameters method of Mahony algorithm, that is to say,

R function for position of sun giving unexpected results

谁说胖子不能爱 提交于 2019-12-23 08:58:57
问题 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 results. Given the quality of the answer, I'm almost certain there's something wrong on my end, but I'm asking this question as a record of trying to solve the problem. Here's the code for the function reprinted below for convenience:

How to calculate the Azimuth between two points in PostGIS?

£可爱£侵袭症+ 提交于 2019-12-23 05:17:37
问题 I have a GIS API based on OpenLayers. I have been trying to implement Azimuth calculation in JavaScript and I needed some way to calculate the Azimuth in order to perform tests. I started using PostGIS, but there seem to be many ways to calculate the Azimuth between two points. I show you three of them and, some return different results. -- Example 1 - Result 90 SELECT ST_Azimuth( ST_Transform(st_geomfromtext('POINT(-81328.998084106 7474929.8690234)', 900913), 4326), ST_Transform(st

How do I calculate the Azimuth (angle to north) between two WGS84 coordinates in a single T-SQL query?

一世执手 提交于 2019-12-11 15:22:35
问题 I found the solution for this question in C#, but I can't translate it to a single query T-SQL, since my C# implementation requires branching (if then else). I also found the following C# solution, which could be translated to a single query T-SQL but it doesn't produce the correct results public static double GetAzimuth(WGSCoord c1, WGSCoord c2) { var lat1 = DegToRad(c1.Latitude); var lon1 = DegToRad(c1.Longitude); var lat2 = DegToRad(c2.Latitude); var lon2 = DegToRad(c2.Longitude); return

SensorManager.getRotationMatrix strange behavior

北慕城南 提交于 2019-12-11 08:16:41
问题 I am implementing a compass, getting readings from SensorManager.getRotationMatrix (see code below). I have an imageView that rotates using RotateAnimation . The compass and animation works fine except for one issue: Through the SensorManager.getOrientation I get an array of three values - Azimuth, Pitch and Roll. I only use the array[0] which holds the Azimuth Value If I hold the phone flat and turn it around on the Z axis (azimuth) - it works perfectly. But, the minute I tilt the phone on

Rotate a sphere from coord1 to coord2, where will coord3 be?

余生颓废 提交于 2019-12-11 05:52:19
问题 I have three coordinates (lat,lon) on a sphere. If you would rotate the whole sphere from coord1 to coord2, where will coord3 now be located? I've been trying this out in Python using Great Circle (http://www.koders.com/python/fid0A930D7924AE856342437CA1F5A9A3EC0CAEACE2.aspx?s=coastline) but I create strange results as the newly calculated points all group together at the equator. That must have something to do with the azimuth calculation I assume? Does anyone maybe know how to calculate

Is the Azimuth on the equator equal to the one not on the equator?

穿精又带淫゛_ 提交于 2019-12-10 20:27:18
问题 I am trying to fully understand the concept of Azimuth and I am encountering some inconsistencies (or maybe it is my error). I show you some examples that do not match, hoping somebody can explain me how this really works. I show the coordinates in EPSG:900913, in PostGIS and using my own JavaScript function. MY FUNCTION /* Difference between the two longitudes */ var dLon = lon2 - lon1; /* Y value */ var y = Math.sin(dLon) * Math.cos(lat2); /* X value */ var x = Math.cos(lat1) * Math.sin

Plotrix R package polar.plot symbol overwrite

亡梦爱人 提交于 2019-12-07 11:56:58
问题 I'm using a polar plot to describe satellite position during a time series. The following question uses the polar.plot function from the R package plotrix. An example plot: library(plotrix) polar.plot(c(0,1,3,4),c(30,60,90,120),start=90,clockwise=TRUE,rp.type="s", point.symbols=19,radial.lim=c(0,5),boxed.radial=F) The issues I'm running across is that this function plots the labels and axis over the data values (see radial positions 0 and 3), and I don't see a way to control this behavior. I

Python PyEphem calculation of Azimuth and Altitude

主宰稳场 提交于 2019-12-07 07:28:49
问题 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 azimuth and altitude of an object for a given observer on the 10th August 1998 at 23:10 UT. The following parameters are given: RA = 16 h 41.7 min, DEC = 36 d 28 min The observer's latitude is 52 d 30 min North and longitude 1 d 55 min West. The