| 48 | } |
| 49 | |
| 50 | Vector3 TangentPlaneConverter::convertToLocal(const Vector3 &GlobalPoint) const |
| 51 | { |
| 52 | /** check for initialization*/ |
| 53 | if(!_isInitialized) |
| 54 | { |
| 55 | PRINT_WARNING("Converter is not initialized!"); |
| 56 | return GlobalPoint; |
| 57 | } |
| 58 | |
| 59 | double Lat, Lon, H; |
| 60 | double X,Y,Z; |
| 61 | Vector3 LocalPoint; |
| 62 | _Earth.Reverse(GlobalPoint(0), GlobalPoint(1), GlobalPoint(2), Lat, Lon, H); |
| 63 | _LocalProjection.Forward(Lat, Lon, H, X, Y, Z); |
| 64 | LocalPoint << X, Y, Z; |
| 65 | |
| 66 | return LocalPoint; |
| 67 | } |
| 68 | |
| 69 | Vector3 TangentPlaneConverter::convertToGlobal(const Vector3 &LocalPoint) const |
| 70 | { |