mirror of
https://github.com/netbymatt/nexrad-level-2-data.git
synced 2026-11-28 18:58:05 -08:00
19 lines
571 B
JavaScript
19 lines
571 B
JavaScript
/* eslint-disable no-console */
|
|
import fs from 'node:fs/promises';
|
|
import Level2Radar from '../src/index.mjs';
|
|
|
|
// these files should contain the same error
|
|
const fileToLoadError = './data/messagesizeerror';
|
|
// const fileToLoadError = 'data/KLOT20210625_075708_V06';
|
|
|
|
// load file
|
|
const dataError = await fs.readFile(fileToLoadError);
|
|
|
|
const radarError = new Level2Radar(dataError);
|
|
console.log(radarError);
|
|
|
|
// error is in elevation 10
|
|
radarError.setElevation(10);
|
|
const reflectivityCompressed = radarError.getHighresReflectivity();
|
|
console.log(reflectivityCompressed);
|