Google Earth - msupino/NavigationApp GitHub Wiki

๐Ÿ‡ฎ๐Ÿ‡ฑ ืขื‘ืจื™ืช

Google Earth โ€” fly your route

What it does

NavAid exports your route as a Google Earth .kml tour โ€” a gx:Tour containing one <Camera> waypoint per leg. Open the file in Google Earth Pro and Earth flies the camera along your route at the per-leg altitudes from your flight plan, while the route line and waypoint markers stay clamped to the ground for context.

The toolbar button (in the Export/import menu) is labelled:

  • English: โœˆ๏ธ Open route in Google Earth
  • Hebrew: โœˆ๏ธ ืคืชื— ืžืกืœื•ืœ ื‘-Google Earth

When to use it

  • Pre-flight visualisation of the terrain along the route.
  • Briefing โ€” showing passengers or students what the flight will look like from the cockpit.
  • Sanity-checking obstacle clearance against terrain at the planned cruise altitudes.
  • Teaching VFR navigation and pilotage.

How to fly your route โ€” step by step

  1. Build a route in NavAid (see Quick Start).
  2. Open the ๐Ÿ“‹ Flight Plan and set per-leg Speed and Altitude for each leg. The flythrough uses both โ€” altitude for the camera height, speed (with leg distance) for how long Earth dwells on each leg.
  3. In the Export/import menu, click โœˆ๏ธ Open route in Google Earth and confirm the prompt.
  4. NavAid downloads a timestamped file, e.g. navaid-flythrough-2026-05-23.kml.
  5. Open the file in Google Earth Pro Desktop (free download: https://google.com/earth/versions) โ€” double-click the .kml or use File โ†’ Open. Earth zooms to the route start.
  6. In the Places panel on the left, find the imported NavAid flythrough document and expand it. Select the Fly the route tour, then press the Play โ–ถ button at the bottom of the Places panel (the one with the clock icon). Earth flies the camera along the route.

Tour speed

The Open in dialog carries a Tour speed selector: 0.5x / 1x (normal) / 2x / 4x.

Google Earth has no playback-speed control for a gx:Tour โ€” the pace comes entirely from the <gx:duration> values the file carries โ€” so the choice is made at export time and remembered per device (navaid.geTourSpeed). 1x produces a byte-identical file to before: roughly 4 seconds of tour per minute of flight, clamped to 4โ€“45 s per leg. The multiplier scales every duration uniformly โ€” legs, turns and the opening fly-to โ€” so each leg keeps its proportional share of the tour.

The pace itself is tunable (see Tuning Panel): kmlTourSecPerFlightMin, kmlTourLegMinSec, kmlTourLegMaxSec, kmlTourMinSegSec.

Note: Google Earth Web cannot play tours at all โ€” Google lists tours among the KML features unsupported there. The selector only affects Earth Pro.

A leg with no altitude

If a leg has no altitude entered, the export does not invent an arbitrary number. It takes one from the route: the next leg ahead that has an altitude, else the last one behind it. That is the common case โ€” the departure leg out of a field is usually left blank while the cruise legs are filled in, and climbing to the cruise height is what the aircraft does anyway.

Only when no leg on the route has an altitude does the tour fall back to 800 ft above the ground (kmlUnsetLegAglFt): above the departure field's elevation when the leg starts on one, otherwise relativeToGround so the camera cannot end up underground. Earlier versions wrote an absolute 0 m here, which put the camera at sea level.

What's in the KML

NavAid writes a single .kml document containing:

  • A <name> of NavAid flythrough (Hebrew: NavAid ื˜ื™ืกื”).
  • A leading <Camera> so Earth opens already framed on the route start.
  • A route polyline โ€” <Placemark> named Route (Hebrew: ืžืกืœื•ืœ) with a <LineString> of the waypoint coordinates. The line is clamped to the ground (tessellate=1, no altitudeMode=absolute), styled magenta-cyan (ff3399ff), 3 px wide.
  • A placemark per waypoint โ€” <Placemark><Point> at each waypoint, also at ground level (,0 altitude in the coordinates).
  • A <gx:Tour> named Fly the route (Hebrew: ื˜ื•ืก ืืช ื”ืžืกืœื•ืœ) containing a <gx:Playlist> of <gx:FlyTo> cameras. Rather than one camera per waypoint, NavAid samples multiple cameras along each leg (roughly one every 1.5 nm) so the flythrough glides continuously instead of hopping point-to-point:
    • <gx:flyToMode> โ€” smooth throughout, including the opening shot, so the camera eases into the start instead of bouncing.
    • <gx:duration> โ€” the leg's distance รท speed (hours) ร— 60 ร— 4 to get seconds, clamped to 4 โ€“ 45 s, then split across that leg's sample points; each segment is floored at 0.6 s.
    • Grounded endpoints โ€” when the first or last waypoint sits on a known airfield, that camera's altitude snaps to the field elevation (elev_ft from airfields.json, converted to metres) so the tour starts and ends near the runway rather than at cruise height. Intermediate cameras use the leg's inboundAltitude.
    • Inbound headings + turn blending โ€” each camera looks down the leg it is flying (the inbound bearing). Approaching a waypoint the heading is smoothly interpolated over a short turn buffer (โ‰ˆ15 % of the inbound leg, capped at 0.5 nm) toward the next leg's bearing, and headings are kept continuous (no 360ยฐโ†’0ยฐ snap) so the camera never whips around at a turn.
    • <Camera> with longitude/latitude/altitude (metres), heading, tilt and roll. Legs with planned altitude use absolute (MSL); the all-blank-route fallback may use relativeToGround as described above.

The MIME type on the download is application/vnd.google-earth.kml+xml.

Tips & caveats

  • Planned per-leg altitudes are MSL and converted from feet to metres. If every leg altitude is blank, NavAid uses the 800 ft AGL/field-elevation fallback described above; there is no 2000 ft MSL fallback.
  • The route line itself is on the ground โ€” only the camera moves at altitude. This keeps the visual reference (where the line meets the terrain) honest while the camera shows what you'd see from the cockpit.
  • Google Earth Web has limited and inconsistent tour playback. For a smooth flythrough, use Google Earth Pro Desktop (free).
  • The camera tilt is a fixed 70ยฐ (a slightly tilted-forward view, balanced between forward visibility and terrain context). You can adjust it interactively in Google Earth (mouse-drag the orientation widget or use Shift + arrow keys).
  • High terrain can momentarily clip the camera if a leg's altitude is below the terrain along that leg. Raise the leg's altitude in the Flight Plan and re-export.
  • The whole tour is smooth โ€” including the opening shot, so the camera eases into the start instead of jumping.
  • Headings follow the inbound leg and blend through turns โ€” the camera looks down the leg it is flying and rotates smoothly toward the next leg's bearing over a short turn buffer, so it never snaps around at a waypoint.
  • Airfield endpoints are grounded โ€” if the route starts or ends on a known airfield, those cameras sit at the field elevation (from airfields.json) rather than at cruise height, so the tour opens and closes near the runway.

Troubleshooting

  • "Tour does nothing in Google Earth Web" โ€” open the same KML in Google Earth Pro Desktop instead. The gx:Tour extension isn't reliably supported on Earth Web.
  • "Camera dives underground" โ€” a leg altitude is below the local terrain. Raise that leg's altitude in the Flight Plan and re-export.
  • "Tour is too fast / too slow" โ€” leg duration is distance รท speed, clamped 4โ€“45 s. To slow a leg down, lower its speed in the Flight Plan; to speed it up, raise its speed.
  • "The eye ends up miles above the route" โ€” you may have edited the KML and reordered the <Camera> children; <altitudeMode> must come last for Google Earth to honour it.
  • "Play button does nothing" โ€” make sure the Fly the route tour entry (clock icon) is selected in the Places panel before pressing Play.

See also

  • Flight Plan โ€” set the per-leg altitudes and speeds the camera uses.
  • Print and Export โ€” the broader export options (PNG, JSON, KML).
  • User Guide โ€” every toolbar button explained.
โš ๏ธ **GitHub.com Fallback** โš ๏ธ