/* ----------------------------------------
 * Origin  : GFI INFORMATIQUE 
 * Project : CDPP Propagation Tool 
 * ----------------------------------------
 * History 
 * Version : 01/05/2015 : SCA : V2.1
 * Version : 05/05/2022 : LBE : V2.5
 * DM-ID : Redmine#9229 : 01/05/2022 : PFSS mode
 * ----------------------------------------
 */
package fr.tlse.irap.fieldLine;

import java.io.Serializable;

public class Footpoint implements Serializable {

	private static final long serialVersionUID = 1L;

	private float lon = Float.NaN;
	private float lat = Float.NaN; 
        //used for x/y/z input in model
        //input position in km for web service
	private float x = Float.NaN;
	private float y = Float.NaN;
	private float z = Float.NaN;

	public Footpoint() {
		super();
	}

	public Footpoint(float lon, float lat) {
		this.lon = lon;
		this.lat = lat;
	}

	public float getLon() {
		return lon;
	}

	public void setLon(float lon) {
		this.lon = lon;
	}

	public float getLat() {
		return lat;
	}

	public void setLat(float lat) {
		this.lat = lat;
	}
        
	public void setXYZ(float x, float y, float z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}
	public float[] getXYZ() {
            if(Float.isNaN(x)) return null;
            return new float[]{x,y,z};
	}

    /**
     * @return the x
     */
    public float getX() {
        return x;
    }

    /**
     * @param x the x to set
     */
    public void setX(float x) {
        this.x = x;
    }

    /**
     * @return the y
     */
    public float getY() {
        return y;
    }

    /**
     * @param y the y to set
     */
    public void setY(float y) {
        this.y = y;
    }

    /**
     * @return the z
     */
    public float getZ() {
        return z;
    }

    /**
     * @param z the z to set
     */
    public void setZ(float z) {
        this.z = z;
    }

}
