define(['moment'], function(moment){
	var TM = function(lats, lons, time, drifterId, hoursModel, trackWay){
		this.lats = lats;
		this.lons = lons;
		this.time = time;
		this.drifterId = drifterId;
		this.hoursModel = hoursModel;

		this.path = [];
		for(var i=0; i<this.lats.length; i++){
			var humanTime = '';
			if (trackWay == 'backward') {
				humanTime = moment(this.hoursModel.max).subtract(this.time[i], 'hours').format('YYYY/MM/DD HH:mm');
			} else if (trackWay == 'forward') {
				humanTime = moment(this.hoursModel.min).add(this.time[i], 'hours').format('YYYY/MM/DD HH:mm');
			}
			this.path.push({lat: this.lats[i], lon: this.lons[i], time: this.time[i], humanTime: humanTime});
		}
	}

	TM.prototype.getPath = function(){
		return this.path;
	}

	TM.prototype.getDrifterId = function(){
		return this.drifterId;
	}

	return TM;
});