State estimation

Gravity Vector

the IMU is placed in the middle of bysense. Use following lines to get the gravity vector from bysense.

python
#import the SDK module
import bysense_sdk as bysense

# Create a boolean connection variable of the start class
bysense_connection = bysense.start.connect()

# Verify the connection status
if bysense_connection.is_connected():
    print(bysense_connection.lastlog())
    
    #Get the gravity in x, y, z format 
    grav_vector = bysense.core.gravityvector()
    print(grav_vector)
        
else:
    print(bysense_connection.lastlog())
    # Handle connection failure as needed

Last updated