Skip to content

Conversation

@jorgenfj
Copy link
Contributor

Split the steps function of PDAF and IPDA into separate predict and update functions.
Added z_likelihood function.
Removed redundant z_likelihood calculation in IPDA.

Fixed this if-statement bug that negated the function of the config arg.

        if (!(z_measurements.cols() == 0 &&
              config.ipda.update_existence_probability_on_no_detection)) {
            existence_probability_upd = existence_prob_update(
                z_meas_inside, z_pred, existence_prob_pred, config);
        }

@jorgenfj jorgenfj requested a review from Q3rkses December 12, 2025 14:35
@jorgenfj jorgenfj linked an issue Dec 12, 2025 that may be closed by this pull request
3 tasks
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 92.68293% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.88%. Comparing base (8f3a31c) to head (2d81e5e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...iltering/include/vortex_filtering/filters/ipda.hpp 91.17% 1 Missing and 2 partials ⚠️
...iltering/include/vortex_filtering/filters/pdaf.hpp 91.66% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   84.75%   84.88%   +0.13%     
==========================================
  Files          37       37              
  Lines        1882     1813      -69     
  Branches     1214     1220       +6     
==========================================
- Hits         1595     1539      -56     
+ Misses         57       50       -7     
+ Partials      230      224       -6     
Flag Coverage Δ
unittests 84.88% <92.68%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ering/include/vortex_filtering/filters/immipda.hpp 91.35% <100.00%> (+1.23%) ⬆️
vortex-filtering/test/ipda_test.cpp 95.23% <100.00%> (-0.22%) ⬇️
vortex-filtering/test/pdaf_test.cpp 86.70% <100.00%> (-0.66%) ⬇️
...iltering/include/vortex_filtering/filters/ipda.hpp 88.37% <91.17%> (+5.03%) ⬆️
...iltering/include/vortex_filtering/filters/pdaf.hpp 92.64% <91.66%> (+10.67%) ⬆️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jorgenfj jorgenfj requested a review from Andeshog December 15, 2025 10:48
Comment on lines 73 to 79
static std::tuple<Gauss_x, Gauss_z, double> predict(
const DynModT dyn_mod,
const SensModT& sens_mod,
double dt,
const State& state_est_prev,
const Arr_zXd& z_measurements,
Config& config) {
Copy link

@Andeshog Andeshog Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass dyn_mod as reference here perhaps?

Also, using strong typing would make it much easier to use such a function IMO. Something like this maybe (also put the models together to decrease the number of inputs)

static PredictedState predict(const Models& models, const double dt, const State& prev_est_state, const Arr_zXd& z_measurements, Config& config)

Another thing, does it make sense to move the config update to a function call after this function is called, since it takes inputs and outputs to/from predict anyway. Reason; I would not expect a function named predict to also update one of the inputs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same applies to update below

Comment on lines +180 to +181
double P_s = prob_of_survival;
return P_s * r_km1; // (7.28)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess it would be nice to state the source as well, not just the equation number 😅

Comment on lines 214 to 217
static double estimate_clutter_intensity(const Gauss_z& z_pred,
double existence_prob_pred,
double num_measurements,
Config config) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make config const ref perhaps

Copy link

@Andeshog Andeshog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments apply up to several places btw, didnt want to repeat too much. And other than that LGTM (Approval with suggestions)

@jorgenfj jorgenfj merged commit 646d788 into main Dec 15, 2025
3 checks passed
@jorgenfj jorgenfj deleted the pdaf-ipda-refactor branch December 15, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Expose measurement likelihoods from PDAF for IPDA integration

3 participants