Class LocalMagneticFieldFrame
- java.lang.Object
-
- org.orekit.frames.LocalMagneticFieldFrame
-
- All Implemented Interfaces:
LOF
public class LocalMagneticFieldFrame extends Object implements LOF
This class handles a magnetic field variation attitude provider.It was designed to be used as a Bdot attitude pointing law which align a specific body axis with Earth magnetic field vector.
Attitude control thought the magnetic field is called Bdot as it follows the sinusoidal variation of the Earth magnetic field vector, along the orbit. Magnetorquers are used on board to align the instrument, as so the satellite, with the planet magnetic field, producing a sinusoidal torque along the orbit.
- Author:
- Alberto Ferrero, Vincent Cucchietti
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocalMagneticFieldFrame.LOFBuilderVector
Enum defining how the +j axis of the local orbital frame will be defined.
-
Constructor Summary
Constructors Constructor Description LocalMagneticFieldFrame(Frame inertialFrame, GeoMagneticField magneticField, Frame bodyFrame)
Constructor with default definition of the local orbital frame: x: Magnetic field y: Completes orthonormal frame z: Cross product of the magnetic field with the orbital momentum .LocalMagneticFieldFrame(Frame inertialFrame, GeoMagneticField magneticField, LocalMagneticFieldFrame.LOFBuilderVector lofBuilderVector, Frame bodyFrame)
Constructor with custom definition of the local orbital frame: x: Magnetic field y: Completes orthonormal frame z: Cross product of the magnetic field with chosenvector
For near-polar orbits, it is suggested to use theorbital momentum
to define the local orbital frame.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Frame
getInertialFrame()
Get interlai frame.GeoMagneticField
getMagneticField()
Get geomagnetid field.String
getName()
Get name of the local orbital frame.<T extends CalculusFieldElement<T>>
FieldRotation<T>rotationFromInertial(Field<T> field, FieldAbsoluteDate<T> date, FieldPVCoordinates<T> pv)
Get the rotation from inertial frame to local orbital frame.Rotation
rotationFromInertial(AbsoluteDate date, PVCoordinates pv)
Get the rotation from inertial frame to local orbital frame.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.frames.LOF
isQuasiInertial, rotationFromLOF, rotationFromLOF, transformFromInertial, transformFromInertial, transformFromLOF, transformFromLOF
-
-
-
-
Constructor Detail
-
LocalMagneticFieldFrame
public LocalMagneticFieldFrame(Frame inertialFrame, GeoMagneticField magneticField, Frame bodyFrame)
Constructor with default definition of the local orbital frame:- x: Magnetic field
- y: Completes orthonormal frame
- z: Cross product of the magnetic field with the orbital momentum
- Parameters:
inertialFrame
- inertial frame in which position-velocity coordinates will be given when computing transform and rotationmagneticField
- Earth magnetic field modelbodyFrame
- body frame related to body shape
-
LocalMagneticFieldFrame
public LocalMagneticFieldFrame(Frame inertialFrame, GeoMagneticField magneticField, LocalMagneticFieldFrame.LOFBuilderVector lofBuilderVector, Frame bodyFrame)
Constructor with custom definition of the local orbital frame:- x: Magnetic field
- y: Completes orthonormal frame
- z: Cross product of the magnetic field with chosen
vector
orbital momentum
to define the local orbital frame. However, for near-equatorial orbits, it is advised to use either theposition or the velocity
.- Parameters:
inertialFrame
- inertial frame in which position-velocity coordinates will be given when computing transform and rotationmagneticField
- Earth magnetic field modellofBuilderVector
- vector used to define the local orbital framebodyFrame
- body frame related to body shape
-
-
Method Detail
-
rotationFromInertial
public <T extends CalculusFieldElement<T>> FieldRotation<T> rotationFromInertial(Field<T> field, FieldAbsoluteDate<T> date, FieldPVCoordinates<T> pv)
Get the rotation from inertial frame to local orbital frame.This rotation does not include any time derivatives. If first time derivatives (i.e. rotation rate) is needed as well, the full
Direction as X axis aligned with magnetic field vector, Y axis aligned with the cross product of the magnetic field vector with chosenLOF.transformFromInertial(FieldAbsoluteDate, FieldPVCoordinates)
method must be called and the complete rotation transform must be extracted from it.vector type
.BEWARE: In this implementation, the method simply fieldify the normal rotation with given field. Hence all derivatives are lost.
- Specified by:
rotationFromInertial
in interfaceLOF
- Type Parameters:
T
- type of the field elements- Parameters:
field
- field to which the elements belongdate
- date of the rotationpv
- position-velocity of the spacecraft in some inertial frame- Returns:
- rotation from inertial frame to local orbital frame
-
rotationFromInertial
public Rotation rotationFromInertial(AbsoluteDate date, PVCoordinates pv)
Get the rotation from inertial frame to local orbital frame.This rotation does not include any time derivatives. If first time derivatives (i.e. rotation rate) is needed as well, the full
transformFromInertial
method must be called and the complete rotation transform must be extracted from it. Direction as X axis aligned with magnetic field vector, Z axis aligned with the cross product of the magnetic field vector with chosenvector type
.- Specified by:
rotationFromInertial
in interfaceLOF
- Parameters:
date
- date of the rotationpv
- position-velocity of the spacecraft in some inertial frame- Returns:
- rotation from inertial frame to local orbital frame
-
getName
public String getName()
Get name of the local orbital frame.
-
getInertialFrame
public Frame getInertialFrame()
Get interlai frame.- Returns:
- inertial frame
-
getMagneticField
public GeoMagneticField getMagneticField()
Get geomagnetid field.- Returns:
- geo magnetic field
-
-