[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Orekit Users] Correct values for DihedralFieldOfViewDetector axis1, axis2, and center

MAISONOBE Luc <luc.maisonobe@c-s.fr> a écrit :

Carlos Krefft <ckrefft@rsmas.miami.edu> a écrit :

Thanks Luc,

I'm using the TLEPropagator. Do you know if this insures earth is at a MINUS_J direction? If so, I should be okay right?

If you did not set any AttitudeProvider, then no it does not ensure Earth is in the MINUS_J direction. It will use Propagator.DEFAULT_LAW, which is a fixed orientation parallel to the EME2000 frame.

You can choose another AttitudeProvider either at construction when you call the selectPropagator method (one of the signatures have an AttitudeProvider parameter), or after construction by calling setAttitudeProvider.

If you want an attitude that has Y pointing to Earth, I would suggest this:

 AttitudeProvider ap =
    new  LofOffset(FramesFactory.getEME2000(), LOFType.LVLH,
                   RotationOrder.XYZ, 0.0, 0.0, 0.5 * FastMath.PI);

This creates an attitude provider that is bases on a Local Orbital Frame. Here, we selected the LVLH frame as the start orientation. The LVLH frame has its X axis aligned with position, and its Z axis aligned with orbital momentum (it is also known as the QSW frame in some references). On top of this frame, we add an offset as three Cardan rotations. Here the offset is defined in the order rotation around X, followed by rotation around Y, followed by rotation around Z and the two first rotations are in fact 0 while the third one is Pi/2 radians. Hence we move the Y axis so it points downwards.

Well, you should really start with -PI/2 so Y points upwards, not downwards ...


Beware I did not check precisely, I may have switched axes or angles. Typically if this does not work change the Pi/2 into -Pi/2 first.

Hope this helps

Carlos K.

-----Original Message-----
From: orekit-users-request@orekit.org [mailto:orekit-users-request@orekit.org] On Behalf Of MAISONOBE Luc
Sent: Friday, March 14, 2014 4:31 PM
To: orekit-users@orekit.org
Subject: Re: [Orekit Users] Correct values for DihedralFieldOfViewDetector axis1, axis2, and center

Hi Carlos,

Carlos Krefft <ckrefft@rsmas.miami.edu> a écrit :

Can anyone tell me what the correct values for axis1, axis2, and
center would be for a  target on earth?

I've modefined the DihedralFieldOfViewDetectorTest file

To have a target on earth but not sure what Vector3D parameter values
should be used for ground pointing:

GeodeticPoint point = new
FastMath.toRadians(-80.38402), 0.0);
               TopocentricFrame stationFrame = new
TopocentricFrame(earth, gPoint, "AOI");
               final PVCoordinatesProvider aoiTarget = stationFrame;

final double maxCheck  = 1.;

final Vector3D center = Vector3D.MINUS_J; final Vector3D axis1 =
Vector3D.PLUS_K; final Vector3D axis2 = Vector3D.PLUS_I;

It really depends on the attitude you have, because these vectors are defined in the spacecraft frame.

If you have an attitude provider that ensures the Earth is in the MINUS_J direction, then you should be fine. The "center" vectors defines the center of the field of view, i.e. the pointing direction of the instrument with respect to spacecraft frame, and the attitude provider defines the way the spacecraft frame is oriented with respect to the inertial frame. So it is basically a two step definition and you have to get both steps right.

Hope this helps

final double aperture1 = FastMath.toRadians(28); final double
aperture2 = FastMath.toRadians(120);

final EventDetector sunVisi =
          new DihedralFieldOfViewDetector(maxCheck, aoiTarget,
center, axis1, aperture1, axis2, aperture2).
          withHandler(new DihedralSunVisiHandler()); ...

Any help would be greatly appreciated.

Carlos Krefft

This message was sent using IMP, the Internet Messaging Program.

This message was sent using IMP, the Internet Messaging Program.

This message was sent using IMP, the Internet Messaging Program.