coordinates

MATLAB function to calculate distance between two coordinates (latitude and longitude)

我们两清 提交于 2019-12-08 15:42:52
How can I calculate distance between two world map coordinates (latitude and longitude) using MATLAB R2015a (in meters)? If you don't have access to the MATLAB Mapping toolbox then a simple approximation is to use the Haversine formula. Here is an excerpt from the link: The haversine formula is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical triangles. Here is a MATLAB

Chart.js Radar Labels Coordinates

≡放荡痞女 提交于 2019-12-08 15:31:32
is there any way to get the coordinates for the labels in the radar chart? I'm trying to put images instead of text in the labels area. You can calculate it using the scale property. Here is something that draws a blue circle at those points after the animation completes. onAnimationComplete: function () { for (var i = 0; i < this.scale.valuesCount; i++) { // get the poitn position var pointLabelPosition = this.scale.getPointPosition(i, this.scale.calculateCenterOffset(this.scale.max) + 5); // draw a circle at that point this.chart.ctx.beginPath(); this.chart.ctx.arc(pointLabelPosition.x,

Limiting panning in Google Maps for iOS with Swift

南笙酒味 提交于 2019-12-08 14:33:24
I have seen suggestions for this using JS but not Swift. How can I limit panning to the edges of an overlay image using Google Maps SDK for iOS with swift? I have a map overlay image covering a specific area, and only want the user to be able to pan to the edges of this overlay image. I thought this would be very simple, but apparently not! So if they pan right, and hit the east edge of the overlay image, they can't pan any further in that direction. So far, in the mapController, I have drawn a polygon around the overlay to make sure I know the exact bounds and co-ordinates of that overlay

mouse coordinates for one div displayed in another div - jquery

佐手、 提交于 2019-12-08 13:50:48
问题 So I have 2 divs: <div class="ccc" style="position: relative; left: 100px; top: 50px; width: 200px; height: 150px; border: solid 1px;" oncontextmenu="return false;"></div> <div class="ddd" style="position: relative; left: 200px; top: 100px; width: 100px; height: 40px; border: solid 1px;" oncontextmenu="return false;"></div> http://jsfiddle.net/n8rna/ And I need the following: I need to track the mouse position / movement inside of the div with class="ccc" (coordinates should be relative to

Calculate lat/long/alt values for object with current lat/long/alt + movement on x, y, z [closed]

一曲冷凌霜 提交于 2019-12-08 13:37:15
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I thought there would be plenty of results when searching for this on Google, but it turns out that in most cases, just like here on stackoverflow, the questions are very specific and include Google Maps, some GIS or the real world with elliptical shape. In my case, I have an object

How can I determine if a GPS Coordinate is on or in an Ellipse?

青春壹個敷衍的年華 提交于 2019-12-08 13:28:54
问题 Ok, so I am still new to asking questions on Stack Overflow, so please be nice :) I have an issue that I have been trying to solve for a month now with failed results time and time again. I have found various questions somewhat similar to this, but nothing that has struck me as the definitive answer. The closest that I have found so far is this: Convert GPS coordinates to coordinate plane. In short, what I need is to know is if a GPS Coordinate is either on or inside an ellipse. KNOWNS: Width

Determine coordinates for an object at a specific distance and angle from a point

随声附和 提交于 2019-12-08 13:06:28
In a 2d space, I have an object of coordinates x1 and y1 and it is facing a specific direction , we'll call it "viewer". At start, the angle that measures the object rotation is 0, so the object starts always facing the same way. The angle is measured by a variable called yrot. let D be the distance from the object determined by sqrt ((x1-x2)^2 + (y1-y2)^2), consider this distance known. Now, knowing the viewer coordinates, the D distance and the yrot angle I want to determine the coordinates x2, y2 of the object that is at distance D from the viewer object's face. To clarify this I will add a

Identifying and subsetting data points per variable on concentric circles

♀尐吖头ヾ 提交于 2019-12-08 12:50:20
问题 I have a data frame that looks like this: structure(list(A = c(10, 10, 10, 10, 10, 10), T = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6), X = c(673.05, 672.3, 672.3, 672.3, 667.82, 667.82), Y = c(203.93, 203.93, 203.93, 203.93, 209.16, 209.16 ), V = c(14.79, 14.94, 0, 12.677, 14.94, 14.94)), .Names = c("A", "T", "X", "Y", "V"), row.names = c(NA, 6L), class = "data.frame") Briefly, my data are x,y positions of a specific object (A). I want to subset my data for a specific time (T) in a specific position (X

How to calculate a point on a rotated axis?

天涯浪子 提交于 2019-12-08 12:00:17
问题 How can I calculate a point (X,Y) a specified distance away, on a rotated axis? I know what angle I'd like the point "moving" along (in degrees). 回答1: x = cos(a) * d y = sin(a) * d where a is the angle and d is the distance. If the trigonometry functions takes radians intead of degrees, you have to convert the angle by dividing by 180/pi. 回答2: Convert to polar coordinates and then rotate the point through the angle you want: x = r * cos( theta ); y = r * sin( theta ); Note: theta in radians (

how to fix the wrong coordinates of zoomed canvas in Android

醉酒当歌 提交于 2019-12-08 11:33:42
问题 I have a custom paint_view that extends image_view and is zoommalble with matrix. i set this matrix for canvas and scale it and drag it by this matrix, but after canvas scale or translate, paths or drawable objects were drew in wrong coordinates. i have trid to set the coordinates, but i dont know optimized way to it set. here is my code: public class PaintView extends View { private Path drawPath; private Paint drawPaint; private Paint rect_paint; public boolean zoomMode = false; private