hello.
first, my english skill is not good. sorry…
anyway i want to convert lat/lon to unity x,y coordinates.
i already read some another questions but not solved…
i made c# script to get the gps data and it works well.
i also made a object in the unity world, and made another c# script to control camera rotation with gyro.
and!! last!!
i just want to move my unity camera according to gps lat/lon data.
so i convert my lat/lon data.
like this page
https://stackoverflow.com/questions/32311647/converting-gps-coordinates-to-x-y-z-coordinates
but, my camera is not moved as i wanted.
problem is this.
lat, lon is correct, but converted data(x/z) is incorrect.
float latToZ (double lat){
lat = (lat - 53.178469) / 0.00001 * 0.12179047095976932582726898256213;
double z = lat;
return (float)z;
}
float lonToX (double lon){
lon = (lon - 6.503091) / 0.000001 * 0.00728553580298947812081345114627;
double x = lon;
return (float)x;
}
i think in this function, the equation is little wrong…
please someone make me know how can i convert that.
thanks and have a good day