LONET 2 is sent by default to multicast group 236.12.12.12 on port 60608, however unicast or broadcast is also supported. There is no handshake or connection procedure, simply subscribe to the multicast group to start getting data.
The data in each packet is tied to one camera, defined as the cameraName string.
Each UDP packet should contain a JSON object that may include any combination of the following top-level fields:
"encoder_data"
"distortion_data"
"camera_transform_data"
"controller_data"
The "encoder_data" field carries information related to camera encoders, such as focal length, iris (aperture), and focus distance values.
{
"encoder_data": {
"cameraName": "Camera1",
"focalLengthRaw": 50.0,
"focalLengthMapped": 35.0,
"irisRaw": 2.8,
"irisMapped": 2.8,
"focusRaw": 1000.0,
"focusMapped": 5.0,
"frameRate": 24.0,
"timecode": "01:23:45:12"
}
}
Field Definitions
The "distortion_data" field provides lens distortion parameters and intrinsic camera properties.
{
"distortion_data": {
"cameraName": "Camera1",
"focalLengthRaw": 50.0,
"focalLengthMapped": 35.0,
"irisRaw": 2.8,
"irisMapped": 2.8,
"focusRaw": 1000.0,
"focusMapped": 5.0,
"frameRate": 24.0,
"timecode": "01:23:45:12",
"fXfY": [1000.0, 1000.0],
"principalPoint": [960.0, 540.0],
"distortionParameters": [0.1, -0.05, 0.0]
}
}
Field Definitions
The "camera_transform_data" field contains the spatial transform (position and orientation) of the camera and additional camera settings like white balance and ISO.
{
"camera_transform_data": {
"cameraName": "Camera1",
"whiteBalance": 6500.0,
"tint": 0.0,
"ISO": 800.0,
"shutter": 0.0167,
"focalLengthRaw": 50.0,
"irisRaw": 2.8,
"focusRaw": 1000.0,
"frameRate": 24.0,
"dropFrame": false,
"timecode": "01:23:45:12",
"position": [0.0, 100.0, 200.0],
"orientation": [0.0, 0.0, 0.0, 1.0],
"sensorSize": [36.0, 24.0]
}
}
Field Definitions
The "controller_data" field carries input states from a controller device, such as buttons and touchpad values.
{
"controller_data": {
"controllerName": "Controller1",
"button1": 1.0,
"button2": 0.0,
"button3": 0.0,
"trigger": 0.5,
"touchpadPressed": 1.0,
"touchpadX": 0.25,
"touchpadY": -0.75,
"frameRate": 24.0,
"timecode": "01:23:45:12"
}
}
Field Definitions
An example of a UDP packet containing multiple data types:
{
"encoder_data": {
"cameraName": "Camera1",
"focalLengthRaw": 50.0,
"focalLengthMapped": 35.0,
"irisRaw": 2.8,
"irisMapped": 2.8,
"focusRaw": 1000.0,
"focusMapped": 5.0,
"frameRate": 24.0,
"timecode": "01:23:45:12"
},
"distortion_data": {
"cameraName": "Camera1",
"fXfY": [1000.0, 1000.0],
"principalPoint": [960.0, 540.0],
"distortionParameters": [0.1, -0.05, 0.0],
"focalLengthRaw": 50.0,
"focalLengthMapped": 35.0,
"irisRaw": 2.8,
"irisMapped": 2.8,
"focusRaw": 1000.0,
"focusMapped": 5.0,
"frameRate": 24.0,
"timecode": "01:23:45:12"
},
"camera_transform_data": {
"cameraName": "Camera1",
"whiteBalance": 6500.0,
"tint": 0.0,
"ISO": 800.0,
"shutter": 0.0167,
"focalLengthRaw": 50.0,
"irisRaw": 2.8,
"focusRaw": 1000.0,
"frameRate": 24.0,
"dropFrame": false,
"timecode": "01:23:45:12",
"position": [0.0, 100.0, 200.0],
"orientation": [0.0, 0.0, 0.0, 1.0],
"sensorSize": [36.0, 24.0]
},
"controller_data": {
"controllerName": "Controller1",
"button1": 1.0,
"button2": 0.0,
"button3": 0.0,
"trigger": 0.5,
"touchpadPressed": 1.0,
"touchpadX": 0.25,
"touchpadY": -0.75,
"frameRate": 24.0,
"timecode": "01:23:45:12"
}
}
https://github.com/MadlyFX/LONET-2-LiveLink-Plugin/blob/master/Source/LONET2LiveLink/Private/LONET2LiveLinkSource.cpp