//Marcin
You could include in the function a multiplier to give you whole
numbers, say 100,000 so the above would yield 2 points of 0,0 and
12,10
Is you concern getting numbers that match non-decimal degrees? Or just
getting whole numbers?
ManoM
> > 12,10- Hide quoted text -
>
> - Show quoted text -
scruge : Thanks a lot for the pointers, those are kind of things that
I needed. but now a question is. When I calculate the distance from
the formulas. I got just the distance - and I would like the
coordinates. For instance the first vertice of the first polygon that
Im parsing from KML will be the world pivot. (0,0,0) but what about
next vertice? I can calculate the distance between world pivot and
this vertice, but what about direction that I should move it to with
this distance (in the end I want a location like x,y,z from 0,0,0
world pivot)?.. any ideas on that? I actually do not need the "z"
coordinate so what Im thinking, is that maybe it is possible to find
formulas for calculating latitude and longitude independently and then
make a vertice x - latitude, y - longitude out of it. (it can be done
by using orthogonal projection I think - I dont know is that the
proper name :).
saludos
//Marcin
> > > - Show quoted text -- Hide quoted text -
Function endp // calculate the end point Lat/Long
para f_lt1, f_lg1,f_dst, f_brng // origin Lat / Long
distination's bearing and distance
rlt1=dtor(f_lt1) // convert Lat 1 to radians
rlg1=dtor(f_lg1) // convert Long 1 to radians
rbrng=dtor(f_brng) // convert 360degree bearing to radians
sdst=sin(f_dst) // sine of the distance
cdst=cos(f_dst) // cosine of the distance
slt1=sin(rlt1) // sine of the lat in radians
clt1=cos(rlt1) // cosine of the lat in radians
varlt2=asin(slt1 * cdst + clt1 * sdst * cos(rbrng)) // Lat of
distination once converted from radians back to degrees
varlg2=rlg1 + atn2(sin(rbrng) * sdst * clt1, cdst-slt1 *
sin(varlt2)) // Long of distination once converted from radians back
to degrees
return str(rtod(varlt2),12,7)+","+str(rtod(varlg2),12,7)
On Apr 26, 1:51 pm, laPlaya wrote:
> > > - Show quoted text -- Hide quoted text -
Marcin
Here's a link to my program that maps wireless network's rf signals
using GE's polys.
http://www.rjpi.com/knsgem.htm
Each of the irregular shaped polys requires more than 5000 floating
point calcs each. To draw 2000 such polys and port them to a KML takes
about 10 secs. The slowest part comes when loading them into GE,
which takes nearly a minute.
<grin>
On Apr 28, 8:06 am, laPlaya wrote:
> hey scruge, thanks again for the pointers, I studied the topic deeper
> and here is what i found. The problem is not so simple and actaully
> there is no way to produce maps without distortions these days
> (country size). The most popular is UTM (Universal Transverse
> Mercator) with is an extended version of Mercator projection
> introduced in XVI century. Mercator is a projection of spheroid onto
> Cylinder (the equator areas are almost true, polar areas are
> multiplied by 9:). But for the problem I have - i need a city
> representation - I find old plannar projection most suitable - the
> type is called gnomic projection. I specify the tangent point of
> spheroid with plane as the first coordinate found in KML and use it as
> a world pivot. then I can calculate the cartesian x,y coordinates by
> projecting this areas onto plane. here you can find formulashttp://mathworld.wolfram.com/GnomonicProjection.html. it works really