Skip to content

Commit

Permalink
updated shape uncertainty, mass properties and Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbercovici committed Feb 4, 2019
1 parent 7038908 commit 2a4805a
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 234 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,19 @@ to apply the update (if any).

### [SBGAT 2.02.1](https://github.com/bbercovici/SBGAT/releases/tag/2.02.1)

#### New
- Second-moments about the mean in the volume, center-of-mass, unit-densiy inertia tensor, principal moments, principal dimensions and orientation of the principal axes can now be evaluated through the static methods of `SBGATShapeUncertainty`
- `SBGATShapeUncertainty` provides two methods to evaluate the statistical moments: a monte-carlo method `ComputeInertiaStatisticsMC`, and another method `ComputeInertiaStatistics` leveraging a linearized uncertainty model as proposed by Bercovici and McMahon (`Inertia statistics of an uncertain small body shape, ICARUS 2019 (In Review`). Both methods take the same argument (correleation length `l` and the standard deviation governing the error in the control point coordinates, directed along the average normal at these points). Both these methods assume that the shape error can be described as normally distributed and zero-mean.
- Added a new function in `Tests` to illustrate the convergence of the Monte-Carlo shape uncertainty sampling to the analytical prediction

#### Improvements
- `SBGATMassProperties::SaveMassProperties` is now saving the average radius (`r_avg = cbrt(3/4 *Volume/pi)`) to the JSON file
- `SBGATMassproperties::GetPrincipalAxes` could return 4 dcms, all representative of the same inertia ellipsoid. To enforce stability in the principal axes extractions, `SBGATMassproperties::GetPrincipalAxes` now returns the dcm that has the smallest-norm corresponding MRP.
- `SBGAT` will try to link against `OpenMP` by default. This behaviour can now be disabled by passing the `--without-libomp` flag to Homebrew or by passing the `-DNO_OMP:BOOL=TRUE` flag to CMake

### Bug fixes:
- Fixed potential bug in `SBGATPolyhedronGravityModel` involving a parallel computing block where a variable with no viable reduction clause was being operated on
- `SBGATMassproperties::GetPrincipalAxes` is now returning the DCM `[PB]` converting from the body coordinate frame to the body principal frame. It was previously returning `[BP]`

### [SBGAT 2.01.2](https://github.com/bbercovici/SBGAT/releases/tag/2.01.2)

Expand Down
7 changes: 5 additions & 2 deletions SbgatCore/include/SbgatCore/SBGATMassProperties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class VTKFILTERSCORE_EXPORT SBGATMassProperties : public vtkPolyDataAlgorithm{
arma::mat::fixed<3,3> GetInertiaTensor(){
this -> Update(); return this -> inertia_tensor;
}

/**
* Compute and return the dimensionless inertia tensor
* evaluated in the frame of origin assuming a constant density distribution
Expand All @@ -153,7 +153,10 @@ class VTKFILTERSCORE_EXPORT SBGATMassProperties : public vtkPolyDataAlgorithm{


/**
* Compute and return the principal axes of the inertia tensor
* Compute and return the dcm orienting the principal axes of the small body relative to
the body coordinates frame. That is, denoting P the principal frame and B the frame in which the
coordinates of the body are currently expressed, this method returns [PB]
@return [PB] direction cosine matrix
*/
arma::mat::fixed<3,3> GetPrincipalAxes(){
this -> Update(); return this -> principal_axes;
Expand Down
20 changes: 0 additions & 20 deletions SbgatCore/include/SbgatCore/SBGATShapeUncertainty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,6 @@ class VTKFILTERSCORE_EXPORT SBGATShapeUncertainty : public vtkPolyDataAlgorithm{




/**
Return covariance in non-normalized inertia principal directions
@return covariance in non-normalized inertia principal directions
*/
const arma::mat::fixed<9,9> & GetEvectorsPrincipalAxesCovariance() {return this -> Evectors_covariance; }


/**
Return covariance in unit-norm inertia principal directions
@return covariance in inertia principal directions
*/
const arma::mat::fixed<9,9> & GetEigenvectorPrincipalAxesCovariance() {return this -> eigenvectors_covariance; }





protected:
SBGATShapeUncertainty();
~SBGATShapeUncertainty() override;
Expand All @@ -145,8 +127,6 @@ class VTKFILTERSCORE_EXPORT SBGATShapeUncertainty : public vtkPolyDataAlgorithm{
arma::mat::fixed<6,6> inertia_tensor_parametrization_covariance;
arma::mat::fixed<3,3> principal_dimensions_covariance;
arma::mat::fixed<4,4> principal_moments_covariance;
arma::mat::fixed<9,9> Evectors_covariance;
arma::mat::fixed<9,9> eigenvectors_covariance;
arma::mat::fixed<3,3> mrp_covariance;


Expand Down
Loading

0 comments on commit 2a4805a

Please sign in to comment.