Closed kd0aij closed 7 years ago
Looks good. I think this function needs to be updated as well: https://github.com/PX4/jMAVSim/blob/master/src/me/drton/jmavsim/CameraGimbal2D.java#L116 I didn't even know jMAVSim has gimbal simulation.
@kd0aij Can you update the gimbal sim?
@bkueng @LorenzMeier That code matches the description here: https://github.com/PX4/Firmware/blob/master/msg/manual_control_setpoint.msg#L25 I don't know why the "x" axis in the manual control message would be considered the pitch axis (and y roll), but that's the way it is. And there are no comments in jmavsim explaining the intention there either :)
@kd0aij yes, the for the manual_control_setpoint it's swapped too. It's because it comes from the mavlink message, and we cannot really change that. But I don't think it's related to the jMAVSim gimbal code, because the gimbal uses the actuator control outputs, which is defined by the mixer config. Plus gimbal sim channels can be configured. So I still think gimbal sim needs to be updated to be consistent with the rest of jMAVSim.
@bkueng Sounds like you know more about this than I do. Feel free to change it any way you want.
continued in #37
This changes the Euler angle calculation to match the one in the PX4/Firmware ecl library; so that the order of the Euler angles is RPY (XYZ), instead of the previous (pitch, roll, yaw).