Zeroing
The Odyssey tracker sits below or beside the bore, and it is never exactly parallel to it. Zeroing measures that difference once, so that a device’s aimpoint lands where its shots do.
When a device is zeroed, the hub stores two things for it:
- an offset: where the sight line starts, relative to the tracker;
- an angle: the rotation that makes the sight line pass through the target.
From then on, that device’s aimpoint and distance are measured along the
sight line. Its pose does not change: it always describes the tracker.
A zero belongs to the device, not to an app. Once saved, it applies to every app and survives restarts.
Zeroing in Odyssey Desktop
Section titled “Zeroing in Odyssey Desktop”Most users zero on the Zero page of Odyssey Desktop:
- Aim carefully at the target in the center of the screen.
- Press Z, or fire with shot detection on.
- Press Save zero.
If your app leaves zeroing to Odyssey Desktop, it needs no code for it.
Zeroing from your app
Section titled “Zeroing from your app”| Call | Effect |
|---|---|
zero(device, translation, target) |
Zero device against target, using its current tracking. The hub answers with a ZeroResult event. |
reset_zero(device) |
Remove the device’s zero. The hub answers with ZeroResult. |
-
targetis the point being aimed at, in aimpoint coordinates:(0.5, 0.5)is the center of the screen. -
translationis where the sight line starts relative to the tracker, in meters, in the tracker’s own sensor axes. These are not the pose’s axes:Axis Direction on the device +X right +Y down +Z forward, along the bore A bore 6.35 cm above the tracker is therefore
(0, -0.0635, 0), which is what Odyssey Desktop always sends. Pass(0, 0, 0)if the offset doesn’t matter for your setup.
The device must be tracking a screen when you call zero; otherwise the
ZeroResult is false.
// Zero against the center of the screen, with Odyssey Desktop's offset.await client.Zero( device, new Ohc.uniffi.Vector3f32(0f, -0.0635f, 0f), new Ohc.uniffi.Vector2f32(0.5f, 0.5f));# Zero against the center of the screen, with Odyssey Desktop's offset.await client.zero(device, ohc.Vector3f32(x=0.0, y=-0.0635, z=0.0), ohc.Vector2f32(x=0.5, y=0.5))static void on_zero_sent(struct ohc_UserObj userdata, enum ohc_ClientError error) { (void)userdata; if (error != OHC_CLIENT_ERROR_NONE) { puts("Could not send the zero request"); }}
/* Zero against the center of the screen, with Odyssey Desktop's offset. The outcome arrives as an OHC_DEVICE_EVENT_KIND_ZERO_RESULT event. */client_zero(handle, client, (struct ohc_UserObj){NULL}, device, (struct ohc_Vector3f32){0.0f, -0.0635f, 0.0f}, (struct ohc_Vector2f32){0.5f, 0.5f}, on_zero_sent);// Zero against the center of the screen, with Odyssey Desktop's offset.// The outcome arrives as a ZERO_RESULT device event.ohc::client_zero(handle, client, ohc::UserObj{nullptr}, device, ohc::Vector3f32{0.0f, -0.0635f, 0.0f}, ohc::Vector2f32{0.5f, 0.5f}, [](ohc::UserObj, ohc::ClientError error) { if (error != ohc::ClientError::NONE) { std::puts("Could not send the zero request"); } });use odyssey_hub_server_interface::{Vector2, Vector3};
// Zero against the center of the screen, with Odyssey Desktop's offset.// None zeroes with the device's current tracking.client .device(device.clone()) .zero(Vector3 { x: 0.0, y: -0.0635, z: 0.0 }, Vector2 { x: 0.5, y: 0.5 }, None) .await?;
