/*=========================================================================

  Program:   Orbit Visualization Tool
  Source:    $Source: /stor/devel/ovt2g/ovt/datatype/TrajectoryPoint.java,v $
  Date:      $Date: 2000/04/11 15:42:01 $
  Version:   $Revision: 1.4 $


Copyright (c) 2000 OVT Team (Kristof Stasiewicz, Mykola Khotyaintsev, 
Yuri Khotyaintsev)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification is permitted provided that the following conditions are met:

 * No part of the software can be included in any commercial package without
written consent from the OVT team.

 * Redistributions of the source or binary code must retain the above
copyright notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT OR
INDIRECT DAMAGES  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE.

OVT Team (http://ovt.irfu.se)   K. Stasiewicz, M. Khotyaintsev, Y.
Khotyaintsev

=========================================================================*/

package ovt.datatype;

import ovt.object.*;

public class TrajectoryPoint {
/** modified Julian day */
   public double mjd;   
/** magentic field model used to distances */       
   public double model;	
/** radius vector (RE)  */
   public double rr;		
/** GEI coordinates (RE) of the satellite */
   public double gei[];       
/** GEI velocity  km/s  */
   public double vei[];
/** GEO coordinates (RE) of the satellite */   
   public double geo[];       
/** GSM coordinates (RE) of the satellite */
   public double gsm[];
/** GSE coordinates (RE) of the satellite */      
   public double gse[];	
/** SM coordinates (RE) of the satellite */      
   public double sm[];	
/** distant footprint (GSM) of the sat.   */
   public double dgsm[];      
/** footprint coord (GEO) at FALT */
   public double fgeo[];      
/** footprint coord (SM)  corrected mag   */
   public double fsmc[];       
/** footprint coord (SM)     */
   public double fsm[];       
/** equatorial foot in GSM */
   public double efoot_gsm[]; 
/** north=0/south=1 foot COR  [2][3]*/
   public double foot_cor[][]; 
/** north=0/south=1 foot GEO  [2][3] */
   public double foot_geo[][]; 
/** distance from bow shock (RE) */
   public double dist_bs;      
/** distance from magnetopause   */
   public double dist_mp;      
/** distance from equatorial structure */
   public double dist_eq;      
/** distance from the exterior cusp */
   public double dist_cu;      
   
 /*  public trajectory(trajectory tra) {
     this.mjd = mjd;          
     this.model = model;	
     this.rr = rr;		
     this.gei[] = new double[3];
     this.vei[] = new double[3];
     this.geo[] = new double[3];
     this.gsm[] = new double[3];
     this.gse[] = new double[3];
     this.dgsm[] = new double[3];
     this.fgeo[] = new double[3];
     this.fsmc[] = new double[3];
     this.fsm[] = new double[3]; 
     this.efoot_gsm[] = new double[3];
     this.foot_cor[][] = new double[2][3];
     this.foot_geo[][] = new double[2][3];
     this.dist_bs = dist_bs;      
     this.dist_mp = dist_mp;      
     this.dist_eq = dist_eq;      
     this.dist_cu = dist_cu;      
   }*/

/**
 * Returns point in the coordinate system <code>coordinateSystem</code>
 * @see ovt.Const#GEI
 */

  public double[] get(int coordinateSystem) throws IllegalArgumentException {
    switch (coordinateSystem) {
    	case CoordinateSystem.GEI:  return gei;
    	case CoordinateSystem.GSM:  return gsm;
    	case CoordinateSystem.GSE:  return gse;
        case CoordinateSystem.SM:  return sm;
    	//case Const.GSEQ: return "GSEQ";
    	case CoordinateSystem.GEO:  return geo;
    	/*case Const.SMC:  return "SMC";
    	case Const.COR:  return "COR";
    	case Const.ECC:  return "ECC";*/
    }
    throw new IllegalArgumentException("Invalid coord system '" + coordinateSystem + "'");
  }

}       


