hingedBodyLinearProfiler#

Executive Summary#

Linear deployment profiler for single hinged rigid body.

Message Connection Descriptions#

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages#

Msg Variable Name

Msg Type

Description

hingedRigidBodyReferenceOutMsg

HingedRigidBodyMsgPayload

Output message for reference hinged rigid body state

Detailed Model Description#

This module provides a reference angle and angle rate for a linear deployment of a single hinged rigid body. The user sets a start and stop time, as well as a start and stop angle, and the reference angle and angle rate are calculated for a linear deployment.

User Guide#

This section contains a conceptual overview of the code and an example for the prospective user.

Module Setup#

The interface module is created in python using:

1testModule = hingedBodyLinearProfiler.HingedBodyLinearProfiler()
2testModule.modelTag = "deploymentProfiler"

The deployment is defined by four parameters, the starting and ending times and angles. An error will occur if the delta between start and end time is not positive.

A sample setup is done using:

1from Basilisk.utilities import macros
2from math import pi
3
4testModule.startTime = macros.sec2nano(30) # [ns] start the deployment 30 seconds into the simulation
5testModule.endTime = macros.sec2nano(330) # [ns] continue deploying for 300 seconds
6testModule.startTheta = 0 # [rad] starting angle in radians
7testModule.endTheta = 10*pi/180 # [rad] ending angle is 10 degrees in the positive direction as defined by hinged rigid body frame

Class HingedBodyLinearProfiler#

class HingedBodyLinearProfiler : public SysModel#

Linear deployment profiler for single hinged rigid body.

Public Functions

HingedBodyLinearProfiler()#

This is the constructor for the module class. It sets default variable values and initializes the various parts of the model

~HingedBodyLinearProfiler()#

Module Destructor

void reset(uint64_t currentSimNanos)#

This method is used to reset the module and checks that required input messages are connected.

Returns:

void

void updateState(uint64_t currentSimNanos)#

This is the main method that gets called every time the module is updated. Outputs a reference theta and theta dot based on the current simulation time relative to the start and stop times for the linear deployment.

Returns:

void

Public Members

uint64_t startTime#

[ns] time to begin deployment

uint64_t endTime#

[ns] time to end deployment

double startTheta#

[rad] starting hinged rigid body theta position

double endTheta#

[rad] ending hinged rigid body theta position

Message<HingedRigidBodyMsgPayload> hingedRigidBodyReferenceOutMsg#

&#8212; output message for reference hinged rigid body state (theta, theta dot)

BSKLogger bskLogger#

&#8212; BSK Logging