GithubHelp home page GithubHelp logo

arckdash / igc2kmz-ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spasutto/igc2kmz

0.0 0.0 0.0 6.42 MB

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

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

License: GNU General Public License v3.0

JavaScript 7.43% TypeScript 79.41% HTML 13.16%

igc2kmz-ts's Introduction

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

igc2kmz-ts's People

Contributors

spasutto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.