Electrical Energy Calculator
Calculate electricity use from power and duration, or constant DC voltage and current. Compare energy use over different operating times in watt-hours, kilowatt-hours and joules.
Open toolInteractive conversion is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.
Convert Euler angles (yaw, pitch, roll; ZYX intrinsic, right-handed) to a unit quaternion, and convert a quaternion to Euler angles under that stated convention.
Choose the direction: Euler angles to quaternion, or quaternion to Euler angles.
For angles, enter yaw, pitch and roll, or drag the yaw slider, and choose degrees or radians.
For a quaternion, enter w, x, y and z. It does not need to be normalized.
Read the result, the same orientation in standard angle ranges and the axis–angle form. Choose the component order your software expects.
Use the axis diagram and its step selector to see the frame after yaw, after pitch and after roll. Copy result includes the convention. Reset restores the starting example.
Three angles applied one after another can describe any orientation, but the result depends on the order and on whether each turn is about the body's own axes or the fixed axes. This tool uses yaw about z, then pitch about the new y, then roll about the newest x. That is the same as roll, pitch and yaw about the fixed x, y and z axes, as ROS and aerospace use.
A unit quaternion encodes a rotation by an angle α about an axis u as w = cos(α/2) and (x, y, z) = u sin(α/2). It has no singularities and composes by multiplication, which is why IMUs and robot software store orientation this way.
A quaternion and its negative describe the same rotation. This tool reports the one with w ≥ 0. Quaternions that are not unit length are divided by their length first.
At pitch ±90°, yaw and roll turn about the same axis (gimbal lock), so only their difference (at +90°) or sum (at −90°) is defined. The tool then sets roll to 0 and reports the combined angle as yaw.
Signs depend on the frame. Positive pitch turns the x-axis toward −z: nose down when z points up (ROS), nose up when z points down (aerospace NED). Check which frame your data uses.
Limitations: one sequence only (ZYX intrinsic). Other sequences (XYZ intrinsic, ZXZ and the rest) give different angles for the same quaternion, and passive (frame) rotations use the conjugate quaternion. The tool does not compose rotations, rotate vectors or convert rotation matrices as inputs.
Quaternion w: w = cφ cθ cψ + sφ sθ sψ.
Quaternion x: x = sφ cθ cψ − cφ sθ sψ.
Quaternion y: y = cφ sθ cψ + sφ cθ sψ.
Quaternion z: z = cφ cθ sψ − sφ sθ cψ. ψ is yaw, θ pitch and φ roll; c and s are the cosine and sine of half each angle.
Roll: φ = atan2(2(w x + y z), 1 − 2(x² + y²)).
Pitch: θ = asin(2(w y − x z)).
Yaw: ψ = atan2(2(w z + x y), 1 − 2(y² + z²)).
Normalization: q ← q ÷ √(w² + x² + y² + z²).
Axis–angle: α = 2 acos(w), axis = (x, y, z) ÷ sin(α/2).
Gimbal lock: If |2(wy − xz)| ≥ 1 − 1e-9: pitch = ±90°, roll = 0, yaw = ∓2 atan2(x, w).
Yaw 30°, pitch 20°, roll 10°: q = (0.951549, 0.038135, 0.189308, 0.239298). Converting back gives 30°, 20°, 10°. The widget shows 9 decimals: w 0.951548525.
Yaw 90°, pitch 0°, roll 0°: q = (0.707107, 0, 0, 0.707107). A 90° turn about z: w = cos 45°, z = sin 45°. The body x-axis now points along world y.
Quaternion (1, 1, 1, 1): Norm 2; normalized (0.5, 0.5, 0.5, 0.5); yaw 90°, pitch 0°, roll 90°. The input is divided by its length before converting.
Yaw 40°, pitch 90°, roll 10°: Gimbal lock: yaw 30°, pitch 90°, roll 0°. At pitch +90° only yaw − roll is defined; both inputs give the same quaternion (0.683013, −0.183013, 0.683013, 0.183013).
Yaw 270°: q = (0.707107, 0, 0, −0.707107); yaw −90°. The direct formula gives w < 0; the tool flips the sign, and the standard range reports −90°.
NASA TM-74839: Euler angles, quaternions and transformation matrices
ROS REP 103: standard units of measure and coordinate conventions
Solà: quaternion kinematics for the error-state Kalman filter
Available now
Calculate electricity use from power and duration, or constant DC voltage and current. Compare energy use over different operating times in watt-hours, kilowatt-hours and joules.
Open tool →Available now
Add up to 20 resistors in series using Ω, kΩ or MΩ for circuit analysis and electricity calculations, with a diagram and running total.
Open tool →Available now
Convert absolute temperatures between Celsius, Fahrenheit and kelvin.
Open tool →Nice audio board working as expected.
Given the fact that this was my first purchase and I made it thinking I was buying genuine Yihua products, this has been a setback. I received a lesser known OEM brand called MYTO and while both the products seem to be similar from appearance, my real contention is the quality and quantity of the brass wool. On top of that not informing the customer about the unavailability of the Yihua product and instead sending a product from a different brand is also antagonising. Henceforth, I might just have to think twice before ordering from ThinkRobotics.
TOF MINIF Range Sensor - UART TOF Time-of-Flight Laser Range Sensor
We are disappointed with our recent order experience. We clearly communicated our requirement for 433 MHz antennas on WhatsApp, but the issue remains unresolved. We have been following up for more than 10 days and are still waiting for a proper refund resolution.
As a regular B2B customer, we expected better support. This experience has affected our trust in ThinkRobotics, and we may have to consider other suppliers for future purchases. We request a fair and prompt refund.