fr.cnes.sirius.patrius.assembly.models
Class SensorModel

java.lang.Object
  extended by fr.cnes.sirius.patrius.assembly.models.SensorModel
All Implemented Interfaces:
PVCoordinatesProvider

public final class SensorModel
extends Object
implements PVCoordinatesProvider

Since:
1.2
Version:
$Id: SensorModel.java 17587 2017-05-10 13:31:11Z bignon $
Author:
Thomas Trapier
See Also:
SensorProperty
Description :

This class is a model for a generic sensor of the assembly : it uses a SensorProperty object. It provides computations using the tree of frames and some measures are available.

Concurrency :
not thread-safe
Concurrency comment :
the direct use of a not thread-safe Assembly makes this class not thread-safe itself

Constructor Summary
SensorModel(Assembly assembly, String partName)
          Constructor for a sensor model.
 
Method Summary
 void addMaskingCelestialBody(GeometricBodyShape body)
          Adds a celestial body shape to consider in maskings.
 void addOwnMaskingParts(String[] partsNames)
          Enables the masking by the considered spacecraft's own parts, by giving the names of the parts that can cause maskings.
 void addSecondaryMaskingSpacecraft(SecondarySpacecraft spacecraft, String[] partsNames)
          Enables the masking by a secondary spacecraft's parts, by giving the names of the parts that can cause maskings.
 double celestialBodiesMaskingDistance(AbsoluteDate date)
          Computes the minimal euclidian distance to the celestial body shapes.
 Assembly getAssembly()
           
 int getInhibitionFieldsNumber()
           
 double getInhibitionTargetAngularRadius(AbsoluteDate date, int inhibitionFieldNumber)
          Computes the angular radius from the sensor of the main target at a date.
 double getInhibitTargetCenterToFieldAngle(AbsoluteDate date, int inhibitionFieldNumber)
          Computes the angular distance of the CENTER of an inhibition target to the border of the associated inhibition field at a date.
 double getMainTargetAngularRadius(AbsoluteDate date)
          Computes the angular radius from the sensor of the main target at a date.
 String getMaskingBodyName()
           
 String getMaskingSpacecraftName()
           
 String getMaskingSpacecraftPartName()
           
 Vector3D getNormalisedTargetVectorInSensorFrame(AbsoluteDate date)
          Computes the target vector at a date in the sensor's frame.
 PVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame)
          Get the PVCoordinates of the sensor part in the selected frame.
 Vector3D[] getRefrenceAxis(Frame frame, AbsoluteDate date)
          Computes the reference axis of the sensor in a given frame at a date
 Vector3D getSightAxis(Frame frame, AbsoluteDate date)
          Computes the sight axis of the sensor in a given frame at a date
 double getTargetCenterFOVAngle(AbsoluteDate date)
          Computes the angular distance of the CENTER of the main target to the border of the main field of view at a date.
 double[] getTargetDihedralAngles(AbsoluteDate date)
          Computes the dihedral angles of the target at a date in the sensor's frame.
 double getTargetRefAxisAngle(AbsoluteDate date, int axisNumber)
           
 double getTargetRefAxisElevation(AbsoluteDate date, int axisNumber)
           
 double getTargetSightAxisAngle(AbsoluteDate date)
           
 double getTargetSightAxisElevation(AbsoluteDate date)
           
 Vector3D getTargetVectorInSensorFrame(AbsoluteDate date)
          Computes the target vector at a date in the sensor's frame.
 boolean isMainTargetInField(AbsoluteDate date)
          Checks if the main target at least partially is in the field of view at a date
 boolean noInhibition(AbsoluteDate date)
          Checks if at least an inhibition target is at least partially in its associated inhibition field at a date
 void resetProperty()
          Resets the sensor property features.
 void setMainTarget(PVCoordinatesProvider target, LocalRadiusProvider radius)
          Sets the main target of the sensor property.
 double spacecraftsMaskingDistance(AbsoluteDate date)
          Computes the minimal euclidian distance to the spacecraft's shapes (GEOMERTY properties).
 boolean visibilityOk(AbsoluteDate date)
          Checks if the main target is in the field of view and no inhibition target in its inhibition field at a given date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorModel

public SensorModel(Assembly assembly,
                   String partName)
Constructor for a sensor model.

Parameters:
assembly - the considered vehicle
partName - the name of the part supporting the sensor
Method Detail

resetProperty

public void resetProperty()
Resets the sensor property features. Shall be used each time the associated sensor property has been modified.


isMainTargetInField

public boolean isMainTargetInField(AbsoluteDate date)
                            throws OrekitException
Checks if the main target at least partially is in the field of view at a date

Parameters:
date - the date of the computation
Returns:
true if the main target is in the field of view at this date
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

noInhibition

public boolean noInhibition(AbsoluteDate date)
                     throws OrekitException
Checks if at least an inhibition target is at least partially in its associated inhibition field at a date

Parameters:
date - the date of the computation
Returns:
false if one of the targets is in its field
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

visibilityOk

public boolean visibilityOk(AbsoluteDate date)
                     throws OrekitException
Checks if the main target is in the field of view and no inhibition target in its inhibition field at a given date.

Parameters:
date - the date of the computation
Returns:
true if the main target is in the field of view and no inhibition target in its inhibition field.
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetCenterFOVAngle

public double getTargetCenterFOVAngle(AbsoluteDate date)
                               throws OrekitException
Computes the angular distance of the CENTER of the main target to the border of the main field of view at a date. The result is positive if the center of the target is in the field. Please refer the specific used field's javadoc for details.

Parameters:
date - the date of the computation
Returns:
the angular distance
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getInhibitTargetCenterToFieldAngle

public double getInhibitTargetCenterToFieldAngle(AbsoluteDate date,
                                                 int inhibitionFieldNumber)
                                          throws OrekitException
Computes the angular distance of the CENTER of an inhibition target to the border of the associated inhibition field at a date. The result is positive if the center of the target is in the field. Please refer the specific used field's javadoc for details.

Parameters:
date - the date of the computation
inhibitionFieldNumber - number of the inhibition field to consider (first is 1)
Returns:
the angular distance
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getSightAxis

public Vector3D getSightAxis(Frame frame,
                             AbsoluteDate date)
                      throws OrekitException
Computes the sight axis of the sensor in a given frame at a date

Parameters:
frame - the frame of expression
date - the date of the computation
Returns:
the sight axis vector
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getRefrenceAxis

public Vector3D[] getRefrenceAxis(Frame frame,
                                  AbsoluteDate date)
                           throws OrekitException
Computes the reference axis of the sensor in a given frame at a date

Parameters:
frame - the frame of expression
date - the date of the computation
Returns:
the reference axis vectors
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetVectorInSensorFrame

public Vector3D getTargetVectorInSensorFrame(AbsoluteDate date)
                                      throws OrekitException
Computes the target vector at a date in the sensor's frame.

Parameters:
date - the computation date
Returns:
the target vector
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getNormalisedTargetVectorInSensorFrame

public Vector3D getNormalisedTargetVectorInSensorFrame(AbsoluteDate date)
                                                throws OrekitException
Computes the target vector at a date in the sensor's frame. The vector is then normalised (the X, Y and Z coefficients of this vector are so the directing cosine).

Parameters:
date - the computation date
Returns:
the target vector
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetDihedralAngles

public double[] getTargetDihedralAngles(AbsoluteDate date)
                                 throws OrekitException
Computes the dihedral angles of the target at a date in the sensor's frame. The array is filled with {AX, AY, AZ}.

Parameters:
date - the computation date
Returns:
the dihedral angles
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetSightAxisAngle

public double getTargetSightAxisAngle(AbsoluteDate date)
                               throws OrekitException
Parameters:
date - the date of computation
Returns:
the vector angle (target - sight axis) at this date.
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetRefAxisAngle

public double getTargetRefAxisAngle(AbsoluteDate date,
                                    int axisNumber)
                             throws OrekitException
Parameters:
date - the date of computation
axisNumber - the number of the reference axis for this computation (first is 1)
Returns:
the vector angle (target - reference axis) at this date.
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetSightAxisElevation

public double getTargetSightAxisElevation(AbsoluteDate date)
                                   throws OrekitException
Parameters:
date - the date of computation
Returns:
the elevation angle (target - normal plane to the sight axis) at this date.
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getTargetRefAxisElevation

public double getTargetRefAxisElevation(AbsoluteDate date,
                                        int axisNumber)
                                 throws OrekitException
Parameters:
date - the date of computation
axisNumber - the number of the reference axis for this computation (first is 1)
Returns:
the elevation angle (target - normal plane to the reference axis) at this date.
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getAssembly

public Assembly getAssembly()
Returns:
the assembly of this sensor

getInhibitionFieldsNumber

public int getInhibitionFieldsNumber()
Returns:
the number of couples inhibition field / inhibition target

setMainTarget

public void setMainTarget(PVCoordinatesProvider target,
                          LocalRadiusProvider radius)
Sets the main target of the sensor property.

Parameters:
target - the new main target center
radius - the target's radius

getMainTargetAngularRadius

public double getMainTargetAngularRadius(AbsoluteDate date)
                                  throws OrekitException
Computes the angular radius from the sensor of the main target at a date.

Parameters:
date - the computation date
Returns:
the angular radius
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getInhibitionTargetAngularRadius

public double getInhibitionTargetAngularRadius(AbsoluteDate date,
                                               int inhibitionFieldNumber)
                                        throws OrekitException
Computes the angular radius from the sensor of the main target at a date.

Parameters:
date - the computation date
inhibitionFieldNumber - number of the inhibition field to consider (first is 1)
Returns:
the angular radius
Throws:
OrekitException - if some frame transformation problem occurs (if the assembly is not linked to the tree of frame in witch the target is defined)

getPVCoordinates

public PVCoordinates getPVCoordinates(AbsoluteDate date,
                                      Frame frame)
                               throws OrekitException
Get the PVCoordinates of the sensor part in the selected frame.

Specified by:
getPVCoordinates in interface PVCoordinatesProvider
Parameters:
date - current date
frame - the frame where to define the position
Returns:
position/velocity of the body (m and m/s)
Throws:
OrekitException - if position cannot be computed in given frame : occurs if the assembly is not correctly linked to the main tree of frames.

spacecraftsMaskingDistance

public double spacecraftsMaskingDistance(AbsoluteDate date)
                                  throws OrekitException
Computes the minimal euclidian distance to the spacecraft's shapes (GEOMERTY properties). If the line between the sensor and the target intersects the shape, a negative value is returned in order to compute events detections.

Parameters:
date - the current computation date
Returns:
the minimal distance to the spacecraft's shapes
Throws:
OrekitException - if a problem occurs in frames transformations

celestialBodiesMaskingDistance

public double celestialBodiesMaskingDistance(AbsoluteDate date)
                                      throws OrekitException
Computes the minimal euclidian distance to the celestial body shapes. If the line between the sensor and the target intersects the shape, a negative value is returned in order to compute events detections.

Parameters:
date - the current computation date
Returns:
the minimal distance to the body shapes
Throws:
OrekitException - if a problem occurs in frames transformations

getMaskingSpacecraftName

public String getMaskingSpacecraftName()
Returns:
the last masking spacecraft name

getMaskingSpacecraftPartName

public String getMaskingSpacecraftPartName()
Returns:
the last masking spacecraft's part name

getMaskingBodyName

public String getMaskingBodyName()
Returns:
the last masking body number

addOwnMaskingParts

public void addOwnMaskingParts(String[] partsNames)
Enables the masking by the considered spacecraft's own parts, by giving the names of the parts that can cause maskings.

Parameters:
partsNames - the names of the considered parts

addSecondaryMaskingSpacecraft

public void addSecondaryMaskingSpacecraft(SecondarySpacecraft spacecraft,
                                          String[] partsNames)
Enables the masking by a secondary spacecraft's parts, by giving the names of the parts that can cause maskings.

Parameters:
spacecraft - the secondary masking spacecraft
partsNames - partsNames the names of the considered parts

addMaskingCelestialBody

public void addMaskingCelestialBody(GeometricBodyShape body)
Adds a celestial body shape to consider in maskings.

Parameters:
body - the celestial body shape to consider


Copyright © 2017 CNES. All Rights Reserved.