Compare commits
2 Commits
bd44740649
...
6d549ed69b
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d549ed69b | |||
| 1776e2962f |
@@ -234,12 +234,13 @@ export const fetchActData = async (opts) => {
|
||||
|
||||
// Transform data to add E10tel_eq field for compatibility with Flux version
|
||||
// E10tel_eq = 10^(LA_max/10)
|
||||
if (opts.data !== 'live') {
|
||||
result.values = result.values.map(record => ({
|
||||
...record,
|
||||
E10tel_eq: record.LA_max !== null && record.LA_max !== undefined
|
||||
? Math.pow(10, record.LA_max / 10)
|
||||
: null
|
||||
}))
|
||||
}))}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ export const fetchActData = async (opts) => {
|
||||
LA_minx: '$values.noise_LA_min',
|
||||
LA_max: '$values.LA_max',
|
||||
LAeq: '$values.LAeq',
|
||||
E10tel_eq: '$values.E10tel_eq' }
|
||||
}
|
||||
},
|
||||
// {$project: {
|
||||
// datetime: {$dateToString: {format: '%Y-%m-%dT%H:%M:%SZ', date: '$datetime'}},
|
||||
@@ -202,24 +202,6 @@ export const fetchActData = async (opts) => {
|
||||
}
|
||||
return ret
|
||||
}
|
||||
/*
|
||||
Try to connect to mongodb://rexfue:s25BMmW2gg@192.168.51.22:27017
|
||||
Try to connect to mongodb://rexfue:s25BMmW2gg@192.168.51.22:27017
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
let docs = await collection.find(
|
||||
{ datetime:
|
||||
{ $gte: start.toDate(), $lt: end.toDate() }
|
||||
},
|
||||
{ projection:
|
||||
{_id:0, E_eq:0, E_mx:0, E_mi:0, E10tel_mx:0, E10tel_mi:0}, sort: {datetime: sort}
|
||||
},
|
||||
).toArray();
|
||||
*/
|
||||
|
||||
export const fetchgeigerAVGData = async (opts) => {
|
||||
let docs = []
|
||||
|
||||
Reference in New Issue
Block a user