spacecraft-thermal-sensor
v1.0.0
Published
A thermal sensor module for spacecraft temperature monitoring
Maintainers
Readme
spacecraft-thermal-sensor
A thermal sensor module for spacecraft temperature monitoring. This module provides a flexible and configurable thermal sensor implementation that can be used in spacecraft control systems.
Installation
npm install spacecraft-thermal-sensorUsage
const { ThermalSensor } = require('spacecraft-thermal-sensor');
// Create a thermal sensor with default configuration
const sensor = new ThermalSensor();
// Or with custom configuration
const customSensor = new ThermalSensor({
minTemp: -100,
maxTemp: 200,
fluctuation: 10,
unit: '°C'
});
// Get a temperature reading
const reading = sensor.getReading();
console.log(reading);
// Output:
// {
// temperature: 50.5,
// unit: '°C',
// timestamp: '2024-01-31T12:00:00.000Z',
// status: 'NORMAL'
// }Configuration Options
minTemp(number): Minimum temperature range (default: -50)maxTemp(number): Maximum temperature range (default: 150)fluctuation(number): Temperature fluctuation range (default: 5)unit(string): Temperature unit (default: '°C')
Temperature Status
The sensor provides three status levels based on the current temperature:
NORMAL: Temperature is within safe rangeWARNING: Temperature is approaching critical levels (within 20% of max range)CRITICAL: Temperature is at dangerous levels (within 10% of max range)
