I suppose the best way to
understand KML is to look at a
Google Earth KML file. Table 1 shows
a file I’ve edited for one of my near
space flights. Note that I’ve shortened
the number of positions in the sample
file considerably. The usual number of
positions listed in one of my typical
KML files is over 100.
Like HTML, KML commands — or
element names — are written in
brackets, < and >. Parameters for a
particular command are written after
the <COMMAND> begins and before
the </COMMAND> ends.
The first element names I edit are
<DESCRIPTION> and <NAME>.
When the image of a flight path is
clicked on a Google Earth map, the
text entered in these two elements is
displayed. I like to write the mission
name and date in these elements.
Next, I edit the element names
under <LOOKAT>. These seven
elements indicate where in space
to place and point your eyeball.
The <LATITUDE>, <LONGITUDE>,
and <ALTITUDE> element names
indicate the point above the earth
to stare at. The
<RANGE> and <TILT> ■ FIGURE 2
element names indicate the distance and
angle to look from.
element name is the
your eyeball points.
Since the near
altitude is with respect
to mean sea level, the
set to ABSOLUTE.
Figure 2 shows my
diagram of what the
point in the sample
KML file is a location
at the center of the
near spacecraft’s flight
ground track and
half way up to its
maximum altitude. Its
■ FIGURE 3. The
extruded flight path.
tilt is 90 degrees (horizontal), with
a heading of 0 degrees (true north).
The range is equal to the flight
path’s maximum altitude (I sometimes
have to edit this after looking at
the results). A word of caution here.
The altitude and range elements are
in units of meters. Until I realized
that, my flight paths looked awfully
tall and skinny (just like me when I
The only name elements modified
under <STYLE> are
and <WIDTH>. The
element is an eight byte
field. The first two bytes
indicate the transparency
of the line and the
remaining six bytes
indicate its color. A
transparency of hex 00
creates an invisible line
and a hex value of FF
creates a fully opaque
one. The next three pairs
of bytes are for the
colors blue, green, and
red (in that order). In the sample KML
file, the <LINESTYLE COLOR> is set to
ff000000. That draws the flight path as
a fully opaque black line. The
<WIDTH> is set to two just because
that seems to work well.
The last name element modified is
<EXTRUDE>. Extruding a flight path
drops a curtain from the flight path
to the ground. I find the curtain
confusing, so I don’t have it drawn. To
NOT extrude a flight path, type,
<?xml version=”1.0” encoding=”UTF- 8”?>
<kml xmlns=” http://earth.google.com/kml/2.0”>
<description>Flight of NearSys 05B</description>
<name> 29 May 2005</name>
<latitude> 47. 78</latitude>
-119.7541667, 47. 94,1560.060976
March 2007 17