CCU Headset Packet Formats - snowpuppy/augreality GitHub Wiki

Table of Contents

CCU Output Packet Types

HUD Images

  • displayed in front of 3D objects
  • CCU defines pixel location + hide/show
  • player-position/orientation independent

3D Images

  • CCU defines location + orientation + hide/show
  • player-position/orientation dependent

3 Modes

  1. broadcast headset
  2. load static data
  3. run simulation

Packet Types

 acceptHeadset # headset found by CCU
 # transfer game-specific graphics upon startup;
 # may want to load init  data in via wired usb
 # connection
 loadStaticData(image ID, 2D/3D image)
 # headset can start rendering frames
 startSimulation
 # possibly one packet for each  2D and 3D images;
 # implicitly creates memory for new image instance if not exists;
 # in addition to overlaying  HUD images + 3D objects, may want to
 # add 2D textures in 3D environment.
 updateImageInstance(image ID, instance ID, location, orientation, hide/show)
 endSimulation # sends Headset into Standby mode so that new (not necessarily same) can start

Headset Psuedocode

 #init vars
 recognized = 0
 class OutPacket:
     init:
         header = ??
         x = 0
         y = 0
         z = 0
         pitch = 0
         yaw = 0
         roll = 0
     set(x,y,z,pitch,yaw,roll):
        ...
 class InPacket:
     init:
         header = ??
        
 class SensorData:
     ...
 
 getSensorData
 processSensorData
 txPacket
 rxPacket
 renderFrame
 drawFrame
 
 #standby
 while(!recognized)
     txPacket(READY_PACKET)
     processPacket(getPacket())
     # main
     sensorData = getSensorData()
     outPacket = processSensorData(sensorData)
     txPacket(outPacket)
     inPacket = rxPacket()
     # if inPacket is None:
     #     inPacket = lostConnectivity()
     frame = renderFrame(inPacket, outPacket)
     drawFrame(frame)
     # wait?
⚠️ **GitHub.com Fallback** ⚠️