MCPcopy Create free account
hub / github.com/Prograda/Skybolt / getOrientationRpy

Function getOrientationRpy

src/Skybolt/SkyboltPythonBindings/PythonBindings.cpp:262–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262static 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
274static void setOrientationRpy(Entity& entity, const Vector3& rpy)
275{

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 6

getPositionFunction · 0.85
getOrientationFunction · 0.85
toLtpNedFunction · 0.85
geocentricToLatLonFunction · 0.85
eulerFromQuatFunction · 0.85

Tested by

no test coverage detected