Successful test with motion platform and VR together
This commit is contained in:
parent
416aa8a392
commit
2824f77450
4 changed files with 18 additions and 7 deletions
|
|
@ -85,7 +85,7 @@ void MarshConnector::_process(double delta) {
|
|||
time_passed += delta;
|
||||
|
||||
if (!socket->is_socket_connected()) {
|
||||
socket->connect_to_host("127.0.0.1", 24400);
|
||||
socket->connect_to_host("192.168.1.2", 24400);
|
||||
} else {
|
||||
while (socket->get_available_packet_count() > 0) {
|
||||
const PackedByteArray data = socket->get_packet();
|
||||
|
|
@ -251,9 +251,9 @@ Vector3 MarshConnector::godot_location_from_mavlink(float north_meters,
|
|||
// See Godot documentation for axis conventions:
|
||||
// https://docs.godotengine.org/en/stable/classes/class_vector3.html#constants
|
||||
return Vector3{
|
||||
east_meters, // East is RIGHT = Vector3(1, 0, 0)
|
||||
alt_meters, // Up is UP = Vector3(0, 1, 0)
|
||||
north_meters, // North is FORWARD = Vector3(0, 0, -1)
|
||||
-east_meters, // East is MODEL_RIGHT = Vector3(-1, 0, 0)
|
||||
alt_meters, // Up is MODEL_TOP = Vector3(0, 1, 0)
|
||||
north_meters, // North is MODEL_FRONT = Vector3(0, 0, 1)
|
||||
};
|
||||
}
|
||||
Quaternion MarshConnector::godot_rotation_from_mavlink(float roll_rad,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue