> For the complete documentation index, see [llms.txt](https://docs.ceruleansonar.com/c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ceruleansonar.com/c/omniscan3d/technical-details/api/attitude_report_2.md).

# ATTITUDE\_REPORT\_2

#### ID: 510

#### Payload Definition

<table><thead><tr><th width="188">Data Type</th><th width="164">Name</th><th>Description</th></tr></thead><tbody><tr><td>u8</td><td>version</td><td>0</td></tr><tr><td>u8</td><td>channel_number</td><td>assigned sequentially from 0. So 0 for a single channel system and 0 or 1 for port/stb setup</td></tr><tr><td>u16</td><td>n_readings</td><td>number of sensor readings integrated into this attitude report</td></tr><tr><td>vec3</td><td>up_vec</td><td>world up vector (x,y,z) in the device coordinate system.</td></tr><tr><td>vec3</td><td>gyro_only_mag_vec</td><td>this is a synthesized magnetic field vector which is derived from the up_vec and the integrated gyro motion. It moves with the device motion, but drifts with respect to actual magnetic north.</td></tr><tr><td>vec3</td><td>mag_vec</td><td>reserved for future magnetic field vector</td></tr><tr><td>vec3</td><td>latest_gyro_vec</td><td>most recent gyro sensor reading, magnitude is deg/sec</td></tr><tr><td>vec3</td><td>ave_gyro_vec</td><td>average of all gyro readings integrated in this update</td></tr><tr><td>u32</td><td>reserved</td><td>(dev note: axx msec)</td></tr><tr><td>u32</td><td>pwr_up_msec</td><td>msec since power up</td></tr><tr><td>u64</td><td>utc_msec</td><td>utc msec (1970 epoc). Will be 0 if not available.</td></tr><tr><td>u32</td><td>reserved[4]</td><td>{0,0,0,0}</td></tr><tr><td>agm_raw_data_t {vec3 accel; vec3 gyro; vec3 mag;}</td><td>raw_sensor_data[n_readings]</td><td>if available, contains all the raw data that was used in this update. Currently is included, but we might support an option to disable in the future to reduce bandwidth.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

The vectors are in the device coordinate system. The X axis is along the lengthwise axis of the Omniscan 3D "all in one" device. Positive direction is the end nearest the blue LED which blinks when powered. The Y axis is along the shorter dimension of the case in plan view, and again positive is in the direction toward the edge nearer to the LED. The Z axis is by right hand rule positive out the back of the case.

<figure><img src="https://2216588158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYPBewS81XN8UkLdYof7D%2Fuploads%2FhSPCWOvr96WxlngyjN9c%2Fomniscan3d-coordinate-system%20v2.png?alt=media&amp;token=df1b6ed2-a044-4e99-9be0-d15bf3dce271" alt=""><figcaption></figcaption></figure>
