Timeline for Calculating View Angle
Current License: CC BY-SA 4.0
37 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 11, 2020 at 15:27 | history | edited | CommunityBot |
Commonmark migration
|
|
S Jul 18, 2019 at 14:47 | history | suggested | CommunityBot | CC BY-SA 4.0 |
Duplicate word 'flying' removed.
|
Jul 18, 2019 at 14:08 | review | Suggested edits | |||
S Jul 18, 2019 at 14:47 | |||||
Mar 2, 2019 at 23:45 | comment | added | FSimardGIS | @whuber The vector from the center of the Earth to the reference point does not point exactly in the "up" direction with the ellipsoid. That difference amounts to about 0.2° at most. | |
Apr 13, 2017 at 12:33 | history | edited | CommunityBot |
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
|
|
Aug 8, 2014 at 1:57 | comment | added | mga | @whuber for two points: NYC=(1334003.56795396, -4654044.58312403, 4138298.89186196) and same longitude as NYC but on equator=(1757417.07871627, -6131241.04910298, 0), both at 0m altitude, I get azimuth~=0 and elevation~=-20. Is this correct? It sounds to me like the azimuth should be ~180 since observer in NYC needs to orient herself south? Elevation seems correct since she needs to look somewhat down at the floor? | |
Aug 6, 2014 at 16:23 | comment | added | whuber | That's what I have provided in this answer. | |
Aug 6, 2014 at 16:21 | comment | added | mga | @whuber seems "bearing" refers to "direction tangent to great circle". i'd like the vector that looks "through" earth (for two very far away points). eg: if points are antipodes it would be straight down from observer position towards earth | |
Aug 6, 2014 at 16:03 | comment | added | mga |
@whuber "these equations": Cos(elevation) = (x*dx… | I will Google for 'geodesic bearing between two points on an ellipsoid' then. thanks
|
|
Aug 6, 2014 at 14:01 | comment | added | whuber | @mga I don't understand what you are asking: I don't know which are "these equations" nor do I understand the distinction you are trying to make. This thread explains how to find a direction in space. Other threads explain how to find the geodesic bearing between two points on an ellipsoid (the "inverse problem" in geodesy). That would seem to cover the possibilities. | |
Aug 6, 2014 at 3:32 | comment | added | mga |
@whuber how do these equations affect the superman x-ray example you give? i need exactly that. i tested, with zero altitude, NYC→PIT and i get az=88.4873… el=-2.2919… while NYC→LAX gives az=-86.3087… el=-17.7246… (inputting your examples gives correct values). any ideas?
|
|
Aug 5, 2014 at 16:30 | comment | added | mga |
ok i got the answer for whoever wants to do this (convert lat/lon to cartesian) in the future. uses trac.osgeo.org/proj/wiki/man_cs2cs : cs2cs +proj=latlong +datum=WGS84 +units=m +to +proj=geocent +datum=WGS84 … not knowing the GIS vocabulary is painful
|
|
Aug 5, 2014 at 13:33 | comment | added | mga |
@whuber looking at trac.osgeo.org/proj/wiki/man_cs2cs it seems to me that the cs2cs should allow this?
|
|
Aug 5, 2014 at 13:21 | comment | added | mga | @whuber thanks for the reply. the link seems to mention a GeoTrans package that makes these calculations (could not download, site is down). is there another GDAL/OSGEO/C++ library available to do these calculations? | |
Aug 5, 2014 at 12:07 | comment | added | whuber | @mga No projections are involved in such calculations. Please see gis.stackexchange.com/questions/30448/…, inter alia. | |
Aug 5, 2014 at 3:00 | comment | added | mga |
ok after googling like crazy i found that this is a geodetic to cartesian conversion: apsalin.com/convert-geodetic-to-cartesian.aspx do you know the parameters for proj to do this? i am using ProjAPI: trac.osgeo.org/proj/wiki/ProjAPI
|
|
Aug 1, 2014 at 23:38 | comment | added | mga | these are exactly the equations that I'm looking for. what I have are lat/lon decimal values. how do I convert those to ITRF00? | |
Jun 25, 2013 at 15:51 | comment | added | user66332 | Im not sure what you mean by mixed up x and x'. I have Cos El = (1280979.350171092 * 1814.107561768964 + -4780680.01828508 * -6770.341590916738 + 4009547.9432281763 * -8609.424291037954) / sqrt((1280979.350171092 * 1280979.350171092 + -4780680.01828508 * -4780680.01828508 + 4009547.9432281763 * 4009547.9432281763) * (1814.107561768964 * 1814.107561768964 + -6770.341590916738 * -6770.341590916738 + -8609.424291037954 * -8609.424291037954) | |
Jun 25, 2013 at 0:38 | comment | added | whuber | Your calculations are correct. But you might have mixed up the roles of x and x'; if you did, the cosine of the elevation should be negated and you will obtain an elevation of 90.1384 degrees. | |
Jun 25, 2013 at 0:03 | comment | added | user66332 | Can you help me find the miscalculation? (x,y,z) = (1280979.350171092, -4780680.01828508, 4009547.9432281763) (x',y',z') = (1282793.457732861, -4787450.359875997, 4000938.5189371384) (dx,dy,dz) = (1814.107561768964, -6770.341590916738, -8609.424291037954) Cos El = 0.0024149397184416266 El = 89.86163401186435 (0.1383659881356465) | |
Jun 21, 2013 at 2:30 | comment | added | whuber | The difference between GRS80 and WGS84 is negligible. If you are getting such incorrect answers, it is likely a miscalculation. | |
Jun 20, 2013 at 22:13 | comment | added | user66332 | Sorry to bring this up again but I am running into an issue with this formula. Some lat/lon coordinates at the same altitude are producing positive elevation angles when I believe they should be negative due to the earth curvature. An example is origin at lat/lon/alt(39.2, -75, 0) and destination at lat/lon/alt(39.1, -75, 0) which is producing an elevation angle of 0.138365988. In your response you mentioned using GRS80 and I am using WGS84 but Im not sure that would make a difference. | |
Apr 24, 2013 at 21:45 | comment | added | user66332 | I am looking for the view angle so I will use your formula. Thanks again. | |
Apr 24, 2013 at 21:34 | comment | added | whuber | I thought so: that's a different sense of "azimuth." Vincenty's formula gives the bearing of a geodesic on the ellipsoid from one point to another. You have asked for an "angle of view," which is a three-dimensional direction between the points (and pays no attention to the ellipsoid). The two often will differ slightly. This is more evident when the points are far apart. For instance, if Superman were to use his x-ray vision to see London from New York, he would not jump up in the air and fly exactly in that direction; instead, he would start at a very slight angle from it. | |
Apr 24, 2013 at 21:25 | comment | added | user66332 | Here is a link to the formula: en.wikipedia.org/wiki/Vincenty's_formulae#Inverse_problem | |
Apr 24, 2013 at 21:21 | comment | added | user66332 | I am using an implementation in the Java WorldWind SDK for Vincenty's Formula for Forward Azimuth. An online version at geographiclib.sourceforge.net/cgi-bin/GeodSolve gives the same results. | |
Apr 24, 2013 at 21:09 | comment | added | whuber | I agree that my formula gives 270.313, but exactly what Vincenty formula are you using? | |
Apr 24, 2013 at 21:03 | comment | added | user66332 | Last question, if your example is reworked with the points on the surface (39, -75, 0) and (39, -76, 0), how come the answer does not align with Vincenty's formula? With your formula I get 270.313 and with Vincenty's which is based on an ellipsoid I get 270.315 | |
Apr 24, 2013 at 20:00 | comment | added | whuber | The Wikipedia page clearly is using spherical coordinates (those are just the usual formulas for conversion from spherical to Cartesian coordinates). They will be incorrect for ellipsoidal datums, which is why there is a discrepancy. | |
Apr 24, 2013 at 19:31 | comment | added | user66332 | From the wiki page the vectors are calculated using the following: ` E = (-sinLon, cosLon, 0) N = (-cosLon * sinLat, -sinLon * sinLat, cosLat) U = (cosLon * cosLat, sinLon * cosLat, sinLat)` | |
Apr 24, 2013 at 19:22 | comment | added | user66332 | Are you sure the North vector is calculated correctly? When I compare your East vector to the East vector calculated from the Wiki page, the vectors are the same. They are not the same for the North vector. Wiki north unit vector = -0.16288010267506386, 0.6078768187253738, 0.7771459614569709 Your north unit vector = 0.16221935131335216, 0.6054108610722955, 0.779206372763453 | |
Apr 23, 2013 at 18:34 | vote | accept | user66332 | ||
Apr 23, 2013 at 17:53 | comment | added | whuber | Re the first comment: I have added the azimuth calculation. Re the second comment: thank you for catching that! (It was a manual copying error.) I have fixed it. | |
Apr 23, 2013 at 17:50 | history | edited | whuber | CC BY-SA 3.0 |
added 1915 characters in body
|
Apr 23, 2013 at 17:33 | comment | added | user66332 | Also, in your example, xyz and x'y'z' are the same. | |
Apr 23, 2013 at 17:24 | comment | added | user66332 | Forgive me if I am missing something but I am looking for the Azimuth Angle and Elevation Angle from A to B where the Azimuth Angle is 0 when pointing directly North and positive when pointing East, and the Elevation Angle is negative when pointing down and positive when pointing up. It seems like this provides Elevation angle but how do I calculate the Azimuth? | |
Apr 23, 2013 at 17:05 | history | answered | whuber | CC BY-SA 3.0 |