arckdash / igc2kmz-ts

igc2kmz is a tool to convert IGC (flight recorder) to KMZ/KML (Google Earth)

Home Page:https://spasutto.github.io/igc2kmz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

igc2kmz

igc2kmz is a tool to convert IGC (flight recorder) to KMZ/KML (Google Earth).

It's aTypescript port of Tom Payne's python tool igc2kmz

The resulting tool is available online here : → igc2kmz.html ← (it can also be used in command line, see below)

Visualisation example

Usage

For the web : See igc2kmz.html or example.html ('hello world' code), Single Page Application available here (right click and save it to computer/phone)

⚠️ As of now, web version runs on the UI thread and on slow machines or with big flight it can block the page for some time 💥

Command line : build first then on a prompt :

node dist\igc2kmz.cmd.js examples\flight.igc

Upload to Google Earth, voilà!

ℹ️ Note : animations doesn't seem to work on web version of earth, but are ok on desktop version...

Features

Animation

Visualisation example

Glides / thermals visualisation :

Visualisation example

Photos (placed at GPS position)

Visualisation example

XC Score :

computed by igc-xc-score

Visualisation example

Extruded path :

Visualisation example

Task visualization :

XC Track file format (.xctsk)

Visualisation example

Build

Get sources from the repository and install npm dependencies

git clone https://github.com/spasutto/igc2kmz.git
cd igc2kmz
npm install

then

npm run build     # for command line usage
#  or
npm run minify    # for web
npm run buildweb  # for web (development)
#  or
npm run buildnode # for use as library

Reusing

web

build web/minify version first, then see examples/example.html

node

build node version first, copy dist/igc2kmz.js then in a new javascript file :

var igc2kmz = require('igc2kmz');
const fs = require('fs');

var igccontent = fs.readFileSync('examples/flight.igc', { encoding: 'utf8', flag: 'r' });
var outfilename = "output.kmz";
igc2kmz.igc2kmz(igccontent).catch(err => console.log(err)).then(kmz => {
  if (kmz) {
    fs.writeFileSync(outfilename, Buffer.from(kmz), 'binary');
    console.log("output to " + outfilename);
  }
});

Bugs/todo

  • tests
  • versioning
  • worker for web version
  • others tasks formats
  • warnings on fonts via pureimage
  • warning on Buffer() (outdated pngjs of pureimage)
  • get real altitude and correct IGC or convert from QFE

About

igc2kmz is a tool to convert IGC (flight recorder) to KMZ/KML (Google Earth)

https://spasutto.github.io/igc2kmz/

License:GNU General Public License v3.0


Languages

Language:TypeScript 79.4%Language:HTML 13.2%Language:JavaScript 7.4%