known position
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
// pub mod multiple_measures;
|
||||
mod beacon_measure;
|
||||
mod device_status;
|
||||
mod known_position;
|
||||
// mod known_position;
|
||||
|
||||
// Renaming types for ease of use outside the scope of this module
|
||||
pub const BEACONMEASURE_TIME_WINDOW: u64 = 4;
|
||||
pub type BeaconMeasure = beacon_measure::BeaconMeasure;
|
||||
pub type KnownPosition = known_position::KnownPosition;
|
||||
// pub type KnownPosition = known_position::KnownPosition;
|
||||
pub type DeviceStatus = device_status::DeviceStatus;
|
||||
|
||||
@@ -13,5 +13,6 @@ pub type MAC = types::mac::MAC;
|
||||
mod models;
|
||||
pub type Antenna = models::antenna::Antenna;
|
||||
pub type DeviceReport = models::DeviceReport;
|
||||
pub type KnownPosition = models::known_position::KnownPosition;
|
||||
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@ use influxdb::{InfluxDbWriteable, ReadQuery};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::helper::for_async::get_influx_cli;
|
||||
use crate::Point;
|
||||
use crate::{Point,MAC};
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, InfluxDbWriteable)]
|
||||
pub struct KnownPosition {
|
||||
// pub id: MAC,
|
||||
pub x: f64,
|
||||
pub y: f64,
|
||||
pub z: f64,
|
||||
pub time: DateTime<Utc>,
|
||||
}
|
||||
|
||||
@@ -17,6 +19,7 @@ impl KnownPosition {
|
||||
KnownPosition {
|
||||
x: pos.x,
|
||||
y: pos.y,
|
||||
z: 0.0,
|
||||
time: chrono::Utc::now(),
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
pub mod antenna;
|
||||
pub mod known_position;
|
||||
|
||||
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
||||
pub struct DeviceReport {
|
||||
|
||||
Reference in New Issue
Block a user