fixed celestial calculations

This commit is contained in:
2026-06-24 00:44:27 -04:00
parent ec79a49736
commit aac3486dd3
3 changed files with 1004 additions and 1000 deletions

View File

@@ -38,7 +38,8 @@ function filterArr(arr, fields) {
app.get('/api/current', async (req, res) => {
const {fields} = req.query;
const [sensors, space] = await Promise.all([queryCurrent(), getCelestialCurrent()]);
const [sensors, coords] = await Promise.all([queryCurrent(), getCoords()]);
const space = getCelestialCurrent(coords.latitude, coords.longitude);
res.json(filterFields({...sensors, ...space}, fields));
});