3.2.1. Estimating the Trajectories

Given the GLMB density at the end of each filtering cycle, the GLMB filter estimate is the result of the maximum posteriori estimate of the cardinality with the means of the object states being conditioned on the estimated cardinality [15]. Given that the possible highest number of tracked objects is *Nmax*, the cardinality distribution of the the objects set over a finite set of hypotheses {(*I*, *ξ*)*h*}*h*=1:*<sup>H</sup>* is written as follows:

$$\rho(n)|\_{n=0:N\_{\text{max}}} = \sum\_{\mathfrak{H}\in\{(I\_{\mathfrak{H}}\mathbb{Z})\_{\text{h}}\}\_{\text{h}=1:H}} \omega^{(\mathfrak{H})} \delta\_{\mathfrak{n}}(|I^{(\mathfrak{H})}|) \tag{23}$$

The estimated cardinality is given as follows:

$$
\hat{N} = \arg\max(\rho) \tag{24}
$$

The estimated hypothesis is as follows:

$$\hat{\mathfrak{H}} = \arg\max\_{(\mathfrak{H})} \omega^{(\mathfrak{H})} \delta\_{\hat{N}}(|I^{(\mathfrak{H})}|) \tag{25}$$

The information from the filtering stage needs to be captured to facilitate the multi-scan estimator. At this stage, we represent a set of estimated trajectories at time *k* with a set of tuples defined as Tˆ *<sup>k</sup>* - {(<sup>ˆ</sup> *l k* 1, ˆ *b*ˆ *l k* 1 , ˆ *ξ*ˆ *l k* 1 ), ...,(ˆ *l k N*ˆ , ˆ *b*ˆ *l k N*ˆ , ˆ *ξ*ˆ *l k N*ˆ )}, where <sup>ˆ</sup> *l k <sup>n</sup>*<sup>ˆ</sup> is the label of estimated trajectory *<sup>n</sup>* at time *<sup>k</sup>*, <sup>ˆ</sup> *b*ˆ *l k n*ˆ is its corresponding initial birth state (including the time of birth and initial kinematic state), and ˆ *ξ*ˆ *l k n*ˆ is the corresponding association history. In addition, we also have set of tuples for all estimated trajectories Tˆ from time step 1 to current time step *k*. This set of tuples is updated at the end of each filtering time step via updating the association history and initial birth state of existing trajectories and adding new tuples to the set if the trajectories are new. The procedure to update the tuples set is given in Algorithm 1.

**Algorithm 1** Updating trajectories tuples

$$\mathbf{Input} \colon \mathfrak{T}\_{k} = \{ (\mathring{l}\_{1'}^{\mathbb{k}}, \mathring{b}\_{\overline{l}\_{1}^{\mathbb{k}}}, \mathring{\xi}\_{l\_{1}^{\mathbb{k}}}), \ldots, (\mathring{l}\_{N'}^{\mathbb{k}}, \mathring{b}\_{\overline{l}\_{N'}^{\mathbb{k}}}, \mathring{\xi}\_{l\_{N}^{\mathbb{k}}}) \}, \mathfrak{T} = \{ (\mathring{l}\_{1'} \mathring{b}\_{\overline{l}\_{1}'}, \mathring{\xi}\_{\overline{l}\_{1}}), \ldots, (\mathring{l}\_{N'} \mathring{b}\_{\overline{l}\_{N'}'} \mathring{\xi}\_{\overline{l}\_{N}}) \}$$

**Output:** The updated trajectories tuples set Tˆ

```
for n = 1 to Nˆ
      if ˆ
          l
           k
           n ∈ {ˆ
                   l1, ..., ˆ
                          lN}
             Replace the tuple of label ˆ
                                                  l
                                                    k
                                                   n in Tˆ with (ˆ
                                                                      l
                                                                       k
                                                                       n, ˆ
                                                                          bˆ
                                                                           l
                                                                            k
                                                                            n
                                                                             , ˆ
                                                                               ξˆ
                                                                                l
                                                                                 k
                                                                                 n
                                                                                   )
      else
             Tˆ = Tˆ ∪ (ˆ
                           l
                            k
                            n, ˆ
                               bˆ
                                l
                                 k
                                 n
                                   , ˆ
                                    ξˆ
                                      l
                                       k
                                      n
                                        )
      end
end
```