Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/simulation/dynamics/FuelTank/fuelTank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void FuelTank::updateEffectorMassProps(double integTime) {

// Mass depletion (call thrusters attached to this tank to get their mDot, and contributions)
this->fuelConsumption = 0.0;
this->fuelConsumption += this->fuelLeakRate;
for (auto &dynEffector: this->thrDynEffectors) {
dynEffector->computeStateContribution(integTime);
this->fuelConsumption += dynEffector->stateDerivContribution(0);
Expand Down
1 change: 1 addition & 0 deletions src/simulation/dynamics/FuelTank/fuelTank.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ class FuelTank :
bool updateOnly = true; //!< -- Sets whether to use update only mass depletion
Message<FuelTankMsgPayload> fuelTankOutMsg{}; //!< -- fuel tank output message name
FuelTankMsgPayload fuelTankMassPropMsg{}; //!< instance of messaging system message struct
double fuelLeakRate{}; //!< [kg/s] rate of fuel leaking from tank; does not produce force
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to just make this a public variable that gets set from python. I think it would be cleaner to have this as an optional input message. If it is connected, then we read in this rate and set this now private variable. This way, if the rate of fuel usage changes, this can be set via the input message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you propose a new type of message to handle this? Currently the fuel tank takes no input messages since it's connected to the thrusters at a deeper level than the messaging system, so there's no obvious existing message type to include this in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can have a flowRate message type? This would make this implementation much more flexible.


private:
StateData *omegaState{}; //!< -- state data for omega_BN of the hub
Expand Down