coordinates

GPS coordinates on mobile phones

拈花ヽ惹草 提交于 2019-12-11 02:27:48
问题 Can GPS on a phone, such as iPhone or Android determine your Z coordinates ? I know it certainly has to be able to determine X and Y, well longitude, latitude that is, but what about the Z coordinates ? Can it determine your height, and can I obtain height relative to ground ? 回答1: Height, as measured by a gps, is relative to the WGS84 ellipsoid. The WGS84 is representative of the field where the gravity is the same, the geoid. Not quite the same as the ground. 回答2: You can determine altitude

How to convert workspace coordinates to screen coordinates?

99封情书 提交于 2019-12-11 02:24:00
问题 I want to convert the workspace coordinates returned by GetWindowPlacement in rcNormalPosition.Left and rcNormalPosition.Top to screen coordinates that I can assign later to MainForm.Left and MainForm.Top . How can I do that ? 回答1: The simplest and cleanest way is to use the API function that partners with GetWindowPlacement , namely SetWindowPlacement. That way you don't need to convert between workspace and screen coordinates because you let the system do the work for you. var

How can I apply the changes to the position of a view after an animation?

孤者浪人 提交于 2019-12-11 00:44:24
问题 I applyed a TranslateAnimation to an EditText with the FillAfter=true in order to keep its position at the end of the animation. The animation works properly but the problem is that I can't enter to the edittext anymore. I think it's due to the fact that the animation affects only the rendering without modifying the actual view coordinates. Is there any possibility to maintain the final coordinates with the edittext normally working? Thanks, Daniele 回答1: Unfotunately the animation only

Buggy UV coordinates of sphere in OpenGL?

匆匆过客 提交于 2019-12-11 00:30:51
问题 I am having buggy texture map on my sphere. The issue is well known but solution is rare. This is my code for generating UVs for a sphere. T = triangles, Nv = vertex normals. for (int i=0; i<nbF; i++) { float tx1 = atan2(Nv[T[i].v1].x, Nv[T[i].v1].z) / (2.0f*M_PI) + 0.5f; float ty1 = asinf(Nv[T[i].v1].y) / M_PI + 0.5f; float tx2 = atan2(Nv[T[i].v2].x, Nv[T[i].v2].z) / (2.0f*M_PI) + 0.5f; float ty2 = asinf(Nv[T[i].v2].y) / M_PI + 0.5f; float tx3 = atan2(Nv[T[i].v3].x, Nv[T[i].v3].z) / (2.0f*M

Create a smooth curve from a series of GPS coordinates

那年仲夏 提交于 2019-12-10 23:58:37
问题 I have looked at a lot of Q/A here on SO regarding similar (if not the same) question I have. Yet none had an answer I was able to understand. I wish to input a series of GPS coordinates, and create a smooth curve that connects them all, and passes through ALL of them. Javascript is my preferred language and I have found this page http://jsdraw2d.jsfiction.com/demo/curvesbezier.htm It allows you to plot any number of points and when clicking the 'Draw Curve' button it does exactly what I want

How to compare the pairs of coordinates most efficiently without using nested loops in Matlab?

扶醉桌前 提交于 2019-12-10 22:57:39
问题 If I have 20 pairs of coordinates, whose x and y values are say : x y 27 182 180 81 154 52 183 24 124 168 146 11 16 90 184 153 138 133 122 79 192 183 39 25 194 63 129 107 115 161 33 14 47 65 65 2 1 124 93 79 Now if I randomly generate 15 pairs of coordinates (x,y) and want to compare with these 20 pairs of coordinates given above, how can I do that most efficiently without nested loops? 回答1: If you're trying to see if any of your 15 randomly generated coordinate pairs are equal to any of your

Android Google Map Polygon click event [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-12-10 21:35:47
问题 This question already has answers here : Polygon Touch detection Google Map API V2 (6 answers) Closed 3 years ago . I am working on a map application on Android and i am using Google Maps Android API V2. I get the polygon data from a web service, convert it by XML parse and can show it on the map without a problem. But isn't there any way to open like pop-up when user touches on any polygon? Or maybe if user wants to change coordinates of selected polygon. I saw many examples, but they are

Android getX/getY interleaves relative/absolute coordinates

让人想犯罪 __ 提交于 2019-12-10 21:34:20
问题 There are a lot of discussions of how MotionEvent.getX/.getY are "unreliable" (or other terms) and that we should use the Raw versions of these calls to get coordinates. On my Nexus 7, I have discovered that .getX/.getY are reliably returning interleaved absolute and relative coordinates. In other words, say a given ACTION_MOVE event returns absolute coordinates when you call .getX and .getY. The next ACTION_MOVE event will then return relative coordinates on its .getX and .getY calls. This

X/Y Coordinates of Click on an Image in a Windows Forms Application (.net)

我的梦境 提交于 2019-12-10 21:06:57
问题 Is there a way to tell what x/y coordinates were clicked in a FORMS application? 回答1: Take a look at the MouseEventArgs class. Specifically the GetPosition method. The example on MSDN is using onMouseMove, but you should be able to do the same with onMouseClick. Or just use the MouseClick event of the form. E.g. using the MouseClick event: On your form: this.MouseClick += new MouseEventHandler(myForm_MouseClick); void myForm_MouseClick(object sender, MouseEventArgs e) { int myX = e.X; int myY

Convert Lat/long to XY

偶尔善良 提交于 2019-12-10 18:06:57
问题 I want to convert lat/long to XY coordinates. I picked up this equation but can't get the desired output: x = r λ cos(φ0) y = r φ The measurements of the two points are: point1 = (-37.8206195, 144.9837765) point2 = (-37.8193712, 144.9837765) Attempt: import math avg = (-37.8206195 + -37.8193712)/2 rad_avg = math.pi / 180 point1 = (-37.8206195, 144.9837765) point2 = (-37.8193712, 144.9837765) dist = rad_avg * math.cos(avg) print(dist) Out: 0.01732592680044846 The output should be around 160m