/// <summary> /// self calculate /// </summary> private void _calculate() { // assign startPosition lat & long if (this.trackPoints.Count() == 1 && this.trackPoints[0] != null) { if (this.trackPoints[0].Positions[0] != null) { // get lat, long from the first position TcxPosition startPosition = this.trackPoints[0].Positions[0]; this.startPositionLat = startPosition.LatitudeDegrees; this.startPositionLong = startPosition.LongitudeDegrees; } } }
/// <summary> /// add position to list /// </summary> /// <param name="position"></param> public void AddPosition(TcxPosition position) { this.positions.Add(position); this._calculate(); }