Skip to content

Commit

Permalink
flydra-types: move DataAssocRow here
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Nov 28, 2023
1 parent 910a78e commit 739f6cc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
4 changes: 2 additions & 2 deletions braid-offline/src/bin/compute-flydra1-compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use std::collections::{BTreeMap, HashMap};
use std::io::{Read, Write};
use tracing::{error, info, trace};

use flydra2::{DataAssocRow, Result};
use flydra2::Result;
use groupby::AscendingGroupIter;

use flydra_types::{KalmanEstimatesRow, SyncFno};
use flydra_types::{DataAssocRow, KalmanEstimatesRow, SyncFno};

use braid_offline::pick_csvgz_or_csv;

Expand Down
14 changes: 14 additions & 0 deletions flydra-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,20 @@ impl WithKey<SyncFno> for KalmanEstimatesRow {
}
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct DataAssocRow {
// changes to this struct should update BraidMetadataSchemaTag
pub obj_id: u32,
pub frame: SyncFno,
pub cam_num: CamNum,
pub pt_idx: u8,
}
impl WithKey<SyncFno> for DataAssocRow {
fn key(&self) -> SyncFno {
self.frame
}
}

#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
pub struct FlydraRawUdpPoint {
pub x0_abs: f64,
Expand Down
22 changes: 3 additions & 19 deletions flydra2/src/flydra2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ use mvg::{DistortedPixel, PointWorldFrame, PointWorldFrameWithSumReprojError};
pub use braidz_types::BraidMetadata;

use flydra_types::{
CamInfoRow, CamNum, ConnectedCameraSyncState, FlydraFloatTimestampLocal, HostClock,
KalmanEstimatesRow, RosCamName, SyncFno, TextlogRow, TrackingParams, TriggerClockInfoRow,
Triggerbox, RECONSTRUCT_LATENCY_HLOG_FNAME, REPROJECTION_DIST_HLOG_FNAME,
CamInfoRow, CamNum, ConnectedCameraSyncState, DataAssocRow, FlydraFloatTimestampLocal,
HostClock, KalmanEstimatesRow, RosCamName, SyncFno, TextlogRow, TrackingParams,
TriggerClockInfoRow, Triggerbox, RECONSTRUCT_LATENCY_HLOG_FNAME, REPROJECTION_DIST_HLOG_FNAME,
};
pub use flydra_types::{Data2dDistortedRow, Data2dDistortedRowF32};

use withkey::WithKey;

mod connected_camera_manager;
pub use connected_camera_manager::{ConnectedCamCallback, ConnectedCamerasManager};

Expand Down Expand Up @@ -169,20 +167,6 @@ where
}
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct DataAssocRow {
// changes to this struct should update BraidMetadataSchemaTag
pub obj_id: u32,
pub frame: SyncFno,
pub cam_num: CamNum,
pub pt_idx: u8,
}
impl WithKey<SyncFno> for DataAssocRow {
fn key(&self) -> SyncFno {
self.frame
}
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExperimentInfoRow {
// changes to this struct should update BraidMetadataSchemaTag
Expand Down
8 changes: 4 additions & 4 deletions flydra2/src/tracking_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use adskalman::ObservationModel as ObservationModelTrait;
use adskalman::{StateAndCovariance, TransitionModelLinearNoControl};

use flydra_types::{
CamNum, FlydraFloatTimestampLocal, FlydraRawUdpPoint, KalmanEstimatesRow, RosCamName, SyncFno,
TrackingParams, Triggerbox,
CamNum, DataAssocRow, FlydraFloatTimestampLocal, FlydraRawUdpPoint, KalmanEstimatesRow,
RosCamName, SyncFno, TrackingParams, Triggerbox,
};

use crate::bundled_data::{MiniArenaPointPerCam, PerMiniArenaAllCamsOneFrameUndistorted};
Expand All @@ -27,8 +27,8 @@ use crate::{
model_server::{SendKalmanEstimatesRow, SendType},
new_object_test_2d::NewObjectTestFlat3D,
new_object_test_3d::NewObjectTestFull3D,
to_world_point, CameraObservationModel, ConnectedCamerasManager, DataAssocRow,
HypothesisTestResult, KalmanEstimateRecord, MyFloat, SaveToDiskMsg, TimeDataPassthrough,
to_world_point, CameraObservationModel, ConnectedCamerasManager, HypothesisTestResult,
KalmanEstimateRecord, MyFloat, SaveToDiskMsg, TimeDataPassthrough,
};

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit 739f6cc

Please sign in to comment.