sugr
Class Point_3D

java.lang.Object
  extended bysugr.Element
      extended bysugr.Entity
          extended bysugr.Object_3D
              extended bysugr.Point_3D
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Point_3D
extends Object_3D

Implementation of Point_3D

Version:
1.1 (25.1.2004) Changed Constructor Point_3D(Plane, Line) and Point_3D(Plane,Plane,Plane) to not use Construction class anymore. Calculation is now done in Constructor itself. By Achim Königs
Author:
Norbert Fischer
See Also:
Serialized Form

Field Summary
private static int DIM
           
private static int DOF
           
private static long serialVersionUID
          Class version number for serialization
 
Fields inherited from class sugr.Element
cov, MAXITER, v
 
Constructor Summary
Point_3D()
          Default Constructor
Point_3D(double x, double y, double z)
          Constructs a new point. homogeneous part is set to 1 and covariance matrix is set to 0 so it has no error
Point_3D(double x, double y, double z, double w)
          Constructs a new Point_3D by setting all values directly.
Point_3D(double x, double y, double z, double sigma_x, double sigma_y, double sigma_z)
          Construct a Point with known accuracies for x,y and z.
Point_3D(double x, double y, double z, double w, Matrix cov)
          Constructs a new point_3D by setting all values directly.
Point_3D(double x, double y, double z, Matrix cov)
          /** Constructs a new point with covariance. homogeneous part is set to 1.
Point_3D(Line_3D L1, Line_3D L2)
           
Point_3D(Line_3D line, Plane_3D plane)
          Constructs a new point by an intersection of line and plane.
Point_3D(Plane_3D plane, Line_3D line)
          Constructs a new point by an intersection of line and plane.
Point_3D(Plane_3D plane1, Plane_3D plane2, Plane_3D plane3)
          Constructs a new point by an intersection of three planes.
Point_3D(RelationalProperty[] rprops)
          Estimates a new point.
Point_3D(Vector _v, Matrix _cov)
          Constructor for a new Point_3D
 
Method Summary
 Point_3D copy()
          returns a copy of this point.
protected  Matrix getConditionMatrix(double f)
          Get a matrix W(f) for conditioning.
 Matrix getCovarianceOfJacobianRowOfRelation(java.lang.Class relationType, java.lang.Class partnerType, int row)
          Return Covariance of a Row of the Jacobian Matrix of that entity in combination with a relation.
 int getDegreesOfFreedom()
          returns dof=3 of this point
 int getDimension()
          returns dimension=4 for this point
 double getDistance(Entity e)
          Compute the (euclidean) distance to another entity.
 int getDofOfRelation(java.lang.Class relationType, java.lang.Class partnerType)
           Compute degrees of freedom of a relation.
 Vector getEuclideanPart()
          returns the euclidean part of this point
 Vector getHomogeneousPart()
          returns the homogeneous part of this point
 Matrix getJacobianHomogeneousPart()
          returns the part of the covariance matrix, which contains the homogeneous part
 Matrix getJacobianOfRelation(java.lang.Class relationType, java.lang.Class partnerType)
          Return Jacobian Matrix of that entity in combination with a relation.
protected  Matrix[] getReducedAB(RelationalProperty rprop)
          Get the reduced Matrix A and B from a relational property.
 void normalizeEuclidean()
          normalizes in that way, that the homogeneous part will be 1
 Matrix Pi()
          returns the pi-jacobian of this point
static Matrix Pi(Vector v_in)
          returns the pi-jacobian of this point
 Matrix PiDual()
          Returns C*PI matrix the dual PI-matrix
static Matrix PiDual(Vector v_in)
          Returns C*PI matrix the dual PI-matrix This matrix differs from that of the dissertation because of other definition of C
 
Methods inherited from class sugr.Entity
doCondition, doCondition, doCondition, ensureConstraintsWithoutIteration, getConditionFactorF, getConditionFactorF, getDistanceToOrigin, getJacobianOfRelation, getNormOfEuclideanPart, getNormOfHomogeneousPart, isEqual, isIncident, isOrthogonal, isParallel, normalizeEuclideanComparable, transform
 
Methods inherited from class sugr.Element
approximate, calcCov, changeNullspace, changeNullspace, checkCovDim, checkElement, clone, ensureConstraints, estimate, estimate, gaussHelmertIterations, gaussHelmertIterationsOld, getConstraintValue, getCov, getJacobianOfConstraint, getV, normalizeSphere, normalizeSphereComparable, print, print, reduceFirstMatrix, reduceMatrix, reduceMatrix, setCov, setV, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Class version number for serialization

See Also:
Constant Field Values

DIM

private static final int DIM
See Also:
Constant Field Values

DOF

private static final int DOF
See Also:
Constant Field Values
Constructor Detail

Point_3D

public Point_3D(Line_3D L1,
                Line_3D L2)

Point_3D

public Point_3D(Vector _v,
                Matrix _cov)
Constructor for a new Point_3D

Parameters:
_v - a Vector with dimension 4. Contains the coordinates of the new Point_3D
_cov - 4x4 covariance matrix

Point_3D

public Point_3D(Plane_3D plane,
                Line_3D line)
Constructs a new point by an intersection of line and plane. Error propagation will be done automatically

Parameters:
plane - a Plane_3D
line - a Line_3D

Point_3D

public Point_3D(Line_3D line,
                Plane_3D plane)
Constructs a new point by an intersection of line and plane. Error propagation will be done automatically

Parameters:
plane - a Plane_3D
line - a Line_3D

Point_3D

public Point_3D(Plane_3D plane1,
                Plane_3D plane2,
                Plane_3D plane3)
Constructs a new point by an intersection of three planes. Error propagation will be done automatically


Point_3D

public Point_3D(double x,
                double y,
                double z,
                double w)
Constructs a new Point_3D by setting all values directly. covariance matrix is set to 0 so is has no error


Point_3D

public Point_3D(double x,
                double y,
                double z,
                double w,
                Matrix cov)
Constructs a new point_3D by setting all values directly. With covariance.

Parameters:
cov - 4x4 Matrix

Point_3D

public Point_3D(double x,
                double y,
                double z)
Constructs a new point. homogeneous part is set to 1 and covariance matrix is set to 0 so it has no error

Parameters:
x - x-part of point
y - y-part of point
z - z-part of point

Point_3D

public Point_3D(double x,
                double y,
                double z,
                double sigma_x,
                double sigma_y,
                double sigma_z)
Construct a Point with known accuracies for x,y and z. If you have the 3 coordinates of a 2D-Point and accuracies for these three coordinates (ignoring correlations) then you can use this (shortcut) constructor to generate a SUGR-Point with covariance matrix. The generated covariance is | sigma_x^2 0 0 0| | 0 sigma_y^2 0 0| | 0 0 sigma_z^2 0| | 0 0 0 0| and the homogeneous part is set to 1.

Parameters:
x - first coordinate of point
y - second coordinate of point
z - third coordinate of point
sigma_x - accuracy of x (standard deviation)
sigma_y - accuracy of y (standard deviation)
sigma_z - accuracy of z (standard deviation)

Point_3D

public Point_3D(double x,
                double y,
                double z,
                Matrix cov)
/** Constructs a new point with covariance. homogeneous part is set to 1.

Parameters:
x - x-part of point
y - y-part of point
z - z-part of point
cov - 4x4 Matrix

Point_3D

public Point_3D()
Default Constructor


Point_3D

public Point_3D(RelationalProperty[] rprops)
Estimates a new point.

Parameters:
rprops - an array of constraints.
Method Detail

getEuclideanPart

public Vector getEuclideanPart()
returns the euclidean part of this point

Specified by:
getEuclideanPart in class Entity
Returns:
a Vector with 3 coordinates

getHomogeneousPart

public Vector getHomogeneousPart()
returns the homogeneous part of this point

Specified by:
getHomogeneousPart in class Entity
Returns:
a Vector with 1 coordinate

getDistance

public double getDistance(Entity e)
Compute the (euclidean) distance to another entity. This is of course not possible for all combinations. In the case of an illegal combination an IllegalArgumentException should be thrown.

Specified by:
getDistance in class Entity
Parameters:
e - the entity to which a distance should be computed.
Returns:
the distance to the given entity

getConditionMatrix

protected Matrix getConditionMatrix(double f)
Get a matrix W(f) for conditioning. This matrix can be used to transform an entity to a conditioned one.

Specified by:
getConditionMatrix in class Entity
Parameters:
f - the conditioning factor
Returns:
the condition matrix

copy

public Point_3D copy()
returns a copy of this point. Actually it works like clone


getDimension

public int getDimension()
returns dimension=4 for this point

Specified by:
getDimension in class Element

getDegreesOfFreedom

public int getDegreesOfFreedom()
returns dof=3 of this point

Specified by:
getDegreesOfFreedom in class Entity

Pi

public Matrix Pi()
returns the pi-jacobian of this point

Returns:
6x4 Matrix

Pi

public static Matrix Pi(Vector v_in)
returns the pi-jacobian of this point

Returns:
6x4 Matrix

PiDual

public Matrix PiDual()
Returns C*PI matrix the dual PI-matrix

Returns:
6x4 Matrix

PiDual

public static Matrix PiDual(Vector v_in)
Returns C*PI matrix the dual PI-matrix This matrix differs from that of the dissertation because of other definition of C

Returns:
6x4 Matrix

getJacobianHomogeneousPart

public Matrix getJacobianHomogeneousPart()
returns the part of the covariance matrix, which contains the homogeneous part

Returns:
1x1 Matrix

normalizeEuclidean

public void normalizeEuclidean()
normalizes in that way, that the homogeneous part will be 1

Specified by:
normalizeEuclidean in class Entity

getJacobianOfRelation

public Matrix getJacobianOfRelation(java.lang.Class relationType,
                                    java.lang.Class partnerType)
                             throws java.lang.IllegalArgumentException
Return Jacobian Matrix of that entity in combination with a relation. If that entity is part of a relation then this relation has a constraint f(firstEntity)*secondEntity=g(secondEntity)*firstEntity=0. f and g are the Jacobians of these linear formulas. So return f or g (the choice f or g is given by the type of the entity !)

Specified by:
getJacobianOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
Jacobian matrix (or part of the constraint formula)
Throws:
java.lang.IllegalArgumentException

getDofOfRelation

public int getDofOfRelation(java.lang.Class relationType,
                            java.lang.Class partnerType)
                     throws java.lang.IllegalArgumentException

Compute degrees of freedom of a relation.

Specified by:
getDofOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
degrees of freedom for the relation

Throws:
java.lang.IllegalArgumentException

getReducedAB

protected Matrix[] getReducedAB(RelationalProperty rprop)
Get the reduced Matrix A and B from a relational property. A is the Jacobian of this Entity (the unknown), B is the Jacobian of the observation (the relational property). The Jacobian of the oberservation depends (only) on the unknown and the Jacobian of the unknown depends (only) of the oberservation ! This method is overwritten to handle some the special cases.

Overrides:
getReducedAB in class Element
Parameters:
rprop - the relational Property
Returns:
A in array element 0, B in array Element 1.

getCovarianceOfJacobianRowOfRelation

public Matrix getCovarianceOfJacobianRowOfRelation(java.lang.Class relationType,
                                                   java.lang.Class partnerType,
                                                   int row)
                                            throws java.lang.IllegalArgumentException
Return Covariance of a Row of the Jacobian Matrix of that entity in combination with a relation.

Specified by:
getCovarianceOfJacobianRowOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
Covariance of the row of the Jacobian matrix
Throws:
java.lang.IllegalArgumentException