Project Multistage2015 - Development Thread

boogabooga

Bug Crusher
Joined
Apr 16, 2011
Messages
2,999
Reaction score
1
Points
0
The FOI launchpads were their own dll vessels that handled the launch effects, IIRC.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Any chance of implementing Sea Level ISP? Trying to get as close as possible to RL rocket performance is pretty difficult for us semi non-coders without both the SL ISP implementation AND the booster thrust curve implementation in the same package.

Gotta use Velcro to get the SL ISP difference, and MS for the thrust curve on boosters :(.

I want to try to get as realistic as possible with the Atlas V family so both are important to me.

Also would it be possible to also add a jettison delay for stages after the fuel is gone?

ETA: never mind about the jettison, I discovered I could do it with the guidance file.
 
Last edited:

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Lacking any response here, I went ahead and looked at the code in notepad++, discovered what I strongly believe to be the necessary changes that would not significantly mess anything else up, and edited the files accordingly.

Problem is, I don't have a handy installation of visual studio express since my last reinstall of Windows, and dread installing it again and making all the necessary settings for orbiter, furthermore I'm not sure of which version I should use on this particular project.

So if anyone here is interested in evaluating the changes and compiling it for testing, let me know and I'll send the files.

I've added 2 optional parameters for the ini file, isp_sl and pressure_sl.

input the isp_sl directly from whatever reference you have in m/s, and if it is for a planet other than earth, input also the pressure_sl for ground level pressure on that planet. Otherwise it will default to earth sea level pressure.

And use the standard ms method of thrust, fuel mass and burn time using the vacuum specifications. rather than adjusting the thrust to match total impulse as seems to be done normally.

It seems like it could possibly effect the guidance routines (if used), but not to any appreciable extant. It will also effect the burn time remaining early in the flight, but so do throttle adjustments and g limits.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
I usually reply almost in realtime but I couldn't in the last couple of days. I'm still developing the module so I would be glad to view your proposed changes and include them in the final code, giving the isp and pressure parameters as optional. Of course you'll have full credit in documentation for it.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
let me know how to get them to you and I'll send them, I've bracketed and used my user name in the comment brackets to make the changes and additions easy to find.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
wasn't sure I could do this here, but here's the files zipped up as an attachment.

ETA: use the next post attachment
 

Attachments

  • Multistage2015.zip
    36 KB · Views: 3
Last edited:

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
not sure the header file had the comment brackets in the previous attachment so here it is updated with all the changes.
 

Attachments

  • Multistage2015.zip
    37 KB · Views: 1

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
rats, I just found a pretty big error, in the default section when no isp_sl is specified, stage[currentStage].isp0 should be set to 0, not to stage[currentStage].isp as I had it. In fact, that section can probably be removed entirely, since it depends on isp0 being 0 to start with.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
I removed the superfluous and wrong section and changed the names of the stage parameters to be more in line with the API's convention.
 

Attachments

  • Multistage2015.zip
    37.1 KB · Views: 2

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
let me know how to get them to you and I'll send them, I've bracketed and used my user name in the comment brackets to make the changes and additions easy to find.

That's a good question. Fred18, do we have your permission to post large parts of your code here for the same addon (Multistage2015) for the sake of discussion or contribution? And what about binaries? Would it be OK to post a Multistage2015.dll here e.g. to give rcraig something to test his extensions with? Your release policy is a bit vague on that.

---------- Post added at 12:36 ---------- Previous post was at 10:46 ----------

rcraig42, your patch is not compiling:

VS compiler said:
error C2039: 'p0' : is not a member of 'STAGE'

pointing to here:

Code:
//added by rcraig42 to handle ispref in ini but no pressure, to default to earth -------------------------

 if(stage[currentStage].ispref > 0 && stage[currentStage].p0==0){
        stage[currentStage].pref=101400.0;
    }

//-------------------------------------------------------------------------------------------------------
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
oops, forgot to change the name of that one, fixed in a jiffy
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
i always seem to miss one when I decide to change something's name.

Edited to also change the names in the comments in parser and the header file to make it less confusing.
 

Attachments

  • Multistage2015.zip
    37.1 KB · Views: 2
Last edited:

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
I decided to check how well Martin's formula for adjusting the thrust works plugging in the published vacuum thrust and isp, and sea level isp for the Atlas V CBC. and the derived Sea Level thrust came out within 0.019% of the published value.

I think that qualifies as "as realistic as possible" :)

The main other things that would throw it off are the drag and density gradient.

btw what version of vs are you using Face?
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
btw what version of vs are you using Face?

Since there is no solution or project file in the code distribution, I've just used the version I used to make addons for Orbiter 2010P1: Visual Studio 2008 Development edition.

Your patch compiles now, BTW. I can send you binaries in a private message, if you want. However, since the source is suffering from a severe form of "non-initialitis", I can't give you a debug build just now, only a release build.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Since there is no solution or project file in the code distribution, I've just used the version I used to make addons for Orbiter 2010P1: Visual Studio 2008 Development edition.

Your patch compiles now, BTW. I can send you binaries in a private message, if you want. However, since the source is suffering from a severe form of "non-initialitis", I can't give you a debug build just now, only a release build.

Thanks, I think I'll try to find a DL of that version first. I tried loading it up into 2015, and got a red flag on every instance of a certain call that the IDE didn't like. I ran into the same issue a year or two ago when I attempted to modify the Velcro code (couldn't even figure out where to start with that one), seems that a lot of things that are acceptable with the older versions of VS are no longer acceptable with the newer versions.

And it wasn't a missing dependency, it was a name the IDE recognized, it was just being called in a manner the IDE didn't like.



Just for a bit of background, much of C++ still pretty much mystifies me, I learned programming over 35 years ago with BASIC and FORTRAN, then stepped away from it for 15 years, when I got Visual BASIC in the early to Mid 90's I was pretty lost in it. But muddled through to make some small but handy business apps. My biggest accomplishment with C++ was about 10 years ago making the Vectored thrust and ascent autopilot for the Shuttle, which I believe is still in use in the Shuttle Fleet add on, but not working nearly as well as it did in Orbiter 2006. It was smooth silk through the combination Pitch/yaw/roll maneuver back when I made it. Now it's all wonky. No clue how much is Orbiter Version, how much is computer performance, or how much is code tinkering though.


Long story short, I can add/modify code to an existing project (providing I can figure out what I need to of the existing code, which in this case, was pretty easy), but making a Vessel DLL of my own is pretty much out of my skill set.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
Thanks, I think I'll try to find a DL of that version first.

Well, I'm not sure if you will find it for free (sans warez, of course). I have it from my MSDN account, and it doesn't look like it is freeware already.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Well, I'm not sure if you will find it for free (sans warez, of course). I have it from my MSDN account, and it doesn't look like it is freeware already.

I didn't mean the development part of that version, just the 2008, I got the express version.

BUT, this is the other thing that bothers the hell out of me with C++, all the dependencies and how to get them linked. I'm getting about 300 unresolved external symbol errors, mostly math functions.

I've got the folders set up for Include under c/c++ general in properties/configuration (Orbitersdk\include, and windowsSDK/include)

I've got the folders set up for Libraries under Linker - General, again the lib directories in orbiterSDK and WindowsSDK

There are some other setting or settings that I'm missing, but I don't know what they are.

---------- Post added at 08:07 PM ---------- Previous post was at 07:24 PM ----------

resolved, found the video describing how to set up that version of VS for Orbiter and got the right settings.

compiles with a bunch of warnings, but no errors
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
BUT, this is the other thing that bothers the hell out of me with C++, all the dependencies and how to get them linked. I'm getting about 300 unresolved external symbol errors, mostly math functions.

Just as with my offer to send you the binaries in a private message, I can do so with the solution and project files, too. Be aware that you'll have to have OS4 installed, though.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Just as with my offer to send you the binaries in a private message, I can do so with the solution and project files, too. Be aware that you'll have to have OS4 installed, though.

that's okay, I got the right settings and it compiles..... just with the headaches I wanted to avoid LOL

And the dll with the changes works, except that it broke the multistage2015 MFD for some reason (even when I accidentally compiled the original files), maybe I need to recompile it too, or just wait for the official release.

I had to use DV Tools to monitor the thrust (the HUD always shows the max Vacuum thrust, regardless of what the engine is actually doing), and it sure enough had the expected values.

Still hitting Mach 1 and Max Q a few seconds early, but it is a lot closer than it was before. And I don't know if it's drag or atmospheric model making the difference.
 

boogabooga

Bug Crusher
Joined
Apr 16, 2011
Messages
2,999
Reaction score
1
Points
0
Still hitting Mach 1 and Max Q a few seconds early,

Are you talking about Atlas V?

IIRC, they actually throttle back for max Q, thus they hit later than you would expect from full thrust curve alone.

Plus, they may use a different gravity turn, etc.
 
Last edited:
Top