DJI_SRT_Parser
Parses and interprets some data from DJI's Drones SRT metadata files.
Mostly tested with Mavic Pro SRT files. You can send me yours if you want it implemented.
Please let me know if you create something with this :).
Installation
Using npm:
$ npm install dji_srt_parser
Usage
let DJISRTParser = require('dji_srt_parser');
let fileName = 'filePath';
let dataString = readTextFile(fileName);
let DJIData = DJISRTParser(dataString, fileName);
let geoJSON = DJIData.toGeoJSON();
console.log(DJIData.rawMetadata());
console.log(DJIData.metadata());
console.log(DJIData.getSmoothing());
console.log(DJIData.setSmoothing(0));
console.log(DJIData.getFileName());
let csvData = DJIData.toCSV();
let DJIData = DJISRTParser(JSONDataString, JSONfileName, true);
Smoothing is applied when interpreting the data because the GPS values provided by DJI are not accurate enough. They don't have enough digits. We average them with the surrounding values to create more pleasant paths and to be able to compute somewhat meaningful speeds. The interpreted values are not necessarily more accurate.
Units of interpreted data
(As far as we know)
- Timecode: HH:MM:SS,FFF
- GPS: degrees (and meters for third value, altitude)
- Date: timestamp in milliseconds (note that the time zone is not specified, could be local where the drone was registered, or flown...)
- Barometer: meters (more accurate than GPS altitude)
- Speed: km/h
- Duration: milliseconds
- Distance: meters
- ISO, shutter and EV (not always present)