CTRE Phoenix C++ 5.33.1
ctre::phoenix::sensors::BasePigeonSimCollection Class Reference

Collection of simulation functions available to a Pigeon IMU. More...

#include <ctre/phoenix/sensors/BasePigeonSimCollection.h>

Public Member Functions

 BasePigeonSimCollection (ctre::phoenix::sensors::BasePigeon &pigeon, bool isRibbonCable)
 
ErrorCode SetRawHeading (double newHeading)
 Sets the simulated input heading position of the Pigeon IMU. More...
 
ErrorCode AddHeading (double dHeading)
 Adds to the simulated heading of the Pigeon IMU. More...
 

Detailed Description

Collection of simulation functions available to a Pigeon IMU.

Use the getSimCollection() function in your BasePigeon object to create the respective sim collection.

Constructor & Destructor Documentation

◆ BasePigeonSimCollection()

ctre::phoenix::sensors::BasePigeonSimCollection::BasePigeonSimCollection ( ctre::phoenix::sensors::BasePigeon pigeon,
bool  isRibbonCable 
)
Parameters
pigeonPigeon IMU to connect so sim collection

Member Function Documentation

◆ AddHeading()

ErrorCode ctre::phoenix::sensors::BasePigeonSimCollection::AddHeading ( double  dHeading)

Adds to the simulated heading of the Pigeon IMU.

Parameters
dHeadingthe change in heading in degrees
Returns
error code

◆ SetRawHeading()

ErrorCode ctre::phoenix::sensors::BasePigeonSimCollection::SetRawHeading ( double  newHeading)

Sets the simulated input heading position of the Pigeon IMU.

The Pigeon IMU integrates the delta between each new raw heading value and uses this to calculate the true reported yaw and fused heading.

When using the WPI Sim GUI, you will notice a readonly 'yaw' and settable 'RawHeading'. The readonly signal is the emulated yaw which will match self-test in Tuner and the hardware API. Changes to 'RawHeading' will be integrated into the emulated yaw. This way a simulator can modify the heading without overriding your hardware API calls for home-ing your sensor.

Inputs to this function over time should be continuous, as user calls of setYaw() or setFusedHeading() will be accounted for in the calculation.

Parameters
newHeadingthe new input heading in degrees
Returns
error code

The documentation for this class was generated from the following file: