const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
const viewGeoJSON = require('./src/view-geojson');

let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
let json = taskToGeoJSON(task);

viewGeoJSON(json);

const turf = require('@turf/turf');

const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
const readFlight = require('./src/read-flight');
const viewGeoJSON = require('./src/view-geojson');

let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
let flight = readFlight(`${__dirname}/fixtures/2017-07-15-lev/SW_77flqgg1.igc`);

let json = taskToGeoJSON(task);
json.features.push(turf.lineString(flight, { color: 'red', opacity: 0.85 }));

viewGeoJSON(json);

Add flight to GeoJSON view
Add flight to GeoJSON view
