RadarToRain Model Documentation

๐ŸŒง๏ธ RAAIN Model

npm version License: MIT TypeScript Build Status

A TypeScript library for radar-based rain measurement and analysis, used in radartorain.com services.

๐ŸŒŸ Features

  • Radar Data Processing: Efficient processing of radar data for rain measurement
  • Cartesian & Polar Coordinates: Support for both coordinate systems
  • Advanced Merging: Sophisticated merging strategies for rain data
  • Quality Assessment: Built-in quality metrics for measurements
  • TypeScript Support: Full type safety and modern TypeScript features
  • Performance Optimized: Efficient data structures and algorithms

๐Ÿš€ Installation

npm install raain-model
# or
yarn add raain-model

๐Ÿ“– Quick Start

import {RainComputationMap, RainNode, RadarNode} from 'raain-model';

// Create a radar node
const radarNode = new RadarNode({
id: 'radar1',
latitude: 48.8566,
longitude: 2.3522,
name: 'Paris Radar',
team: null
});

// Create a rain node
const rainNode = new RainNode({
id: 'rain1',
name: 'Paris Rain',
team: null,
radars: [radarNode]
});

// Process rain data
const computation = new RainComputationMap({
id: 'comp1',
date: new Date(),
isReady: true,
map: [] // Your rain measurement data here
});

๐Ÿ“š Documentation

Visit documentation and swagger.

Memory Bank

This project uses a Memory Bank for comprehensive documentation and context retention. The Memory Bank is located in the .memory-bank directory and contains the following files:

  • memory-bank-rules.md: Rules to follow and to consider in all contexts
  • projectbrief.md: Overview of the project, core requirements, and goals
  • productContext.md: Why the project exists, problems it solves, and how it works
  • systemPatterns.md: System architecture, key technical decisions, and design patterns
  • techContext.md: Technologies used, development setup, and technical constraints
  • activeContext.md: Current work focus, recent changes, and next steps
  • progress.md: What works, what's left to build, and known issues

=> !! These files should always be considered as a context and keep up-to-date !!

Key Components

  • RainNode: Core class for rain measurement nodes
  • RadarNode: Radar station representation
  • RainComputationMap: Advanced rain data processing
  • CartesianTools: Utilities for coordinate transformations
  • SpeedMatrix: Matrix operations for rain data

๐Ÿงช Testing

# Run all tests
npm test

# Run tests with coverage
npm run test:coverage

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“… Changelog

See Changelog for version history and changes.