Fix left overs after models refactor (#3)
Co-authored-by: Felipe Diniello <felipediniello@pm.me> Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -6,8 +6,10 @@ use crate::{unit_conversion::UnitsConversion, Point};
|
||||
pub struct Antenna {
|
||||
pub id: String,
|
||||
pub tssi: f64,
|
||||
pub coord: Point,
|
||||
pub comment: Option<String>,
|
||||
pos_x: f64,
|
||||
pos_y: f64,
|
||||
pos_z: f64,
|
||||
}
|
||||
|
||||
impl Antenna {
|
||||
@@ -19,11 +21,17 @@ impl Antenna {
|
||||
Antenna {
|
||||
id: id.into(),
|
||||
comment: None,
|
||||
coord,
|
||||
pos_x: coord.x,
|
||||
pos_y: coord.y,
|
||||
pos_z: 0.0,
|
||||
tssi,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn coord(&self) -> Point {
|
||||
Point::new(self.pos_x, self.pos_y)
|
||||
}
|
||||
|
||||
pub fn get_rssi(&self, distance: f64) -> f64 {
|
||||
#[allow(non_snake_case)]
|
||||
// Free Space Path Loss
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
pub mod antenna;
|
||||
pub mod beacon_measure;
|
||||
pub mod dynamic_device_status;
|
||||
pub mod known_position;
|
||||
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
||||
pub struct DeviceReport {
|
||||
pub data: Vec<crate::models::beacon_measure::BeaconMeasure>,
|
||||
}
|
||||
Reference in New Issue
Block a user