Skip to content

Commit

Permalink
fixed refsystem normal basis (was not normalized!) & version bump (so…
Browse files Browse the repository at this point in the history
…lves scale and annotation problem)
  • Loading branch information
haraldsteinlechner committed May 7, 2024
1 parent 429ea17 commit 5e0adb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions TEST_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 4.25.0-prerelease4
- fixed refsystem normalization

## 4.25.0-prerelease2
- option for switching euler angle order

Expand Down
15 changes: 11 additions & 4 deletions src/PRo3D.Core/TransformationApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,17 @@ module TransformationApp =
| Planet.ENU ->
Trafo3d.FromOrthoNormalBasis(V3d.IOO, V3d.OIO, V3d.OOI) * northCorrection
| Planet.Mars ->
let upP = CooTransformation.getUpVector pivot refSystem.planet
let east = V3d.OOI.Cross(upP)
let north = upP.Cross(east)
Trafo3d.FromOrthoNormalBasis(north, east, upP) * northCorrection
//let upP = CooTransformation.getUpVector pivot refSystem.planet
//let east = V3d.OOI.Cross(upP)
//let north = upP.Cross(east)
//Log.line "%A,%A,%A" upP.Length east.Length north.Length
let north = refSystem.northO.Normalized
let up = refSystem.up.value.Normalized
let east = north.Cross(up).Normalized

let refSysRotation =
Trafo3d.FromOrthoNormalBasis(north, east, up)
refSysRotation
| Planet.JPL ->
Trafo3d.FromOrthoNormalBasis(-V3d.IOO, V3d.OIO, -V3d.OOI) * northCorrection
| Planet.None ->
Expand Down

0 comments on commit 5e0adb0

Please sign in to comment.