Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 and newer > Feature
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

API request: Make Vessel::GetEmptyMass() and Vessel::GetPropellantMass() virtual Issue Tools
issueid=1240 06-06-2016 07:33 PM
shoemaker without legs
API request: Make Vessel::GetEmptyMass() and Vessel::GetPropellantMass() virtual

I wrote a wrapper around the default orbiter way to handle thrusters and propellant resources, because I wanted the ability to separate components of a mixture into individual tanks (like for example fuel and oxidizer).

The approach is pretty straight forward: I put in a a dummy resource feeding the thruster, which also tells me how much propellant has been consumed during the last frame. I then update my tanks depending on the mix ratio, and resett the mass of the whole vessel.

There is one problem: Anybody calling GetEmptyMass() and GetPropellantMass() on my vessel is getting back garbage. If any nav-tools or burn-time calculators need to know my mass ratio, they can pack up and go home. They simply won't be compatible.

This would appear to be solvable by letting me override those two methods and returning my internal values. I can think of several ways how this could screw royally with several things in the core, depending how things are implemented down there. So, the question to martins would be: Would overriding these methods lead to trouble, and if no, could you make them virtual?
Otherwise I'll just have to live with occasional incompatibilities...
Issue Details
Issue Type Feature
Project ORBITER: 2010-P1 and newer
Status Request
Priority 8
Suggested Version 121202
Implemented Version (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)

Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 07:11 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.