/* ----------------------------------------
 * 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.corotation;

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 CorotationEnd {

	private SpaceElement endSource;
	private Calendar endTime;
//	private double dtMin, dtMax;
	private double dvMin, dvMax;
	private double dphiMin, dphiMax;
	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 longEndSource, latEndSource;  // spheric coordinates of spiral source at impact time (tmin) 
	private double distEnd; 			// distance away Target from SUN at t
	private boolean impacted;
	
	public CorotationEnd() {
		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 getLatEnd() {
		return latEnd;
	}
	public void setLatEnd(Double latEnd) {
		this.latEnd = latEnd;
	}
	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 getDvMin() {
		return dvMin;
	}
	public void setDvMin(double dvMin) {
		this.dvMin = dvMin;
	}
	public double getDvMax() {
		return dvMax;
	}
	public void setDvMax(double dvMax) {
		this.dvMax = dvMax;
	}
	public double getDphiMin() {
		return dphiMin;
	}
	public void setDphiMin(double dphiMin) {
		this.dphiMin = dphiMin;
	}
	public double getDphiMax() {
		return dphiMax;
	}
	public void setDphiMax(double dphiMax) {
		this.dphiMax = dphiMax;
	}
	public Double getLatSep() {
		return latSep;
	}
	public void setLatSep(Double latSep) {
		this.latSep = latSep;
	}
	public Double getLongEndSource() {
		return longEndSource;
	}
	public void setLongEndSource(Double longEndSource) {
		this.longEndSource = longEndSource;
	}
	public Double getLatEndSource() {
		return latEndSource;
	}
	public void setLatEndSource(Double latEndSource) {
		this.latEndSource = latEndSource;
	}

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

}
