@@ -10,8 +10,6 @@ use std::path::PathBuf;
1010
1111use nalgebra;
1212use nalgebra:: { DMatrix , DVector , Vector3 } ;
13- use rand:: Rng ;
14- use statrs:: distribution:: { Continuous , Normal } ;
1513use strapdown:: IMUData ;
1614use strapdown:: earth:: METERS_TO_DEGREES ;
1715use strapdown:: filter:: {
@@ -40,28 +38,28 @@ pub enum ReliefResolution {
4038 ThreeSeconds ,
4139 OneSecond ,
4240}
43- impl ReliefResolution {
44- /// Convert the resolution to a string. This can be used for calling the GMT library
45- fn as_str ( & self ) -> & ' static str {
46- match self {
47- ReliefResolution :: OneDegree => "01d" ,
48- ReliefResolution :: ThirtyMinutes => "30m" ,
49- ReliefResolution :: TwentyMinutes => "20m" ,
50- ReliefResolution :: FifteenMinutes => "15m" ,
51- ReliefResolution :: TenMinutes => "10m" ,
52- ReliefResolution :: SixMinutes => "06m" ,
53- ReliefResolution :: FiveMinutes => "05m" ,
54- ReliefResolution :: FourMinutes => "04m" ,
55- ReliefResolution :: ThreeMinutes => "03m" ,
56- ReliefResolution :: TwoMinutes => "02m" ,
57- ReliefResolution :: OneMinute => "01m" ,
58- ReliefResolution :: ThirtySeconds => "30s" ,
59- ReliefResolution :: FifteenSeconds => "15s" ,
60- ReliefResolution :: ThreeSeconds => "03s" ,
61- ReliefResolution :: OneSecond => "01s" ,
62- }
63- }
64- }
41+ // impl ReliefResolution {
42+ // /// Convert the resolution to a string. This can be used for calling the GMT library
43+ // fn as_str(&self) -> &'static str {
44+ // match self {
45+ // ReliefResolution::OneDegree => "01d",
46+ // ReliefResolution::ThirtyMinutes => "30m",
47+ // ReliefResolution::TwentyMinutes => "20m",
48+ // ReliefResolution::FifteenMinutes => "15m",
49+ // ReliefResolution::TenMinutes => "10m",
50+ // ReliefResolution::SixMinutes => "06m",
51+ // ReliefResolution::FiveMinutes => "05m",
52+ // ReliefResolution::FourMinutes => "04m",
53+ // ReliefResolution::ThreeMinutes => "03m",
54+ // ReliefResolution::TwoMinutes => "02m",
55+ // ReliefResolution::OneMinute => "01m",
56+ // ReliefResolution::ThirtySeconds => "30s",
57+ // ReliefResolution::FifteenSeconds => "15s",
58+ // ReliefResolution::ThreeSeconds => "03s",
59+ // ReliefResolution::OneSecond => "01s",
60+ // }
61+ // }
62+ // }
6563/// Resolution values for gravity maps
6664#[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
6765pub enum GravityResolution {
@@ -77,24 +75,24 @@ pub enum GravityResolution {
7775 TwoMinutes ,
7876 OneMinute ,
7977}
80- impl GravityResolution {
81- /// Convert the resolution to a string. This can be used for calling the GMT library
82- fn as_str ( & self ) -> & ' static str {
83- match self {
84- GravityResolution :: OneDegree => "01d" ,
85- GravityResolution :: ThirtyMinutes => "30m" ,
86- GravityResolution :: TwentyMinutes => "20m" ,
87- GravityResolution :: FifteenMinutes => "15m" ,
88- GravityResolution :: TenMinutes => "10m" ,
89- GravityResolution :: SixMinutes => "06m" ,
90- GravityResolution :: FiveMinutes => "05m" ,
91- GravityResolution :: FourMinutes => "04m" ,
92- GravityResolution :: ThreeMinutes => "03m" ,
93- GravityResolution :: TwoMinutes => "02m" ,
94- GravityResolution :: OneMinute => "01m" ,
95- }
96- }
97- }
78+ // impl GravityResolution {
79+ // /// Convert the resolution to a string. This can be used for calling the GMT library
80+ // fn as_str(&self) -> &'static str {
81+ // match self {
82+ // GravityResolution::OneDegree => "01d",
83+ // GravityResolution::ThirtyMinutes => "30m",
84+ // GravityResolution::TwentyMinutes => "20m",
85+ // GravityResolution::FifteenMinutes => "15m",
86+ // GravityResolution::TenMinutes => "10m",
87+ // GravityResolution::SixMinutes => "06m",
88+ // GravityResolution::FiveMinutes => "05m",
89+ // GravityResolution::FourMinutes => "04m",
90+ // GravityResolution::ThreeMinutes => "03m",
91+ // GravityResolution::TwoMinutes => "02m",
92+ // GravityResolution::OneMinute => "01m",
93+ // }
94+ // }
95+ // }
9896/// Resolution values for magnetic maps
9997#[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
10098pub enum MagneticResolution {
@@ -109,23 +107,23 @@ pub enum MagneticResolution {
109107 ThreeMinutes ,
110108 TwoMinutes ,
111109}
112- impl MagneticResolution {
113- /// Convert the resolution to a string. This can be used for calling the GMT library
114- fn as_str ( & self ) -> & ' static str {
115- match self {
116- MagneticResolution :: OneDegree => "01d" ,
117- MagneticResolution :: ThirtyMinutes => "30m" ,
118- MagneticResolution :: TwentyMinutes => "20m" ,
119- MagneticResolution :: FifteenMinutes => "15m" ,
120- MagneticResolution :: TenMinutes => "10m" ,
121- MagneticResolution :: SixMinutes => "06m" ,
122- MagneticResolution :: FiveMinutes => "05m" ,
123- MagneticResolution :: FourMinutes => "04m" ,
124- MagneticResolution :: ThreeMinutes => "03m" ,
125- MagneticResolution :: TwoMinutes => "02m" ,
126- }
127- }
128- }
110+ // impl MagneticResolution {
111+ // /// Convert the resolution to a string. This can be used for calling the GMT library
112+ // fn as_str(&self) -> &'static str {
113+ // match self {
114+ // MagneticResolution::OneDegree => "01d",
115+ // MagneticResolution::ThirtyMinutes => "30m",
116+ // MagneticResolution::TwentyMinutes => "20m",
117+ // MagneticResolution::FifteenMinutes => "15m",
118+ // MagneticResolution::TenMinutes => "10m",
119+ // MagneticResolution::SixMinutes => "06m",
120+ // MagneticResolution::FiveMinutes => "05m",
121+ // MagneticResolution::FourMinutes => "04m",
122+ // MagneticResolution::ThreeMinutes => "03m",
123+ // MagneticResolution::TwoMinutes => "02m",
124+ // }
125+ // }
126+ // }
129127/// Enum for the different types of maps. A GeoMap is defined by its measurement type and resolution.
130128#[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
131129pub enum GeophysicalMeasurementType {
@@ -369,7 +367,7 @@ impl GeoMap {
369367 let w22: f64 = ( ( lon - lon1) * ( lat - lat1) ) / ( ( lon2 - lon1) * ( lat2 - lat1) ) ;
370368 Some ( w11 * q11 + w12 * q12 + w21 * q21 + w22 * q22)
371369 }
372- // TODO: #95 Implement direct GMT interface using syscalls
370+ // TODO: #95 Implement direct GMT interface using system shell calls
373371}
374372//================= Map Information ========================================================================
375373
@@ -387,7 +385,7 @@ pub struct GeophysicalMeasurement<'a> {
387385///
388386/// The geophysical feedback model is different from traditional measurement models in that it needs to relate
389387/// a scalar (or vector) measurement to the position states. We can somewhat do this via a map, but the scalar
390- /// values on the map are not neccessarily unique. This means that we cannot directly use the measurement to
388+ /// values on the map are not necessarily unique. This means that we cannot directly use the measurement to
391389/// provide feedback and instead must use it to weight sigma points that do contain position information.
392390///
393391/// Working hypothesis: we can treat the UKF as a hybrid KF/PF where the sigma point / particles can be weighted
@@ -642,7 +640,7 @@ pub fn run_geophysical_navigation(
642640 + record. grav_z . powf ( 2.0 ) )
643641 . sqrt ( )
644642 - state[ 15 ] ;
645- let geo_measurement = GeophysicalMeasurement {
643+ let _geo_measurement = GeophysicalMeasurement {
646644 map : & geo_map,
647645 noise_std : measurement_standard_deviation,
648646 measurement : freeair,
@@ -656,7 +654,7 @@ pub fn run_geophysical_navigation(
656654 ( record. mag_x . powf ( 2.0 ) + record. mag_y . powf ( 2.0 ) + record. mag_z . powf ( 2.0 ) )
657655 . sqrt ( )
658656 - state[ 15 ] ;
659- let geo_measurement = GeophysicalMeasurement {
657+ let _geo_measurement = GeophysicalMeasurement {
660658 map : & geo_map,
661659 noise_std : measurement_standard_deviation,
662660 measurement : mag_anom,
0 commit comments