Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 1.67 KB

README.md

File metadata and controls

22 lines (14 loc) · 1.67 KB

fit-parser-extract-geometry

GitHub license Continuous integration Github Code scanning Codacy Badge Codacy Badge

Basic FIT parser that only focuses on extracting geometry from activities

Installation

npm install @c2corg/fit-parser-extract-geometry

Usage

import { extractGeometry } from '@c2corg/fit-parser-extract-geometry';

const bytes = [0x0E, 0x10, 0xD9, 0x07, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x46, 0x49, 0x54, 0x91, 0x33, 0x00, 0x00];
const geometry = extractGeometry(new Uint8Array(bytes));

When an error is encountered, the parser stops silently and returns the coordinates already processed. Set DEBUG environment variable to fit-parser-extract-geometry to enable error messages (more info).