Library API Documentation

Available Types

class vnpy.CompositeData

Mega class that consolidates all data output types available from VectorNav sensors.

class vnpy.EzAsyncData

Wraps class VnSensor and provides easy methods for accessing the sensor’s asynchronous data messages.

class vnpy.VnSensor

Base class for interfacing with VectorNav sensors.

class vnpy.Attitude

Represents attitude of an object that may be represented in either yaw, pitch, roll, quaternion, or direction cosine matrix.

class vnpy.Packet

Wraps a VectorNav UART packet with associated tools for parsing.

CompositeData Objects

class vnpy.CompositeData

This class is able to hold all data output types from VectorNav sensors.

Class attributes are:

CompositeData.has_any_attitude

Indicates if CompositeData.any_attitude contains any data.

CompositeData.any_attitude

Gets and converts the latest attitude data regardless of the received underlying type. Based on which type of attitude data that was last received and processed, this value may be based on either received yaw, pitch, roll, quaternion, or direction cosine matrix data.

CompositeData.has_yaw_pitch_roll

Indicates if CompositeData.yaw_pitch_roll has valid data.

CompositeData.yaw_pitch_roll

Yaw, pitch, roll data.

CompositeData.has_quaternion

Indicates if CompositeData.quaternion has valid data.

CompositeData.quaternion

Quaternion data.

CompositeData.has_direction_cosine_matrix

Indicates if CompositeData.direction_cosine_matrix has valid data.

CompositeData.direction_cosine_matrix

Direction cosine matrix data.

CompositeData.has_any_magnetic

Indicates if CompositeData.any_magnetic has valid data.

CompositeData.any_magnetic

Gets the latest magnetic data regardless of the received underlying type.

CompositeData.has_magnetic

Indicates if CompositeData.magnetic has valid data.

CompositeData.magnetic

Magnetic data.

CompositeData.has_magnetic_uncompensated

Indicates if CompositeData.magnetic_uncompensated has valid data.

CompositeData.magnetic_uncompensated

Magnetic uncompensated data.

CompositeData.has_magnetic_ned

Indicates if CompositeData.magnetic_ned has valid data.

CompositeData.magnetic_ned

Magnetic NED data.

CompositeData.has_magnetic_ecef

Indicates if CompositeData.magnetic_ecef has valid data.

CompositeData.magnetic_ecef

Magnetic ECEF data.

CompositeData.has_any_acceleration

Indicates if CompositeData.any_acceleration has valid data.

CompositeData.any_acceleration

Gets the latest acceleration data regardless of the received underlying type.

CompositeData.has_acceleration

Indicates if CompositeData.acceleration has valid data.

CompositeData.acceleration

Acceleration data.

CompositeData.has_acceleration_linear_body

Indicates if CompositeData.acceleration_linear_body has valid data.

CompositeData.acceleration_linear_body

Acceleration linear body data.

CompositeData.has_acceleration_uncompensated

Indicates if CompositeData.acceleration_uncompensated has valid data.

CompositeData.acceleration_uncompensated

Acceleration uncompensated data.

CompositeData.has_acceleration_linear_ned

Indicates if CompositeData.acceleration_linear_ned has valid data.

CompositeData.acceleration_linear_ned

Acceleration linear NED data.

CompositeData.has_acceleration_linear_ecef

Indicates if CompositeData.acceleration_linear_ecef has valid data.

CompositeData.acceleration_linear_ecef

Acceleration linear ECEF data.

CompositeData.has_acceleration_ned

Indicates if CompositeData.acceleration_ned has valid data.

CompositeData.acceleration_ned

Acceleration NED data.

CompositeData.has_acceleration_ecef

Indicates if CompositeData.acceleration_ecef has valid data.

CompositeData.acceleration_ecef

Acceleration ECEF data.

CompositeData.has_any_angular_rate

Indicates if CompositeData.any_angular_rate has valid data.

CompositeData.any_angular_rate

Gets the latest angular rate data regardless of the received underlying type.

CompositeData.has_angular_rate

Indicates if CompositeData.angular_rate has valid data.

CompositeData.angular_rate

Angular rate data.

CompositeData.has_angular_rate_uncompensated

Indicates if CompositeData.angular_rate_uncompensated has valid data.

CompositeData.angular_rate_uncompensated

Angular rate uncompensated data.

CompositeData.has_any_temperature

Indicates if CompositeData.any_temperature has valid data.

CompositeData.any_temperature

Gets the latest temperature data regardless of the received underlying type.

CompositeData.has_temperature

Indicates if CompositeData.temperature has valid data.

CompositeData.temperature

Temperature data.

CompositeData.has_any_pressure

Indicates if CompositeData.any_pressure has valid data.

CompositeData.any_pressure

Gets the latest pressure data regardless of the received underlying type.

CompositeData.has_pressure

Indicates if CompositeData.pressure has valid data.

CompositeData.pressure

Temperature data.

CompositeData.has_any_position

Indicates if CompositeData.any_position has valid data.

CompositeData.any_position

Gets the latest position data regardless of the received underlying type.

CompositeData.has_position_gps_lla

Indicates if CompositeData.position_gps_lla has valid data.

CompositeData.position_gps_lla

Position GPS LLA data.

CompositeData.has_position_gps_ecef

Indicates if CompositeData.position_gps_ecef has valid data.

CompositeData.position_gps_ecef

Position GPS ECEF data.

CompositeData.has_position_estimated_lla

Indicates if CompositeData.position_estimated_lla has valid data.

CompositeData.position_estimated_lla

Position estimated LLA data.

CompositeData.has_position_estimated_ecef

Indicates if CompositeData.position_estimated_ecef has valid data.

CompositeData.position_estimated_ecef

Position estimated ECEF data.

CompositeData.has_any_velocity

Indicates if CompositeData.any_velocity has valid data.

CompositeData.any_velocity

Gets the latest velocity data regardless of the received underlying type.

CompositeData.has_velocity_gps_ned

Indicates if CompositeData.velocity_gps_ned has valid data.

CompositeData.velocity_gps_ned

Velocity GPS NED data.

CompositeData.has_velocity_gps_ecef

Indicates if CompositeData.velocity_gps_ecef has valid data.

CompositeData.velocity_gps_ecef

Velocity GPS ECEF data.

CompositeData.has_velocity_estimated_ned

Indicates if CompositeData.velocity_estimated_ned has valid data.

CompositeData.velocity_estimated_ned

Velocity estimated NED data.

CompositeData.has_velocity_estimated_ecef

Indicates if CompositeData.velocity_estimated_ecef has valid data.

CompositeData.velocity_estimated_ecef

Velocity estimated ECEF data.

CompositeData.has_velocity_estimated_body

Indicates if CompositeData.velocity_estimated_body has valid data.

CompositeData.velocity_estimated_body

Velocity estimated body data.

CompositeData.has_delta_time

Indicates if CompositeData.delta_time has valid data.

CompositeData.delta_time

Delta time data.

CompositeData.has_delta_theta

Indicates if CompositeData.delta_theta has valid data.

CompositeData.delta_theta

Delta theta data.

CompositeData.has_delta_velocity

Indicates if CompositeData.delta_velocity has valid data.

CompositeData.delta_velocity

Delta velocity data.

CompositeData.has_time_startup

Indicates if CompositeData.time_startup has valid data.

CompositeData.time_startup

Time startup data.

CompositeData.has_time_gps

Indicates if CompositeData.time_gps has valid data.

CompositeData.time_gps

Time GPS data.

CompositeData.has_tow

Indicates if CompositeData.tow has valid data.

CompositeData.tow

GPS time of week data.

CompositeData.has_week

Indicates if CompositeData.week has valid data.

CompositeData.week

Week data.

CompositeData.has_num_sats

Indicates if CompositeData.num_sats has valid data.

CompositeData.num_sats

NumSats data.

CompositeData.has_time_sync_in

Indicates if CompositeData.time_sync_in has valid data.

CompositeData.time_sync_in

TimeSyncIn data.

CompositeData.has_vpe_status

Indicates if CompositeData.vpe_status has valid data.

CompositeData.vpe_status

VpeStatus data.

CompositeData.has_ins_status

Indicates if CompositeData.ins_status has valid data.

CompositeData.ins_status

InsStatus data.

CompositeData.has_sync_in_cnt

Indicates if CompositeData.sync_in_cnt has valid data.

CompositeData.sync_in_cnt

SyncInCnt data.

CompositeData.has_time_gps_pps

Indicates if CompositeData.time_gps_pps has valid data.

CompositeData.time_gps_pps

TimeGpsPps data.

CompositeData.has_gps_tow

Indicates if CompositeData.gps_tow has valid data.

CompositeData.gps_tow

GpsTow data.

CompositeData.has_time_utc

Indicates if CompositeData.time_utc has valid data.

CompositeData.time_utc

TimeUtc data.

CompositeData.has_sens_sat

Indicates if CompositeData.sens_sat has valid data.

CompositeData.sens_sat

SensSat data.

CompositeData.has_fix

Indicates if CompositeData.fix has valid data.

CompositeData.fix

GPS fix data.

CompositeData.has_any_position_uncertainty

Indicates if CompositeData.any_position_uncertainty has valid data.

CompositeData.any_position_uncertainty

Gets the latest position uncertainty data regardless of the received underlying type.

CompositeData.has_position_uncertainty_gps_ned

Indicates if CompositeData.position_uncertainty_gps_ned has valid data.

CompositeData.position_uncertainty_gps_ned

GPS position uncertainty NED data.

CompositeData.has_position_uncertainty_gps_ecef

Indicates if CompositeData.position_uncertainty_gps_ecef has valid data.

CompositeData.position_uncertainty_gps_ecef

GPS position uncertainty ECEF data.

CompositeData.has_position_uncertainty_estimated

Indicates if CompositeData.position_uncertainty_estimated has valid data.

CompositeData.position_uncertainty_estimated

Estimated position uncertainty data.

CompositeData.has_any_velocity_uncertainty

Indicates if CompositeData.any_velocity_uncertainty has valid data.

CompositeData.any_velocity_uncertainty

Gets the latest velocity uncertainty data regardless of the received underlying type.

CompositeData.has_velocity_uncertainty_gps

Indicates if CompositeData.velocity_uncertainty_gps has valid data.

CompositeData.velocity_uncertainty_gps

GPS velocity uncertainty data.

CompositeData.has_velocity_uncertainty_estimated

Indicates if CompositeData.velocity_uncertainty_estimated has valid data.

CompositeData.velocity_uncertainty_estimated

Estimated velocity uncertainty data.

CompositeData.has_time_uncertainty

Indicates if CompositeData.time_uncertainty has valid data.

CompositeData.time_uncertainty

Time uncertainty data.

CompositeData.has_attitude_uncertainty

Indicates if CompositeData.attitude_uncertainty has valid data.

CompositeData.attitude_uncertainty

Attitude uncertainty data.

Class methods are:

classmethod CompositeData.parse(packet)

Parses a packet.

EzAsyncData Objects

class vnpy.EzAsyncData

This class internally wraps a VnSensor object and provides easy methods for accessing asynchronous data from a VectorNav sensor. All low-level access functionality is still available through the property EzAsyncData.sensor.

Typically a call to EzAsyncData.connect() is used to create this object.

Class attributes are:

EzAsyncData.sensor

The wrapped VnSensor object which can be used to query the VectorNav sensor.

EzAsyncData.currentdata

The most recently cached asynchronous data processed.

Class methods are:

classmethod EzAsyncData.connect(portname, baudrate)

Immediately connects to a VectorNav sensor using the provided port parameters and returns an EzAsyncData object.

EzAsyncData.disconnect()

Disconnects from the VectorNav sensors.

EzAsyncData.next_data() → CompositeData

Retrieves the next available data packet. If a new data packet has not been received since the last call, this method will block until a new one is received. See also EzAsyncData.next_data(timeout_ms) for a timeout version.

EzAsyncData.next_data(timeout_ms) → CompositeData

A timeout version of EzAsyncData.next_data(). If a timeout occurs before a new data packet is received, a TimeoutError will be raised.

VnSensor Objects

class vnpy.VnSensor

Helpful class for working with VectorNav sensors.

Class attributes are:

VnSensor.baudrate

Baud rate of the serial port connection. Note this is independent of the sensor’s on-board serial baud rate setting.

VnSensor.is_connected

Indicates if the VnSensor is connected.

VnSensor.response_timeout_ms

The amount of time in milliseconds to wait for a response during read/write operations with the sensor.

VnSensor.retransmit_delay_ms

The delay in milliseconds between retransmitting commands.

VnSensor.send_error_detection_mode

The error detection mode used for commands sent to the sensor. Default is CHECKSUM.

VnSensor.port

Name of the port the sensor is connected to.

Class methods are:

VnSensor.acceleration_disturbance_present(disturbance_present)

Command to inform the VectorNav Sensor if there is an acceleration disturbance present. Set disturbance_present to True when a disturbance is present. Set it to False when the disturbance is gone.

VnSensor.change_baudrate(baudrate)

Issues a change baudrate to the VectorNav sensor and then reconnects the attached serial port at the new baudrate.

VnSensor.connect(port, baudrate)

Connects to a VectorNav sensor on the provided port and baudrate.

VnSensor.determine_device_family()

This method will query the attached sensor and determine the device family it belongs to.

VnSensor.disconnect()

Disconnects from the VectorNav sensor.

VnSensor.magnetic_disturbance_present(disturbance_present)

Command to inform the VectorNav Sensor if there is a magnetic disturbance present. Set disturbance_present to True when a disturbance is present. Set it to False when the disturbance is gone.

VnSensor.read_acceleration_compensation()

Reads the Acceleration Compensation register.

VnSensor.read_acceleration_measurements()

Reads the Acceleration Measurements register.

VnSensor.read_angular_rate_measurements()

Reads the Angular Rate Measurements register.

VnSensor.read_async_data_output_frequency(port=None)

Reads the Async Data Output Frequency register.

VnSensor.read_async_data_output_type(port=None)

Reads the Async Data Output Type register.

VnSensor.read_attitude_quaternion()

Reads the Attitude Quaternion register.

VnSensor.read_binary_output_1()
VnSensor.read_binary_output_2()
VnSensor.read_binary_output_3()

Reads the Binary Output 1/2/3 register.

VnSensor.read_calculated_magnetometer_calibration()

Reads the Calculated Magnetometer Calibration register.

VnSensor.read_communication_protocol_control()

Reads the Communication Protocol Control register.

VnSensor.read_delta_theta_and_delta_velocity()

Reads the Delta Theta and Delta Velocity register.

VnSensor.read_delta_theta_and_delta_velocity_configuration(fields)
VnSensor.read_delta_theta_and_delta_velocity_configuration(integration_frame, gyro_compensation, accel_compensation)

Writes to the Delta Theta and Delta Velocity Configuration register.

VnSensor.read_filter_measurements_variance_parameters()

Reads the Filter Measurements Variance Parameters register.

VnSensor.read_filter_active_tuning_parameters()

Reads the Filter Active Tuning Parameters register.

VnSensor.read_filter_basic_control()

Reads the Filter Basic Control register.

VnSensor.read_filter_startup_gyro_bias()

Reads the Filter Startup Gyro Bias register.

VnSensor.read_firmware_version()

Reads the Firmware Version register.

VnSensor.read_gps_antenna_offset()

Reads the GPS Antenna Offset register.

VnSensor.read_gps_compass_baseline()

Reads the GPS Compass Baseline register.

VnSensor.read_gps_compass_estimated_baseline()

Reads the GPS Compass Estimated Baseline register.

VnSensor.read_gps_configuration()

Reads the GPS Configuration register.

VnSensor.read_gps_solution_ecef()

Reads the GPS Solution - ECEF register.

VnSensor.read_gps_solution_lla()

Reads the GPS Solution - LLA register.

VnSensor.read_gyro_compensation()

Reads the Gyro Compensation register.

VnSensor.read_hardware_revision()

Reads the Hardware Revision register.

VnSensor.read_imu_filtering_configuration()

Reads the IMU Filtering Configuration register.

VnSensor.read_imu_measurements()

Reads the IMU Measurements register.

VnSensor.read_imu_rate_configuration()

Reads the IMU Rate Configuration register.

VnSensor.read_indoor_heading_mode_control()

Reads the Indoor Heading Mode Control register.

VnSensor.read_ins_advanced_configuration()

Reads the INS Advanced Configuration register.

VnSensor.read_ins_basic_configuration_vn200()

Reads the INS Basic Configuration register for a VN-200 sensor.

VnSensor.read_ins_basic_configuration_vn300()

Reads the INS Basic Configuration register for a VN-300 sensor.

VnSensor.read_ins_solution_ecef()

Reads the INS Solution - ECEF register.

VnSensor.read_ins_solution_lla()

Reads the INS Solution - LLA register.

VnSensor.read_ins_state_ecef()

Reads the INS State - ECEF register.

VnSensor.read_ins_state_lla()

Reads the INS State - LLA register.

VnSensor.read_magnetic_acceleration_and_angular_rates()

Reads the Magnetic, Acceleration and Angular Rates register.

VnSensor.read_magnetic_and_gravity_reference_vectors()

Reads the Magnetic and Gravity Reference Vectors register.

VnSensor.read_magnetic_measurements()

Reads the Magnetic Measurements register.

VnSensor.read_magnetometer_calibration_control()

Reads the Magnetometer Calibration Control register.

VnSensor.read_magnetometer_compensation()

Reads the Magnetometer Compensation register.

VnSensor.read_model_number()

Reads the Model Number register.

VnSensor.read_quaternion_magnetic_acceleration_and_angular_rates()

Reads the Quaternion, Magnetic, Acceleration and Angular Rates register.

VnSensor.read_reference_frame_rotation()

Reads the Reference Frame Rotation register.

VnSensor.read_reference_vector_configuration()

Reads the Reference Vector Configuration register.

VnSensor.read_serial_baudrate(port=None)

Reads the Serial Baud Rate register for the specified port.

VnSensor.read_serial_number()

Reads the Serial Number register.

VnSensor.read_startup_filter_bias_estimate()

Reads the Startup Filter Bias Estimate register.

VnSensor.read_synchronization_control()

Reads the Synchronization Control register.

VnSensor.read_synchronization_status()

Reads the Synchronization Status register.

VnSensor.read_user_tag()

Reads the User Tag register.

VnSensor.read_velocity_compensation_control()

Reads the Velocity Compensation Control register.

VnSensor.read_velocity_compensation_measurement()

Reads the Velocity Compensation Measurement register.

VnSensor.read_velocity_compensation_status()

Reads the Velocity Compensation Status register.

VnSensor.read_vpe_basic_control()

Reads the VPE Basic Control register.

VnSensor.read_vpe_accelerometer_advanced_tuning()

Reads the VPE Accelerometer Advanced Tuning register.

VnSensor.read_vpe_accelerometer_basic_tuning()

Reads the VPE Accelerometer Basic Tuning register.

VnSensor.read_vpe_gyro_basic_tuning()

Reads the VPE Gryo Basic Tuning register.

VnSensor.read_vpe_magnetometer_advanced_tuning()

Reads the VPE Magnetometer Advanced Tuning register.

VnSensor.read_vpe_magnetometer_basic_tuning()

Reads the VPE Magnetometer Basic Tuning register.

VnSensor.read_yaw_pitch_roll()

Reads the Yaw Pitch Roll register.

VnSensor.read_yaw_pitch_roll_magnetic_acceleration_and_angular_rates()

Reads the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates register.

VnSensor.read_yaw_pitch_roll_true_body_acceleration_and_angular_rates_register()

Reads the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates register.

VnSensor.read_yaw_pitch_roll_true_inertial_acceleration_and_angular_rates_register()

Reads the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates register.

VnSensor.reset()

Issues a Reset command to the VectorNav sensor.

VnSensor.restore_factory_settings()

Issues a Restore Factory Settings command to the VectorNav sensor.

VnSensor.set_gyro_bias()

Issues a command to the VectorNav Sensor to set the gyro’s bias.

classmethod VnSensor.supported_baudrates()

The list of baud rates supported by VectorNav sensors.

VnSensor.tare()

Issues a tare command to the VectorNav Sensor.

VnSensor.transaction(send)

Sends the provided command and returns the response from the sensor.

If the command does not have an asterisk ‘*’, then a checksum will be performed and appended based on the current error detection mode. Also, if the line-ending \r\n is not present, these will be added also.

VnSensor.verify_sensor_connectivity()

Checks if we are able to send and receive communication with a sensor.

VnSensor.write_acceleration_compensation(fields)
VnSensor.write_acceleration_compensation(c, b)

Writes to the Acceleration Compensation register.

VnSensor.write_async_data_output_frequency(adof, port=None)

Writes to the Async Data Output Frequency register.

VnSensor.write_async_data_output_type(ador, port=None)

Writes to the Async Data Output Type register.

VnSensor.write_binary_output_1(fields)
VnSensor.write_binary_output_2(fields)
VnSensor.write_binary_output_3(fields)

Writes to the Binary Output 1/2/3 register.

VnSensor.write_communication_protocol_control(fields)
VnSensor.write_communication_protocol_control(serial_count, serial_status, spi_count, spi_status, serial_checksum, spi_checksum, error_mode)

Writes to the Communication Protocol Control register.

VnSensor.write_filter_active_tuning_parameters(fields)
VnSensor.write_filter_active_tuning_parameters(magnetic_disturbance_gain, acceleration_disturbance_gain, magnetic_disturbance_memory, acceleration_disturbance_memory)

Writes to the Filter Active Tuning Parameters register.

VnSensor.write_filter_basic_control(fields)
VnSensor.write_filter_basic_control(mag_mode, ext_mag_mode, ext_acc_mode, ext_gyro_mode, gyro_limit)

Writes to the Filter Basic Control register.

VnSensor.write_filter_measurements_variance_parameters(fields)
VnSensor.write_filter_measurements_variance_parameters(angular_walk_variance, angular_rate_variance, magnetic_variance, acceleration_variance)

Writes to the Filter Measurements Variance Parameters register.

VnSensor.write_filter_startup_gyro_bias(bias)

Writes to the Filter Startup Gyro Bias register.

VnSensor.write_gps_antenna_offset(position)

Writes to the GPS Antenna Offset register.

VnSensor.write_gps_compass_baseline(fields)
VnSensor.write_gps_compass_baseline(position, uncertainty)

Writes to the GPS Compass Baseline register.

VnSensor.write_gps_configuration(fields)
VnSensor.write_gps_configuration(mode, pps_source)

Writes to the GPS Configuration register.

VnSensor.write_gyro_compensation(fields)
VnSensor.write_gyro_compensation(c, b)

Writes to the Gyro Compensation register.

VnSensor.write_imu_filtering_configuration(fields)
VnSensor.write_imu_filtering_configuration(mag_window_size, accel_window_size, gyro_window_size, temp_window_size, pres_window_size, mag_filter_mode, accel_filter_mode, gyro_filter_mode, temp_filter_mode, pres_filter_mode)

Writes to the IMU Filtering Configuration register.

VnSensor.write_imu_rate_configuration(fields)
VnSensor.write_imu_rate_configuration(imu_rate, nav_divisor, filter_target_rate, filter_min_rate)

Writes to the IMU Rate Configuration register.

VnSensor.write_indoor_heading_mode_control(max_rate_error)

Writes to the Indoor Heading Mode Control register.

VnSensor.write_ins_advanced_configuration(fields)
VnSensor.write_ins_advanced_configuration(use_mag, use_pres, pos_att, vel_att, vel_bias, use_foam, gps_cov_type, vel_count, vel_init, move_origin, gps_timeout, delta_limit_pos, delta_limit_vel, min_pos_uncertainty, min_vel_uncertainty)

Writes to the INS Advanced Configuration register.

VnSensor.write_ins_basic_configuration_vn200(fields)
VnSensor.write_ins_basic_configuration_vn200(scenario, ahrs_aiding)

Writes to the INS Basic Configuration register for a VN-200 sensor.

VnSensor.write_ins_basic_configuration_vn300(fields)
VnSensor.write_ins_basic_configuration_vn300(scenario, ahrs_aiding, est_baseline)

Writes to the INS Basic Configuration register for a VN-300 sensor.

VnSensor.write_magnetic_and_gravity_reference_vectors(fields)
VnSensor.write_magnetic_and_gravity_reference_vectors(mag_ref, acc_ref)

Writes to the Magnetic and Gravity Reference Vectors register.

VnSensor.write_magnetometer_calibration_control(fields)
VnSensor.write_magnetometer_calibration_control(hsi_mode, hsi_output, converge_rate)

Writes to the Magnetometer Calibration Control register.

VnSensor.write_magnetometer_compensation(fields)
VnSensor.write_magnetometer_compensation(c, b)

Writes to the Magnetometer Compensation register.

VnSensor.write_reference_frame_rotation(c)

Writes to the Reference Frame Rotation register.

VnSensor.write_reference_vector_configuration(fields)
VnSensor.write_reference_vector_configuration(use_mag_model, use_gravity_model, recalc_threshold, year, position)

Writes to the Reference Vector Configuration register.

VnSensor.write_serial_baudrate(baudrate, port=None)

Writes to the Serial Baud Rate register for the specified port.

VnSensor.write_settings()

Issues a Write Settings command to the VectorNav Sensor.

VnSensor.write_startup_filter_bias_estimate(fields)
VnSensor.write_startup_filter_bias_estimate(gyro_bias, accel_bias, pressure_bias)

Writes to the Startup Filter Bias Estimate register.

VnSensor.write_synchronization_control(fields)
VnSensor.write_synchronization_control(sync_in_mode, sync_in_edge, sync_in_skip_factor, sync_out_mode, sync_out_polarity, sync_out_skip_factor, sync_out_pulse_width)

Writes to the Synchronization Control register.

VnSensor.write_synchronization_status(fields)
VnSensor.write_synchronization_status(sync_in_count, sync_in_time, sync_out_count)

Writes to the Synchronization Status register.

VnSensor.write_user_tag(tag)

Writes to the User Tag register.

VnSensor.write_velocity_compensation_control(fields)
VnSensor.write_velocity_compensation_control(mode, velocity_tuning, rate_tuning)

Writes to the Velocity Compensation Control register.

VnSensor.write_velocity_compensation_measurement(velocity)

Writes to the Velocity Compensation Measurement register.

VnSensor.write_vpe_basic_control(fields)
VnSensor.write_vpe_basic_control(enable, heading_mode, filtering_mode, tuning_mode)

Writes to the VPE Basic Control register.

VnSensor.write_vpe_accelerometer_advanced_tuning(fields)
VnSensor.write_vpe_accelerometer_advanced_tuning(min_filtering, max_filtering, max_adapt_rate, disturbance_window, max_tuning)

Writes to the VPE Accelerometer Advanced Tuning register.

VnSensor.write_vpe_accelerometer_basic_tuning(fields)
VnSensor.write_vpe_accelerometer_basic_tuning(base_tuning, adaptive_tuning, adaptive_filtering)

Writes to the VPE Accelerometer Basic Tuning register.

VnSensor.write_vpe_gyro_basic_tuning(fields)
VnSensor.write_vpe_gyro_basic_tuning(angular_walk_variance, base_tuning, adaptive_tuning)

Writes to the VPE Gryo Basic Tuning register.

VnSensor.write_vpe_magnetometer_advanced_tuning(fields)
VnSensor.write_vpe_magnetometer_advanced_tuning(min_filtering, max_filtering, max_adapt_rate, disturbance_window, max_tuning)

Writes to the VPE Magnetometer Advanced Tuning register.

VnSensor.write_vpe_magnetometer_basic_tuning(fields)
VnSensor.write_vpe_magnetometer_basic_tuning(base_tuning, adaptive_tuning, adaptive_filtering)

Writes to the VPE Magnetometer Basic Tuning register.

Attitude Objects

class vnpy.Attitude

Represents an orientation of an object regardless of the underlying data type (i.e. yaw, pitch, roll, quaternion, direction cosine matrix). Allows easy conversion between these types.

Class attributes are:

Attitude.ypr_degs

Yaw, pitch, roll representation in degrees.

Attitude.ypr_rads

Yaw, pitch, roll representation in radians.

Attitude.quat

Quaternion representation.

Attitude.dcm

Direction cosine matrix representation.

Class methods are:

classmethod Attitude.no_rotation()

Represents a object with no rotation.

classmethod Attitude.from_quat(quat)

Creates an Attitude object from the provided quaternion representation.

classmethod Attitude.from_ypr_degs(ypr)

Creates an Attitude object from the provided yaw, pitch, roll representation in degrees.

classmethod Attitude.from_ypr_rads(ypr)

Creates an Attitude object from the provided yaw, pitch, roll representation in radians.

classmethod Attitude.from_dcm(dcm)

Creates an Attitude object from the provided direction cosine matrix representation.

Position Objects

class vnpy.Position

Represents the position/location of an object regardless of the underlying data type. Allows easy conversion between these types.

Class methods are:

classmethod Attitude.from_lla(lla)

Creates a Position object from the given latitude, longitude, altitude (LLA) values.

classmethod Attitude.from_ecef(ecef)

Creates a Position object from the given earth-centered, earth-fixed (ECEF) values.

vec3f Objects

class vnpy.vec3f

Represents a 3-component vector based on single-precision floats.

Class attributes are:

vec3f.x

The X (0-component).

vec3f.y

The Y (1-component).

vec3f.z

The Z (2-component).

vec4f Objects

class vnpy.vec4f

Represents a 4-component vector based on single-precision floats.

Class attributes are:

vec4f.x

The X (0-component).

vec4f.y

The Y (1-component).

vec4f.z

The Z (2-component).

vec4f.w

The W (3-component).

mat3f Objects

class vnpy.mat3f

Represents a 3x3 matrix based on single-precision floats.

Class attributes are:

mat3f.e00

The element at row 0, column 0.

mat3f.e01

The element at row 0, column 1.

mat3f.e02

The element at row 0, column 2.

mat3f.e10

The element at row 1, column 0.

mat3f.e11

The element at row 1, column 1.

mat3f.e12

The element at row 1, column 2.

mat3f.e20

The element at row 2, column 0.

mat3f.e21

The element at row 2, column 1.

mat3f.e22

The element at row 2, column 2.

Packet Objects

class vnpy.Packet

Wraps a VectorNav UART packet with associated tools for parsing.

Class attributes are:

Packet.is_valid

Performs data integrity check on the data packet. This will be either 8-bit XOR checksum, CRC16-CCITT CRC, or no check depending on the provided data integrity type in the packet.

Packet.type

The type of packet.

Packet.datastr

Returns the encapsulated data as a string.

Packet.is_error

Indicates if the packet is an ASCII error message.

Packet.is_response

Indicates if the packet is a response to a message sent to the sensor.

Packet.is_ascii_response

Indicates if the packet is an ASCII asynchronous message.

Class methods are:

Packet.determine_ascii_async_type()

Determines the type of ASCII asynchronous message this packet is.

Packet.parse_error()

Parses an error packet to get the error type.