Altitude & zoom

1,637 views
Skip to first unread message

mrady

unread,
Oct 6, 2010, 5:55:10 AM10/6/10
to Google Maps JavaScript API v3
I need to find out the altitude at specific zoom in maps V3. the
relationship between zoom level and altitude similar to Google earth
indicator directly or indirectly by linking to other utilities. I am
not asking about elevation service but rather altitude of the imagery.
Your help is greatly appreciated

Chad Killingsworth

unread,
Oct 6, 2010, 8:35:38 AM10/6/10
to Google Maps JavaScript API v3
Altitude of the imagery? It's flat. There is no altitude. It's a 2d
map.

Do you mean what altitude a camera would need to encompass the current
view? Because there's a lot more information you'll need in that case
(and a lot of math).

Chad Killingsworth

Rossko

unread,
Oct 6, 2010, 9:00:54 AM10/6/10
to Google Maps JavaScript API v3
> It's flat. There is no altitude. It's a 2d
> map.

To amplify that point, at zoom 0 you can see the whole world. There
is no 'altidude' at which you could get a corresponding view round the
back of the globe.

mrady

unread,
Oct 6, 2010, 11:54:08 PM10/6/10
to Google Maps JavaScript API v3

Chad ,

Yeah , I mean the camera (satellite map V3) similar to google earth
altitude indicator.

I have no choice , it is an obligatory research. I have to go through
math formulation what ever it is.

I know elevation is changing which could mingle altitude calculation
but i do not need high precision at the current time.


Chad , Please give me a hint or titles to help me to proceed.

Rossko ,
Most of the time i work at zooms greater than three to avoid flat map
I have different modules to convert between coordinates and pixels.

The matrices : CBK=POWER(2,ZoomIndex+7) .....
CEK=POWER(2,ZoomIndex)*32/45 .....
CFK=POWER(2,ZoomIndex)*40.7436654315252
CBK[] = {128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536,
131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216,
33554432, 67108864, 134217728, 268435456, 536870912, 1073741824,
2147483648, 4294967296, 8589934592, 17179869184, 34359738368,
68719476736, 137438953472};
CEK[] = {0.7111111111111111, 1.4222222222222223, 2.8444444444444446,
5.688888888888889, 11.377777777777778, 22.755555555555556,
45.51111111111111, 91.02222222222223, 182.04444444444445,
364.0888888888889, 728.1777777777778, 1456.3555555555556,
2912.711111111111, 5825.422222222222, 11650.844444444445,
23301.68888888889, 46603.37777777778, 93206.75555555556,
186413.51111111112, 372827.02222222224, 745654.0444444445,
1491308.088888889, 2982616.177777778, 5965232.355555556,
11930464.711111112, 23860929.422222223, 47721858.844444446,
95443717.68888889, 190887435.37777779, 381774870.75555557,
763549741.5111111};
CFK[] = {40.74366543152521, 81.48733086305042, 162.97466172610083,
325.94932345220167, 651.8986469044033, 1303.7972938088067,
2607.5945876176133, 5215.189175235227, 10430.378350470453,
20860.756700940907, 41721.51340188181, 83443.02680376363,
166886.05360752725, 333772.1072150545, 667544.214430109,
1335088.428860218, 2670176.857720436, 5340353.715440872,
10680707.430881744, 21361414.86176349, 42722829.72352698,
85445659.44705395, 170891318.8941079, 341782637.7882158,
683565275.5764316, 1367130551.1528633, 2734261102.3057265,
5468522204.611453, 10937044409.222906, 21874088818.445812,
43748177636.891624};

Rossko

unread,
Oct 7, 2010, 4:16:48 AM10/7/10
to Google Maps JavaScript API v3
> I have no choice , it is an obligatory research. I have to go through
> math formulation what ever it is.

It's only trigonometry, but you do need more information.
What is the angle of the field of view of your imaginary camera?
Now you can construct and analyse an isoceles triangle with its base
length as the the width of the view, and its apex as the viewer angle.

mrady

unread,
Oct 7, 2010, 5:00:22 AM10/7/10
to Google Maps JavaScript API v3
Rossko , yeah i imagined what you suggested ... i will go through it.
At the moment , i have made an approximate formulae based on
experimentation between google maps and google earth by putting an a
rectangular overlay of google map bounds on google earth screen and
checking the altitude. Even if the approximation has any meaning , I
have to go through what you suggested.

var googleearthaltitude = Math.pow(2.0,25.0-mapzoom)-Math.pow(2.0,21.4-
mapzoom); on zoom range 12->20

I am working on an autonomous aerial vehicle research for my masters
and using google maps and earth in simulation and collecting data but
i haven't reached camera hardware aspects yet.
Grateful to your help

Rossko

unread,
Oct 7, 2010, 7:18:01 AM10/7/10
to Google Maps JavaScript API v3
> I am working on an autonomous aerial vehicle research for my masters

Make sure they are aware of the terms of use for Google Maps and GE,
although I'm sure no-one would be daft enough to use for actual
guidance.

Not sure what you are tasked to acheive, but maybe its a bit
backwards. Maps only comes in integer zoom steps, so you can't
generate an image matching the supposed cameras field of view at
variable altitude. Maps are 2D, so you can't generate an image
representing the cameras field of view unless it is exactly
vertical ... without lots of transformation of tiles, which would
break the terms of use I think.
You could generate a map and overlay or highlight the calculated field
of view on it ; calculating from known altitude (surely any UAV has
onboard altitude?) and known lens angle and orientation.

mrady

unread,
Oct 8, 2010, 5:48:58 AM10/8/10
to Google Maps JavaScript API v3
Sorry for the chatting instinct... thanks for your guidance

My research is supposed to work as an alternative to gps/ imu
directions and barometer altitude in case of failure of these systems
by pointing out viewable waypoints through image processing as
guidance points. I am supposed to figure out an estimate of
altitude(as well as horizon viewpoint) by disparity/parallax stereo or
on motion successive images for the sake of avoiding impact with
buildings. I use Google earth for simulating the process at the
moment. I should not alter anything in satellite images to be
realistic as much as I can. I keep the "Google" trademark all the
times though the algorithms might consider it a group of buildings. I
am not into hardware issues at the moment(I wish i succeed with
mathematical analysis first).
Flight guidance precision(if i reach that far) is not an issue as I
depend on the image not the coordinates. I am not an expert anyway.
And i will check at a latter point how to add a statement of gratitude
to Google for their direct and indirect support to my studies.
Reply all
Reply to author
Forward
0 new messages