(o: WorldObs)
| 96 | } |
| 97 | |
| 98 | push(o: WorldObs): void { |
| 99 | this.obs.push(o); |
| 100 | if (this.obs.length > MAX_OBS) this.obs.shift(); |
| 101 | this.hits++; |
| 102 | this.lastSeen = o.t; |
| 103 | this.emaContrast = this.emaContrast |
| 104 | ? this.emaContrast + 0.3 * (o.contrastSigma - this.emaContrast) |
| 105 | : o.contrastSigma; |
| 106 | if (o.netScore && o.netScore > 0) { |
| 107 | this.netHits++; |
| 108 | this.netBest = Math.max(this.netBest, o.netScore); |
| 109 | this.lastNetAt = o.t; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | latest(): WorldObs { |
| 114 | return this.obs[this.obs.length - 1]; |
no outgoing calls