# MonitoringPro Utils

Utility functions for MonitoringPro efficiency calculations with flexible unit support.

## Installation

```bash
npm install monitoringpro-utils
```

## Usage

```javascript
const { computeEfficiency } = require('monitoringpro-utils');

// For data in GJ (default)
const result1 = computeEfficiency(row, prevRow, monthlyEffectivityConstant);

// For data in kWh
const result2 = computeEfficiency(row, prevRow, monthlyEffectivityConstant, 'kWh');

// For data in MWh
const result3 = computeEfficiency(row, prevRow, monthlyEffectivityConstant, 'MWh');
```

## Parameters

- `row` - Current row data object
- `prevRow` - Previous row data object  
- `monthlyEffectivityConstant` - Monthly effectivity constant value
- `heatUnits` (optional) - Heat units: 'GJ' (default), 'kWh', or 'MWh'

## Supported Heat Units

- **GJ** (Gigajoules) - Default unit, converts using 1 GJ = 277.778 kWh
- **kWh** (Kilowatt-hours) - No conversion needed
- **MWh** (Megawatt-hours) - Converts using 1 MWh = 1000 kWh

## Version History

- **1.6.0** - Added flexible unit support for heat calculations
- **1.5.0** - Previous version with GJ-only support

## License

ISC 