AntennaNew was not really needed.

This commit is contained in:
2023-07-22 00:43:00 +02:00
parent cb7b62a092
commit 9426c5513e
3 changed files with 16 additions and 19 deletions

View File

@@ -3,7 +3,16 @@ use std::f64::consts::PI;
use crate::{unit_conversion::UnitsConversion, Point};
#[derive(Debug, Clone, Default, Queryable, Selectable, serde::Serialize, serde::Deserialize)]
#[derive(
Debug,
Clone,
Queryable,
Selectable,
Insertable,
AsChangeset,
serde::Serialize,
serde::Deserialize,
)]
#[diesel(check_for_backend(diesel::pg::Pg))]
#[diesel(table_name = crate::schema::antennas)]
pub struct Antenna {
@@ -15,17 +24,6 @@ pub struct Antenna {
pub comment: Option<String>,
}
#[derive(Debug, Clone, Copy, Insertable, AsChangeset, serde::Deserialize)]
#[diesel(table_name = crate::schema::antennas)]
pub struct NewAntenna<'a> {
pub id: &'a str,
pub tssi: f64,
pub pos_x: f64,
pub pos_y: f64,
pub pos_z: f64,
pub comment: Option<&'a str>,
}
impl Antenna {
const C: f64 = 2.99e8;
const F: f64 = 2.4e9;