| 260 | } |
| 261 | |
| 262 | static std::optional<Vector3> getOrientationRpy(const Entity& entity) |
| 263 | { |
| 264 | std::optional<Vector3> position = getPosition(entity); |
| 265 | if (!position) { return std::nullopt; } |
| 266 | |
| 267 | std::optional<Quaternion> orientation = getOrientation(entity); |
| 268 | if (!orientation) { return std::nullopt; } |
| 269 | |
| 270 | Quaternion ltpNed = toLtpNed(GeocentricOrientation(*orientation), geocentricToLatLon(*position)).orientation; |
| 271 | return math::eulerFromQuat(ltpNed); |
| 272 | } |
| 273 | |
| 274 | static void setOrientationRpy(Entity& entity, const Vector3& rpy) |
| 275 | { |
no test coverage detected