SDK Question Is there a tutorial to help me better understand the Orbiter operational environment?

Pithecanthropu

New member
Joined
Jan 23, 2009
Messages
31
Reaction score
0
Points
0
I'm really trying to get Rob Conley's V2 code to compile for various reasons. First, I can't run any of the V2 scenarios and I'd like to run down the cause. (They all crash on load.) Two, I live for this stuff. I have always been fascinated with the space program, and although not an official rocket scientist by any stretch, learned enough over the years about spaceflight to understand intuitively how to reach and adjust an orbit. Third, I would like to understand this architecture because I think I could apply it to another project.

Although I am only somewhat familiar with C++, I do understand OOD/P in principle, and have written non-trivial applications in C# and Java. I also have many years of experience in 3GLs. I don't need a tutorial to explain what a C++ program looks like, but I do need to learn which component does what in a Visual Studio C++ project. I need to know which file in ..\OrbiterSDK\Samples\V2\ I should open as the top level file, and what else I need to open to make it compile and build. I need to know exactly where in the configuration menus I should specify the include and lib directories, etc. And almost as important, it would be great if there was a way for me to verify that my installation of the Windows SDK platform is correct.

I guess I could sum it up by saying I know what the tools are supposed to do, but I don't know how they work together. Referring again to the ..\V2\ directory, there are several "V2" files that look like either project or solution files. There is a *.vcproj file that, when accessed, issues a warning that messing around with it could damage my system. I have not been brave enough to proceed

In my C# classes, we had to combine multiple projects into a single solution, but that process is quite straightforward. Here it seems to be much more complex. If you open the wrong project file, standard items like iostream and fstream turn up missing and you get compiler errors.
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
I'd start here:
http://www.orbiterwiki.org/wiki/Free_Compiler_Setup

Work with the ShuttlePB code first. It is quite simple, which will make tracking down issues easier. And the other coders on this forum know it, so it makes getting help easier.

You can have multiple projects in one solution, or one project to a solution. That depends largely on what you are coding and how you want to organise the project. Orbiter does not care. Most solutions I have seen for Orbiter (including most of my own) only have one project in them.

The V2 project is quite old, so you may have some issues compiling it against the current SDK because some of the API calls and callback functions may no longer be supported.
 

Pithecanthropu

New member
Joined
Jan 23, 2009
Messages
31
Reaction score
0
Points
0
I'd start here:
http://www.orbiterwiki.org/wiki/Free_Compiler_Setup

Work with the ShuttlePB code first. It is quite simple, which will make tracking down issues easier. And the other coders on this forum know it, so it makes getting help easier.
Thanks for the tip, I'll try that.
The V2 project is quite old, so you may have some issues compiling it against the current SDK because some of the API calls and callback functions may no longer be supported.
That could be why it isn't working for me. This computer is running a 64-bit version of Vista. Although AFAIK Mercury and Apollo, as far as I've seen, work fine. I wonder if all of Rob Conley's sims use multistage.dll, because that was where I ran into a problem with an ambiguous call to acos. Or it could have just been my screwed-up workspace.
 

Pithecanthropu

New member
Joined
Jan 23, 2009
Messages
31
Reaction score
0
Points
0
I'd start here:
http://www.orbiterwiki.org/wiki/Free_Compiler_Setup

Work with the ShuttlePB code first. It is quite simple, which will make tracking down issues easier. And the other coders on this forum know it, so it makes getting help easier.

I've started with this, and it seems to be helping. Thanks for the link.

Once I do get this working in C++, is there any reason I couldn't rewrite it in C#? For the outside project I mentioned, I would rather use mainly C#.
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
Once I do get this working in C++, is there any reason I couldn't rewrite it in C#? For the outside project I mentioned, I would rather use mainly C#.
I don't know much about C#, so I'm not really qualified to answer. That said, if it is for an outside project I expect you could do anything you like, subject to any licence restrictions that may come with the code (its definitely worth checking those).
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
Once I do get this working in C++, is there any reason I couldn't rewrite it in C#? For the outside project I mentioned, I would rather use mainly C#.
There was a C# interop package floating around somewhere, I think. I think Face is doing OMP in C#, so you may want to contact him.

But before you do that, you should look into using C++ instead. For real-time applications, you don't want to be marshalling everything back and forth between managed and unmanaged.

I also find C++ to be a far more powerful language. C# is too limited, IMHO.
 

Pithecanthropu

New member
Joined
Jan 23, 2009
Messages
31
Reaction score
0
Points
0
There was a C# interop package floating around somewhere, I think. I think Face is doing OMP in C#, so you may want to contact him.

But before you do that, you should look into using C++ instead. For real-time applications, you don't want to be marshalling everything back and forth between managed and unmanaged.

I also find C++ to be a far more powerful language. C# is too limited, IMHO.
C++ clearly demands more of the programmer, and it's tough going back to if you've been doing C#.

When I first got an early version of VC++, many years ago (it still came on A-drive disks), I worked through a tutorial that came with it in which you created a drawing/scribbling/handwriting interface. I was then able to enhance that to allow step by step rollback all the way to the beginning. I've hardly touched it since then, but I figure if I was able to do that then, I should be able to get back in the saddle now. On the other hand, my outside project isn't realtime, at least not in the same sense as an application like Orbiter which deals with aviation and spaceflight. Nor is it a batch process either, of course, but some latency is acceptable.
 
Top