UDP as Input?
4 posts
• Page 1 of 1
UDP as Input?
Is it possible to use a UDP stream (format below) as an input? This is head tracking data from https://smoothtrack.app/ (phone app). On the PC it then uses https://github.com/opentrack/opentrack to control head movement in games (or whatever). Since it's just XYZ and angle data I'm wondering if we can parse out that data and use it ACCEL and GYRO input/output. Any thoughts?
- Code: Select all
byte[] buf = ByteBuffer.allocate(48)
.order(ByteOrder.LITTLE_ENDIAN)
.putDouble(x)
.putDouble(y)
.putDouble(z)
.putDouble(yaw)
.putDouble(pitch)
.putDouble(roll)
.array();
DatagramPacket packet
= new DatagramPacket(buf, buf.length, address, port);
socket.send(packet);
-
DeviateSquirrel - First Sergeant
- Posts: 46
- Joined: Sun Jan 17, 2021 11:07 pm
Re: UDP as Input?
I think for such custom project its is better to use an arduino board and let that do the conversion as the T2 has only limited memory for its firmware and implementing all kind of custom protocols won't fit in.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: UDP as Input?
That's the direction I'm heading now.
Opentrack can be installed in Linux so I'm thinking of installing it on a Raspberry Pi. Then the phone with SmoothTrack would connect to the RPi where the translation happens and then it, hopefully, gets output as a game controller that I can plug into the T2.
Right now I can get gTuner to read the input from Opentrack using KMG Capture so I think I'm on the right track.
Opentrack can be installed in Linux so I'm thinking of installing it on a Raspberry Pi. Then the phone with SmoothTrack would connect to the RPi where the translation happens and then it, hopefully, gets output as a game controller that I can plug into the T2.
Right now I can get gTuner to read the input from Opentrack using KMG Capture so I think I'm on the right track.
-
DeviateSquirrel - First Sergeant
- Posts: 46
- Joined: Sun Jan 17, 2021 11:07 pm
Re: UDP as Input?
Xbox 360 and PS3 controller emulators are available for development boards (such as Arduino and possible for Raspberry Pi). You should have no problem implementing this solution. ;)
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 195 guests