Notification system in frontend

- Heatmap worker now reports progress
- Base for new altitude value
- Phones can be marked active
This commit is contained in:
2020-11-13 19:04:45 +01:00
parent d747b7be5b
commit ab1b90d020
27 changed files with 423 additions and 36 deletions

View File

@@ -30,13 +30,14 @@ export class RabbitMQ {
return;
}
logger.info(`New beat from ${phone.displayName} with ${msg.gpsLocation[2]} accuracy and ${msg.battery}% battery`);
logger.info(`New beat from ${phone.displayName} with ${msg.gpsLocation[2]}, ${msg.gpsLocation[3]}m height and accuracy and ${msg.battery}% battery`);
const newBeat = await Beat.create({
phone: phone._id,
coordinate: [msg.gpsLocation[0], msg.gpsLocation[1]],
accuracy: msg.gpsLocation[2],
speed: msg.gpsLocation[3],
// [latitude, longitude, altitude]
coordinate: [msg.gpsLocation[0], msg.gpsLocation[1], msg.gpsLocation[2]],
accuracy: msg.gpsLocation[3],
speed: msg.gpsLocation[4],
battery: msg.battery,
createdAt: msg.timestamp
});