org.stellarium
Class Navigator

java.lang.Object
  extended by org.stellarium.Navigator
All Implemented Interfaces:
NavigatorIfc

public class Navigator
extends java.lang.Object
implements NavigatorIfc

Version:
0.8.2
Author:
Jerome Beau, Fred Simon

Nested Class Summary
private  class Navigator.AutoMove
          Struct used to store data for auto mov
 
Nested classes/interfaces inherited from interface org.stellarium.NavigatorIfc
NavigatorIfc.VIEWING_MODE_TYPE
 
Field Summary
private  javax.vecmath.Point3d equVision
           
private  boolean flagAutoMove
          Define if automove is on or off
private  boolean flagLockEquPos
          Define if the equatorial position is locked
private  boolean flagTracking
          Define if the selected object is followed
private  double jDay
          Curent time in Julian day
private  javax.vecmath.Point3d localVision
          Viewing direction in local and equatorial coordinates
static javax.vecmath.Matrix4d mat_j2000_to_vsop87
           
static javax.vecmath.Matrix4d mat_vsop87_to_j2000
           
private  javax.vecmath.Matrix4d matEarthEquToEye
          Modelview matrix for geocentric equatorial drawing
private  javax.vecmath.Matrix4d matEarthEquToJ2000
           
private  javax.vecmath.Matrix4d matEarthEquToLocal
          Transform from Observator local coordinate to Earth Equatorial
private  javax.vecmath.Matrix4d matHelioToEarthEqu
          Transform from Heliocentric to earth equatorial coordinate
private  javax.vecmath.Matrix4d matHelioToEye
          Modelview matrix for heliocentric equatorial drawing
private  javax.vecmath.Matrix4d matHelioToLocal
          Transform from Heliocentric to Observator local coordinate
private  javax.vecmath.Matrix4d matJ2000ToEarthEqu
           
private  javax.vecmath.Matrix4d matJ2000ToEye
          precessed version
private  javax.vecmath.Matrix4d matLocalToEarthEqu
          Transform from Observator local coordinate to Earth Equatorial
private  javax.vecmath.Matrix4d matLocalToEye
          Modelview matrix for observer local drawing
private  javax.vecmath.Matrix4d matLocalToHelio
          Transform from Observator local coordinate to Heliocentric
private  Navigator.AutoMove move
          Current auto movement
private  Observator position
           
private  javax.vecmath.Point3d precEquVision
           
private  double timeSpeed
          Positive : forward, Negative : Backward, 1 = 1sec/sec
private  NavigatorIfc.VIEWING_MODE_TYPE viewingMode
          defines if view corrects for horizon, or uses equatorial coordinates
private  int zoomingMode
          0 : undefined, 1 zooming, -1 unzooming
 
Fields inherited from interface org.stellarium.NavigatorIfc
JD_DAY, JD_HOUR, JD_MINUTE, JD_SECOND
 
Constructor Summary
Navigator(Observator obs)
           
 
Method Summary
(package private)  javax.vecmath.Point3d earthEquToJ2000(javax.vecmath.Point3d v)
           
 javax.vecmath.Point3d earthEquToLocal(javax.vecmath.Point3d v)
          Transform vector from equatorial coordinate to local
 javax.vecmath.Matrix4d getEarthEquToEyeMat()
           
(package private)  javax.vecmath.Point3d getEquVision()
           
 boolean getFlagLockEquPos()
           
 boolean getFlagTraking()
           
 javax.vecmath.Matrix4d getHelioToEyeMat()
          Return the modelview matrix for some coordinate systems
 Planet getHomePlanet()
           
 javax.vecmath.Matrix4d getJ2000ToEyeMat()
           
 double getJDay()
           
 javax.vecmath.Matrix4d getLocalToEyeMat()
           
(package private)  javax.vecmath.Point3d getLocalVision()
           
 javax.vecmath.Matrix4d getMatVsop87ToJ2000()
           
 javax.vecmath.Point3d getObserverHelioPos()
           
 javax.vecmath.Point3d getPrecEquVision()
           
 double getTimeSpeed()
           
 NavigatorIfc.VIEWING_MODE_TYPE getViewingMode()
           
 javax.vecmath.Vector3d helioToEarthEqu(javax.vecmath.Vector3d v)
          Transform vector from heliocentric coordinate to earth equatorial
 javax.vecmath.Point3d helioToEarthPosEqu(javax.vecmath.Point3d v)
          Transform vector from heliocentric coordinate to false equatorial : equatorial coordinate but centered on the observer position (usefull for objects close to earth)
(package private)  void helioToLocal(javax.vecmath.Point3d v)
          Transform vector from heliocentric coordinate to local
 javax.vecmath.Point3d j2000ToEarthEqu(javax.vecmath.Point3d v)
           
 javax.vecmath.Point3d localToEarthEqu(javax.vecmath.Point3d v)
          Transform point from local coordinate to equatorial
 void moveTo(javax.vecmath.Point3d aim, float moveDuration)
          Move to the given equatorial position
(package private)  void moveTo(javax.vecmath.Point3d aim, float moveDuration, boolean localPos, int zooming)
          Move to the given equatorial position
 void setFlagLockEquPos(boolean v)
           
 void setFlagTraking(boolean v)
           
 void setJDay(double jd)
          Time controls
(package private)  void setLocalVision(javax.vecmath.Point3d pos)
           
 void setTimeSpeed(double ts)
           
 void setViewingMode(NavigatorIfc.VIEWING_MODE_TYPE viewMode)
          Set Type of viewing mode (align with horizon or equatorial coordinates)
(package private)  void switchToEarthEquatorial()
           
 void switchToHeliocentric()
          Place openGL in heliocentric ecliptical coordinates
 void switchToLocal()
          Place openGL in local viewer coordinates (Usually somewhere on earth viewing in a specific direction)
 void switchViewingMode()
           
(package private)  void updateModelViewMat()
          Update the modelview matrices
(package private)  void updateMove(double deltaAz, double deltaAlt)
           
(package private)  void updateTime(int deltaTime)
          Increment time
 void updateTransformMatrices()
           
(package private)  void updateVisionVector(int deltaTime, StelObject selected)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mat_j2000_to_vsop87

public static final javax.vecmath.Matrix4d mat_j2000_to_vsop87

mat_vsop87_to_j2000

public static final javax.vecmath.Matrix4d mat_vsop87_to_j2000

matHelioToLocal

private javax.vecmath.Matrix4d matHelioToLocal
Transform from Heliocentric to Observator local coordinate


matLocalToHelio

private javax.vecmath.Matrix4d matLocalToHelio
Transform from Observator local coordinate to Heliocentric


matLocalToEarthEqu

private javax.vecmath.Matrix4d matLocalToEarthEqu
Transform from Observator local coordinate to Earth Equatorial


matEarthEquToLocal

private javax.vecmath.Matrix4d matEarthEquToLocal
Transform from Observator local coordinate to Earth Equatorial


matHelioToEarthEqu

private javax.vecmath.Matrix4d matHelioToEarthEqu
Transform from Heliocentric to earth equatorial coordinate


matEarthEquToJ2000

private javax.vecmath.Matrix4d matEarthEquToJ2000

matJ2000ToEarthEqu

private javax.vecmath.Matrix4d matJ2000ToEarthEqu

matLocalToEye

private javax.vecmath.Matrix4d matLocalToEye
Modelview matrix for observer local drawing


matEarthEquToEye

private javax.vecmath.Matrix4d matEarthEquToEye
Modelview matrix for geocentric equatorial drawing


matJ2000ToEye

private javax.vecmath.Matrix4d matJ2000ToEye
precessed version


matHelioToEye

private javax.vecmath.Matrix4d matHelioToEye
Modelview matrix for heliocentric equatorial drawing


localVision

private javax.vecmath.Point3d localVision
Viewing direction in local and equatorial coordinates


equVision

private javax.vecmath.Point3d equVision

precEquVision

private javax.vecmath.Point3d precEquVision

flagTracking

private boolean flagTracking
Define if the selected object is followed


flagLockEquPos

private boolean flagLockEquPos
Define if the equatorial position is locked


move

private Navigator.AutoMove move
Current auto movement


flagAutoMove

private boolean flagAutoMove
Define if automove is on or off


zoomingMode

private int zoomingMode
0 : undefined, 1 zooming, -1 unzooming


timeSpeed

private double timeSpeed
Positive : forward, Negative : Backward, 1 = 1sec/sec


jDay

private double jDay
Curent time in Julian day


position

private Observator position

viewingMode

private NavigatorIfc.VIEWING_MODE_TYPE viewingMode
defines if view corrects for horizon, or uses equatorial coordinates

Constructor Detail

Navigator

Navigator(Observator obs)
    throws StellariumException
Throws:
StellariumException
Method Detail

getMatVsop87ToJ2000

public javax.vecmath.Matrix4d getMatVsop87ToJ2000()
Specified by:
getMatVsop87ToJ2000 in interface NavigatorIfc

updateVisionVector

void updateVisionVector(int deltaTime,
                        StelObject selected)

setLocalVision

void setLocalVision(javax.vecmath.Point3d pos)

updateMove

void updateMove(double deltaAz,
                double deltaAlt)

updateTime

void updateTime(int deltaTime)
Increment time

Parameters:
deltaTime -

updateTransformMatrices

public void updateTransformMatrices()

updateModelViewMat

void updateModelViewMat()
Update the modelview matrices


getObserverHelioPos

public javax.vecmath.Point3d getObserverHelioPos()
Specified by:
getObserverHelioPos in interface NavigatorIfc
Returns:
the observer heliocentric position

moveTo

public void moveTo(javax.vecmath.Point3d aim,
                   float moveDuration)
Move to the given equatorial position

Parameters:
aim -
moveDuration -

moveTo

void moveTo(javax.vecmath.Point3d aim,
            float moveDuration,
            boolean localPos,
            int zooming)
Move to the given equatorial position

Parameters:
aim -
moveDuration -
localPos -
zooming -

setViewingMode

public void setViewingMode(NavigatorIfc.VIEWING_MODE_TYPE viewMode)
Set Type of viewing mode (align with horizon or equatorial coordinates)

Parameters:
viewMode -

switchViewingMode

public void switchViewingMode()

setJDay

public void setJDay(double jd)
Time controls

Parameters:
jd - Julian Day

getJDay

public double getJDay()
Specified by:
getJDay in interface NavigatorIfc

setTimeSpeed

public void setTimeSpeed(double ts)

getTimeSpeed

public double getTimeSpeed()

setFlagTraking

public void setFlagTraking(boolean v)

getFlagTraking

public boolean getFlagTraking()

setFlagLockEquPos

public void setFlagLockEquPos(boolean v)

getFlagLockEquPos

public boolean getFlagLockEquPos()

getEquVision

javax.vecmath.Point3d getEquVision()
Returns:
The vision direction

getPrecEquVision

public javax.vecmath.Point3d getPrecEquVision()
Specified by:
getPrecEquVision in interface NavigatorIfc

getLocalVision

javax.vecmath.Point3d getLocalVision()

getHomePlanet

public Planet getHomePlanet()
Specified by:
getHomePlanet in interface NavigatorIfc

switchToEarthEquatorial

void switchToEarthEquatorial()

switchToHeliocentric

public void switchToHeliocentric()
Place openGL in heliocentric ecliptical coordinates


switchToLocal

public void switchToLocal()
Place openGL in local viewer coordinates (Usually somewhere on earth viewing in a specific direction)

Specified by:
switchToLocal in interface NavigatorIfc

localToEarthEqu

public javax.vecmath.Point3d localToEarthEqu(javax.vecmath.Point3d v)
Transform point from local coordinate to equatorial

Specified by:
localToEarthEqu in interface NavigatorIfc

earthEquToLocal

public javax.vecmath.Point3d earthEquToLocal(javax.vecmath.Point3d v)
Transform vector from equatorial coordinate to local

Specified by:
earthEquToLocal in interface NavigatorIfc

earthEquToJ2000

javax.vecmath.Point3d earthEquToJ2000(javax.vecmath.Point3d v)

j2000ToEarthEqu

public javax.vecmath.Point3d j2000ToEarthEqu(javax.vecmath.Point3d v)
Specified by:
j2000ToEarthEqu in interface NavigatorIfc

helioToLocal

void helioToLocal(javax.vecmath.Point3d v)
Transform vector from heliocentric coordinate to local

Parameters:
v - the helio pos

helioToEarthEqu

public javax.vecmath.Vector3d helioToEarthEqu(javax.vecmath.Vector3d v)
Transform vector from heliocentric coordinate to earth equatorial

Specified by:
helioToEarthEqu in interface NavigatorIfc

helioToEarthPosEqu

public javax.vecmath.Point3d helioToEarthPosEqu(javax.vecmath.Point3d v)
Transform vector from heliocentric coordinate to false equatorial : equatorial coordinate but centered on the observer position (usefull for objects close to earth)

Specified by:
helioToEarthPosEqu in interface NavigatorIfc

getHelioToEyeMat

public javax.vecmath.Matrix4d getHelioToEyeMat()
Return the modelview matrix for some coordinate systems

Specified by:
getHelioToEyeMat in interface NavigatorIfc

getEarthEquToEyeMat

public javax.vecmath.Matrix4d getEarthEquToEyeMat()

getLocalToEyeMat

public javax.vecmath.Matrix4d getLocalToEyeMat()
Specified by:
getLocalToEyeMat in interface NavigatorIfc

getJ2000ToEyeMat

public javax.vecmath.Matrix4d getJ2000ToEyeMat()
Specified by:
getJ2000ToEyeMat in interface NavigatorIfc

getViewingMode

public NavigatorIfc.VIEWING_MODE_TYPE getViewingMode()