diff --git a/src/graph/Node.ts b/src/graph/Node.ts index 8ff33e2a..70198ff9 100644 --- a/src/graph/Node.ts +++ b/src/graph/Node.ts @@ -55,6 +55,14 @@ export class NewNode { return this._fill.captured_at; } + public get computedCA(): number { + return this._fill.cca; + } + + public get computedLatLon(): ILatLon { + return this._core.cl; + } + public get focal(): number { return this._fill.cfocal; } @@ -136,6 +144,14 @@ export class NewNode { return this._fill.orientation; } + public get originalCA(): number { + return this._fill.ca; + } + + public get originalLatLon(): ILatLon { + return this._core.l; + } + /** * Get pano. * diff --git a/src/state/states/StateBase.ts b/src/state/states/StateBase.ts index 681c8aca..41672ecd 100644 --- a/src/state/states/StateBase.ts +++ b/src/state/states/StateBase.ts @@ -246,7 +246,7 @@ export abstract class StateBase implements IState { return nodesSet && !( this._currentNode.merged && this._previousNode.merged && - this._withinDistance() && + this._withinOriginalDistance() && this._sameConnectedComponent() ); } @@ -357,7 +357,7 @@ export abstract class StateBase implements IState { return current.mergeCC === previous.mergeCC; } - private _withinDistance(): boolean { + private _withinOriginalDistance(): boolean { let current: NewNode = this._currentNode; let previous: NewNode = this._previousNode; @@ -367,10 +367,10 @@ export abstract class StateBase implements IState { // 50 km/h moves 28m in 2s let distance: number = this._spatial.distanceFromLatLon( - current.latLon.lat, - current.latLon.lon, - previous.latLon.lat, - previous.latLon.lon); + current.originalLatLon.lat, + current.originalLatLon.lon, + previous.originalLatLon.lat, + previous.originalLatLon.lon); return distance < 25; }