OHM Falcon9 for Orbiter2016

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Hi Barry,
well, my Dragon add-on works on a very vessel-specific energy-management algorithm for the reentry. It uses a look-up table of energy vs. range and makes the flightpath shallower or steeper accordingly. I don't know if this is how the old AFCS used to work? You could do the same for the Shuttle or X37B but you need to "record" a "nominal" reentry for it, and build that in to the module. Making a "generic" reentry/landing module would be a whole different can of worms ;-)
Cheers,
Brian
 

barrygolden

Well-known member
Joined
Nov 3, 2009
Messages
943
Reaction score
294
Points
78
Location
North of Houston
with the upcoming Falcon/X37 B might be good to have a landing scenario. your Dragon deorbit and entry with the rcs and chutes really looks and works super.
a little note if your doing crs12 you might tweek the drogue chutes covers a little where they pop off super job.
 

ZacharyS41

Donator
Donator
Joined
Sep 9, 2013
Messages
130
Reaction score
11
Points
33
Location
Roanoke
Website
www.zachsellinger.com
BrianJ, it seems to me that changing the parameters in the .cpp files is harder than I thought.

Was I only supposed to change the numbers in the "Some Vessel Parameters" section or was there more than that?
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Hi Barry,
you might tweek the drogue chutes covers a little where they pop off
In what way? Please elucidate :)

@dropsofjupiter34
A couple of things that might help:
The entire Falcon9 vessel is controlled by the f9_v12.dll. At stage separation, the 1st stage is spawned as a new vessel controlled by f9_v12_stg1.dll, the main vessel reconfigures to 2nd stage parameters.

To compile the main vessel f9_v12.dll, you need:
f9_v12_stg2.cpp
f9_v12_stg2.rc
DlgCtrl.lib
gcAPI.lib
OrbiterSoundSDK40.lib

For the 1st stage f9_v12_stg1.dll, you need
f9_v12_stg1.cpp

So, to change the mass/thrust/etc. of the main vessel (1st and 2nd stages "on the way up") you need to change the parameters at the top of f9_v12_stg2.cpp.

To change the 1st stage ("on the way down") modify f9_v12_stg1.cpp

Hope this helps.
Good luck! The code is a bit of a mess, I know!
Brian
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
What version of VS did you use? I'm getting a bunch of unrecognized symbols with VS 2017 Express. No missing includes or libraries though.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
I use MS VC++ 2010 Express - guess I'm a bit out of date!
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
I had a hunch and found and dl-ed a copy of 2010... got none of the slew of warnings I had with 2017, however, still the same errors.... here they are:

Code:
1>f9_v12_stg2.obj : error LNK2019: unresolved external symbol "bool __cdecl gcEnabled(void)" (?gcEnabled@@YA_NXZ) referenced in function "public: virtual void __thiscall f9_v12_stg2::clbkSetClassCaps(void *)" (?clbkSetClassCaps@f9_v12_stg2@@UAEXPAX@Z)
1>f9_v12_stg2.obj : error LNK2019: unresolved external symbol "bool __cdecl gcInitialize(void)" (?gcInitialize@@YA_NXZ) referenced in function "public: virtual void __thiscall f9_v12_stg2::clbkSetClassCaps(void *)" (?clbkSetClassCaps@f9_v12_stg2@@UAEXPAX@Z)
1>f9_v12_stg2.obj : error LNK2019: unresolved external symbol "void __cdecl oapiRegisterCustomControls(struct HINSTANCE__ *)" (?oapiRegisterCustomControls@@YAXPAUHINSTANCE__@@@Z) referenced in function _InitModule
1>f9_v12_stg2.obj : error LNK2019: unresolved external symbol "void __cdecl oapiUnregisterCustomControls(struct HINSTANCE__ *)" (?oapiUnregisterCustomControls@@YAXPAUHINSTANCE__@@@Z) referenced in function _ExitModule
1>c:\Orbiter 2016\Modules\f9_v12.dll : fatal error LNK1120: 4 unresolved externals



There is a real good chance I am doing something wrong, I'm like a newbie to setting up VS for orbiter every 3 to 5 years when I decide to do something with it for orbiter.

This time I followed the directions I found in another post and made a new empty project, copied the property sheets from \resources, changed the orbiterroot macro to my installation folder, application type to dll, added \OrbiterSDK\include to the include directories, and added \OrbiterSDK\lib to the library directories, copied the OrbiterSoundsdk files to the \include and \lib folders, and your files to the project folder.....

What might I have missed?


(I modified the Commercial Satellites Direct TV satellite to match the specs I could find for the IntelSat 35e Satellite and added an attachment point, converted the sc3 to dll. Then edited the 6K to GTO scenario to use it and change the date. Then duplicated the GTO orbit that they had achieved, with over 500 m/s of dV remaining in the second stage. They said they burned to depletion to achieve that. I noticed the ISP of the second stage was different than what I found on WIKIpedia, and I think the 1st stage may be too light. It's usually a lot harder to match r/l performance than it was for me this time.)
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Hi,
1)have you installed the D3D9 package (including the sdk files)?
2)have you added gcAPI.lib and DlgCtrl.lib to your project?
I'm hopeless at compiler set up,not a clue really - but the errors relate to those two lib's.
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Hi,
1)have you installed the D3D9 package (including the sdk files)?
2)have you added gcAPI.lib and DlgCtrl.lib to your project?
I'm hopeless at compiler set up,not a clue really - but the errors relate to those two lib's.

1) not sure about the SDK files, I just did the one download and unzipped into orbiter, activated the module in launchpad and it works.

2) They are both in my OrbiterSDK\lib folder and I pointed to that folder in the project properties. Should I copy them to my project folder as well? And the corresponding h fils are in OrbiterSDK\include as well. and it is pointed to in the project properties.

:\
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Hi,
I have to add DlgCtrl.lib, gcAPI.lib, etc. to my project "External Dependencies".
Here's a screen shot...
compiler1.jpg

DlgCtrl.lib, gcAPI.lib, orbiter.lib, Orbitersdk.lib are in my Orbiter/Orbitersdk/lib/ folder.

OrbiterSoundSDK40.lib, f9_v12_stg2.cpp, f9_v12_stg2.rc (together with f9_v12_stg2_resource.h, OrbiterSoundSDK40.h) are in their own Orbiter/Orbitersdk/Samples/Falcon9 for Orbiter2016/ folder.

Any help?
Brian
 

rcraig42

New member
Joined
Jan 23, 2012
Messages
70
Reaction score
0
Points
0
Yes that helped, but only that it got me looking in the right places to figure it out, it turned out I had to add them in properties - linker - Input - Additional dependencies.

The library files still don't show up in external dependencies, but it does compile without errors now.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Update 170811 on OH:
Scenarios include "CONTEXT SpaceX" line for compatibility with "LC39A SpaceX" surface base add-on.
Better 1st Stage Re-entry burn algorithm.
Control panel inc. liftoff timer/clock, estimation of ASDS position for stage recovery.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Update 170913 on OH:
Modified estimation of ASDS location for EDL-Only flight profile.
Modified ASDS locations in EDL-Only flight scenarios.
 

fatcat

Member
Joined
May 21, 2008
Messages
110
Reaction score
7
Points
18
Hi Brian,

If I am launching manually, how do i jettison the 1st stage and ignite the second stage? Is that possible.
Thanks,
fatcat:thumbup:

I have tried the jettison 1st stage from the launch control, without any luck.
 
Last edited:

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Doh! Sorry about that!

Update 170925 on OH:
Manual 1st stage jettison re-instated (keypress N or control panel)
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
BrianJ, the link to the recommended addon in the first post is broken (there's an extra-space before the "=7090" part).
I guess you should update the OH description.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
BrianJ, the link to the recommended addon in the first post is broken (there's an extra-space before the "=7090" part).
I guess you should update the OH description.
Thanks. Should be fixed now.
 

fatcat

Member
Joined
May 21, 2008
Messages
110
Reaction score
7
Points
18
Doh! Sorry about that!

Update 170925 on OH:
Manual 1st stage jettison re-instated (keypress N or control panel)

Now that was fast. Even updated the documentation :tiphat:

---------- Post added at 10:10 AM ---------- Previous post was at 09:05 AM ----------

Hello, can anyone help me? I try to guide the falcon 9 in manual mode, but when I press the J key, it releases the load and not the first stage.

Can the first and second stage be separated in manual mode?

Brian has it working well. Download the latest update.
First stage can be jettisoned either via control panel (K) or keypad 'N". (see his documentation)
Then hit the thrusters to propel the second stage.
Fairing can be jettisoned manually either via control panel (K) or keypad 'J', for launches that have a fairing (non-Dragon).

Don't mean to sound authoritative, just acknowledging Brian's great work.
 
Last edited:

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
I can't keep up with SpaceX! Think I will probably have to go straight to Block5 specs. Info is sketchy (as ever) and mostly from occasional comments at presentations. I've been sidetracked by other projects and still need to try and get the FalconHeavy updated before it flies.
Cheers,
Brian
 
Top