/* ----------------------------------------
 * Origin  : GFI INFORMATIQUE 
 * Project : CDPP Propagation Tool 
 * ----------------------------------------
 * History 
 * Version : 01/05/2015 : SCA : V2.1
 * Version : 07/04/2016 : SCA : V2.2 (PSWS-H2020)
 * => Add Z axis in propagation computation 
 * Version : 17/10/2018 : SCA : V2.2.5
 *  Redmine #6119 
 * ----------------------------------------
 */
package fr.tlse.irap.tool.sep;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

import fr.tlse.irap.spaceElement.SpaceElement;
import fr.tlse.irap.spaceElement.Sun;

public class SepEnd {

	private SpaceElement endSource;
	private Calendar endTime;
//	private double dtMin, dtMax;
	private double dtMinL, dtMaxL;
	private double dlMin, dlMax;
	private double length;  		// spiral length (start - end)
	private double deltaTime;		// 
	private double deltaLong;		// delta longitude of the spiral between start time and end time
	private Double longEnd, latEnd; // spheric coordinates of target at impact time (tmin)
	private Double longSep, latSep; // separation between start at time t and end at time t'
	private double distEnd; 		// distance away Target from SUN at t
	private boolean impacted;

	public SepEnd() {
		endTime = new GregorianCalendar();
	}

	public SpaceElement getEndSource() {
		return endSource;
	}
	public void setEndSource(SpaceElement endSource) {
		this.endSource = endSource;
	}
	public void setEndTime(Calendar endTime) {
		this.endTime = endTime;
	}
	public void setEndTime(Date d) {
		this.endTime.setTime(d);
	}
	public Calendar getEndTime() {
		return endTime;
	}
	public boolean isImpacted() {
		return impacted;
	}
	public void setImpacted(boolean impacted) {
		this.impacted = impacted;
	}
	public Double getLongEnd() {
		return longEnd;
	}
	public void setLongEnd(Double longEnd) {
		this.longEnd = longEnd;
	}
	public double getDistEnd() {
		return distEnd;
	}
	public void setDistEnd(double distEnd) {
		this.distEnd = distEnd;
	}
	public Double getLongSep() {
		return longSep;
	}
	public void setLongSep(Double longSep) {
		this.longSep = longSep;
	}
//	public double getDtMin() {
//		return dtMin;
//	}
//	public void setDtMin(double dtMin) {
//		this.dtMin = dtMin;
//	}
//	public double getDtMax() {
//		return dtMax;
//	}
//	public void setDtMax(double dtMax) {
//		this.dtMax = dtMax;
//	}
	public double getDlMin() {
		return dlMin;
	}
	public void setDlMin(double dlMin) {
		this.dlMin = dlMin;
	}
	public double getDlMax() {
		return dlMax;
	}
	public void setDlMax(double dlMax) {
		this.dlMax = dlMax;
	}
	public double getLength() {
		return length;
	}
	public void setLength(double length) {
		this.length = length;
	}
	public double getDtMaxL() {
		return dtMaxL;
	}
	public void setDtMaxL(double dtMaxL) {
		this.dtMaxL = dtMaxL;
	}
	public double getDtMinL() {
		return dtMinL;
	}
	public void setDtMinL(double dtMinL) {
		this.dtMinL = dtMinL;
	}
	public double getDeltaLong() {
		return deltaLong;
	}
	public void setDeltaLong(double deltaLong) {
		this.deltaLong = deltaLong;
	}
	public Double getLatEnd() {
		return latEnd;
	}
	public void setLatEnd(Double latEnd) {
		this.latEnd = latEnd;
	}
	public Double getLatSep() {
		return latSep;
	}
	public void setLatSep(Double latSep) {
		this.latSep = latSep;
	}
	public double getDeltaTime() {
		return deltaTime;
	}
	public void setDeltaTime(double deltaTime) {
		this.deltaTime = deltaTime;
	}

	public Boolean isSun() {
		return endSource != null ? endSource instanceof Sun : false;		
	}

}
