@@ -632,21 +632,26 @@ pub fn relative_altitude_jacobian(_state: &StrapdownState) -> DMatrix<f64> {
632632
633633/// Compute measurement Jacobian (H) for gravity anomaly measurement
634634///
635- /// **Note**: This is a placeholder function for future use. Currently, the EKF computes
636- /// measurement Jacobians internally during the update step. This function provides a
637- /// template structure for when custom Jacobian computation is integrated into the EKF.
635+ /// **Note**: This is a placeholder function that returns zeros. Geophysical measurements
636+ /// (gravity anomaly and magnetic anomaly) now provide their own Jacobians via the
637+ /// `MeasurementModel::get_jacobian()` trait method. The EKF update function automatically
638+ /// detects and uses these measurement-provided Jacobians.
638639///
639640/// Gravity anomaly measurements depend on latitude and longitude (position) to query the
640- /// geophysical map. The partial derivatives ∂z/∂lat and ∂z/∂lon would be computed
641- /// numerically by the measurement model based on map gradients.
641+ /// geophysical map. The partial derivatives ∂z/∂lat and ∂z/∂lon are computed numerically
642+ /// by the `GravityMeasurement` struct in the `strapdown-geonav` crate based on map gradients.
642643///
643644/// # Arguments
644645///
645- /// * `_state` - Current navigation state (reserved for future use )
646+ /// * `_state` - Current navigation state (unused, this is a placeholder )
646647///
647648/// # Returns
648649///
649- /// 1×9 measurement Jacobian matrix H template for gravity anomaly (currently zeros)
650+ /// 1×9 measurement Jacobian matrix H filled with zeros (placeholder)
651+ ///
652+ /// # See Also
653+ ///
654+ /// For actual gravity anomaly Jacobian computation, see `geonav::GravityMeasurement::get_jacobian_internal()`.
650655///
651656/// # Example
652657///
@@ -660,34 +665,35 @@ pub fn relative_altitude_jacobian(_state: &StrapdownState) -> DMatrix<f64> {
660665/// assert_eq!(h.ncols(), 9);
661666/// ```
662667pub fn gravity_anomaly_jacobian ( _state : & StrapdownState ) -> DMatrix < f64 > {
663- // Gravity anomaly depends on position (lat, lon) through map lookup
664- // The partial derivatives ∂z/∂lat and ∂z/∂lon are computed numerically
665- // by the measurement model based on map gradients
666-
667- // These will be filled in by the measurement model with numerical derivatives
668- // from the geophysical map interpolation
669- // h[(0, 0)] = ∂(anomaly)/∂(lat) - computed from map gradient
670- // h[(0, 1)] = ∂(anomaly)/∂(lon) - computed from map gradient
668+ // NOTE: This is a placeholder. Real gravity anomaly Jacobians are provided
669+ // by the GravityMeasurement struct in the geonav crate via the
670+ // MeasurementModel::get_jacobian() trait method. The EKF will automatically
671+ // use the measurement-provided Jacobian when available.
671672 DMatrix :: < f64 > :: zeros ( 1 , 9 )
672673}
673674
674675/// Compute measurement Jacobian (H) for magnetic anomaly measurement
675676///
676- /// **Note**: This is a placeholder function for future use. Currently, the EKF computes
677- /// measurement Jacobians internally during the update step. This function provides a
678- /// template structure for when custom Jacobian computation is integrated into the EKF.
677+ /// **Note**: This is a placeholder function that returns zeros. Geophysical measurements
678+ /// (gravity anomaly and magnetic anomaly) now provide their own Jacobians via the
679+ /// `MeasurementModel::get_jacobian()` trait method. The EKF update function automatically
680+ /// detects and uses these measurement-provided Jacobians.
679681///
680682/// Magnetic anomaly measurements depend on latitude and longitude (position) to query the
681- /// geophysical map. The partial derivatives ∂z/∂lat and ∂z/∂lon would be computed
682- /// numerically by the measurement model based on map gradients.
683+ /// geophysical map. The partial derivatives ∂z/∂lat and ∂z/∂lon are computed numerically
684+ /// by the `MagneticAnomalyMeasurement` struct in the `strapdown-geonav` crate based on map gradients.
683685///
684686/// # Arguments
685687///
686- /// * `_state` - Current navigation state (reserved for future use )
688+ /// * `_state` - Current navigation state (unused, this is a placeholder )
687689///
688690/// # Returns
689691///
690- /// 1×9 measurement Jacobian matrix H template for magnetic anomaly (currently zeros)
692+ /// 1×9 measurement Jacobian matrix H filled with zeros (placeholder)
693+ ///
694+ /// # See Also
695+ ///
696+ /// For actual magnetic anomaly Jacobian computation, see `geonav::MagneticAnomalyMeasurement::get_jacobian_internal()`.
691697///
692698/// # Example
693699///
@@ -701,14 +707,10 @@ pub fn gravity_anomaly_jacobian(_state: &StrapdownState) -> DMatrix<f64> {
701707/// assert_eq!(h.ncols(), 9);
702708/// ```
703709pub fn magnetic_anomaly_jacobian ( _state : & StrapdownState ) -> DMatrix < f64 > {
704- // Magnetic anomaly depends on position (lat, lon) through map lookup
705- // The partial derivatives ∂z/∂lat and ∂z/∂lon are computed numerically
706- // by the measurement model based on map gradients
707-
708- // These will be filled in by the measurement model with numerical derivatives
709- // from the geophysical map interpolation
710- // h[(0, 0)] = ∂(anomaly)/∂(lat) - computed from map gradient
711- // h[(0, 1)] = ∂(anomaly)/∂(lon) - computed from map gradient
710+ // NOTE: This is a placeholder. Real magnetic anomaly Jacobians are provided
711+ // by the MagneticAnomalyMeasurement struct in the geonav crate via the
712+ // MeasurementModel::get_jacobian() trait method. The EKF will automatically
713+ // use the measurement-provided Jacobian when available.
712714 DMatrix :: < f64 > :: zeros ( 1 , 9 )
713715}
714716
0 commit comments