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

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

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
MATLAB
Stars
22
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### 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:

```Index exceeds the number of array elements (6).

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.