Airspace-Encounter-Models / em-model-manned-bayes

Manned Bayesian Network Encounter Models
BSD 2-Clause "Simplified" License
14 stars 7 forks source link

[BUG] Terminal encounter generation throws exception in get.r_transition #46

Open reliable-nranganathan opened 2 years ago

reliable-nranganathan commented 2 years ago

Description

Terminal path generation appears broken due to a bug when setting priors in CorTerminalModel.track. It appears that, while there are n=9 transition states, there are only 6 entries in the cutpoints cell array, causing the following exception:



Error in EncounterModel/get.r_transition (line 316)
                value(i) = length(self.cutpoints_transition{i}) + 1;

Error in CorTerminalModel/createEncounter>PropagateTrajectory (line 129)
    prior_transition = setTransitionPriors(mdl.G_transition, mdl.r_transition, mdl.temporal_map, 1);

Error in CorTerminalModel/createEncounter (line 71)
        fwd = PropagateTrajectory(is_ownship, mdl_forwards, 1, x0_nm(ii), y0_nm(ii), z0_ft(ii), speed0_ft_s(ii),
        heading0_deg(ii), intent, tmax_s, dynlims);

Error in CorTerminalModel/track (line 62)
            [traj] = self.createEncounter(sample_geo, tmax_s);

Error in RUN_terminal (line 44)
        mdl.track(1, 'firstID', ii, 'initialSeed', init_seed, 'isPlot', true);```

### Reproducibility

Running RUN_terminal.m with no modifications should reproduce the error.

### Expectation
I believe the issue is that there are not enough boundaries set in the model .txt files - so I believe adding extra asterisks where appropriate should resolve the issue. 

### Environment
Debian 10, MATLAB R2021a
aweinert-MIT commented 2 years ago

Are you using this with the RADES-based correlated en-route model or the more recent terminal encounter model?