I have a 4096*4096 image of the Sun.I want to track its latitude and longitude using MATLAB. I have tried the below code. Though it works fine on the axes(latitude=0/90 longitude=0/90), it fails at the edges(for example latitude=30 longitude=90)
x=round((b*s*cos((l*pi)/180))+xC)
y=round((-l*s)+yC)
where x=horizontal displacement
y=vertical displacement
l=latitude
b=longitude
(xC,yC)=center coordinates of the Sun
s=scaling factor.
Thanks in advance
AU
I am plotting all the longitude points for a given latitude. figure 1 is for latitude=0 while figure 2 and 3 are for latitude=45 and -45 respectively.As I increase the latitude the lines become more skew(see figure 4 for latitude = 70).
Please refer the below link for the images: https://drive.google.com/drive/folders/0B2X4xzsGcarCbGM5aVM1UXBRX2M?usp=sharing
I also tried plotting the latitudes for a constant longitude and a similar trend(skewness with increasing longitude) was found.
Related
I am sure there's an easy explanation for this but if I output a coordinate from Google Earth, for example latitude 50.67454277694554, using:
CLLocation2dCoordinate()
to create a coordinate in swift, the terminal output is:
latitude: 50.6745427769455
It's missing the 4 from the end and the point that plots on the map is about 100m from where there Google Earth one was.
Is there some other additional coordinate variable I can set to get the accuracy back?
I have a dxf file of a town in meter coordinates. I need to extract polylines from the map and convert them to geographical coordinates. My idea is to add 3 or 4 points on the map with known coordinates. I will place them using google map as reference. These 3 or 4 points will be placed at intersections roads so I can not place them as they defined a rectangle (I think it would be simpler).
I can not found out what calculation I have to do to convert all the coordinates of the objects of the map.
google map earth radius: 6378137 meter.
so, If I consider 3 points, I will have 3 relations:
(x1,y1) with (lat1, lng1)
(x2,y2) with (lat2, lng2)
(x3,y3) with (lat3, lng3)
I have done one simple conversion with only 2 points but I'd like a more accurate result.
I preferably use c/c++ to do it.
example of one equivalent point:
latitude: -2.148707
longitude: -79.876270
x: 2012078.15
y: 498355.88
It's not a UTM, I verify it from here. Because I do not know if it s a normalized.
I googled a lot, I found libraries, but without knowing if tmy coordinates meet a specific format, I don't think I can use one.
Anyway, thanks to read and I hope someone could help me.
It is not as easy at that. First you need to know which reference ellipsoid you are using (e.g. WGS-84) and then which projection. I wouldn't try to implement this by hand, but use postgis instead, which would do all this ugly work for you.
The correct way is to ask the provider of the file what the coordinate system is related to. dxf is not realy a suitable format. you need a format like ESRI Shp file or mif/mid with a defined geographic coordinate system.
otherwise it is a bit unclear if the data are precise enough, to be used for geographic reference.
However it is not difficult to transform between meters and wgs84 lat longitude, especially if the area is not more than 10-20 miles.
you could use as first try the cylyndrical equidistant transformation, which is only a few lines of simple code. look also if the y-achsis in the dxf file points to the nort pole, otherwise you must find out that amount of false northing and rotate back to north.
MapInfo Professional is a tool with free evaluation period, this tool alows to specify reference points for such unknown coordinate systems. (at least for bitmaps i rememer that feature).
But if you are a professional sw developper, You should reject that file and demand a version in wgs84 lat lon.
In WP7, is it possible to show compass direction based on the given latitude and longitude values. (For example, if I am in India and if the latitude and longitude values of a place in some other country is given). If yes, please give some idea on how to achieve this.
This is what is known as the Second (inverse) geodetic problem.
"Given two points, determine the azimuth and length of the line
(straight line, arc or geodesic) that connects them." Wikipedia
You can get the distance using System.Device.Location.GeoCoordinate.GetDistanceTo(). Otherwise have a look at the excellent C# Geodesy Library for GPS – Vincenty’s Formulae. In particular the GeodeticCurve.
I am working on indexing for multidimensional objects (location based services: long/lat/time for eg.) and experimenting with hilbert curve. The problem is, the java code i have works good upto 64 bits. For example:
value ( long, lat, time ) = H(bits)
if the number of bits > 64 , the algo fails.
So i just need to know what is the feasible range of long and lat values should i consider for real world applications?? Is it : -180 to 180 for longitude and 90 to -90 for latitude??
Thanks
Yeah, it is typical to define longitude to be between -180 and 180 and latitude between -90 and 90 as you said. I have seen the range 0 to 360 for longitude, but no where near as often.
What's important is that you define latitude across a range of 360 degrees and latitude across a range of 180, since that lets you find any point on the earth.
Although I am completely ignorant of hilbert curves and don't know what's involved in your task, I would recommend making sure that you understand that the values of latitude and longitude typically used are geodetic. Latitude is thus the angle that a line normal to the surface of the earth makes against the equatorial plane. This line will not go through the center of the earth unless you are on the equator.
Is there any algorithm that gives the compass direction of a shadow given latitude, longitude, date and time?
(Assuming we are an flat ground and that whatever the shadow falls from stands upright.)
You're looking for the declination and right ascension of the sun at a given time and location. Hit Google.
You tagged this question 'mathematica' so look at AstronomicalData["Sun", ...]