Orbiter-Forum  

Go Back   Orbiter-Forum > Blogs
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Old

Coding a Lunar Lander from the ground up: (Custom Functions and Sub-routines)

Posted 01-21-2013 at 08:30 PM by Hlynkacg

[/COLOR]PART 8: Custom Functions and Sub-routines

This is a subject that often intimidates newbies but once you realise just how easy it is to do there really is no going back.

Thus far we have been overloading functions orbiter's core functions. These functions all existed in Orbiter prior to our calling them. Now it's time to start creating entirely new functions. We'll start with something easy.

Go to your class interface in your header file and add...
Hlynkacg's Avatar
Aspiring rocket scientist
Views 1810 Comments 0 Hlynkacg is offline
Old

Coding a Lunar Lander from the ground up: Part 8 (Resource and Scenario files)

Posted 01-21-2013 at 08:28 PM by Hlynkacg

I normally do this as well but for some reason I just wasn't thinking last night and...

For those of you who have been following along...

Please take a look at the complete Header and Source files I posted above and note the changes.

The first and most obvious change is that I've replaced the SuttlePB's physical parameters with a whole host of new ones that describe the Apollo Lunar Lander.

I then went into clbkSetClassCaps...
Hlynkacg's Avatar
Aspiring rocket scientist
Views 1805 Comments 0 Hlynkacg is offline
Old

Coding a Lunar Lander from the ground up: Parts 7 (Animation Cont.)

Posted 01-21-2013 at 08:25 PM by Hlynkacg

I had written a full update but then my browser crashed and ate it.



I don't feel like spending another hour rewriting the whole thing so this is going to be quick.

First off, I made a mistake in part 6 that may cause in part 7. When our animation is defined in the constructor "mesh_Ascent" is not attatched to anything and wont be until we call the "addmesh" function in clbkSetClassCaps. This will cause what we are about...
Hlynkacg's Avatar
Aspiring rocket scientist
Views 1409 Comments 0 Hlynkacg is offline
Old

Coding a Lunar Lander from the ground up: Parts 3 - 6 (Animation)

Posted 01-21-2013 at 08:23 PM by Hlynkacg

So now our ShuttlePB looks like a Lunar Lander...

I know I said that we'd talk about animations next, but as I was writing this I realised that even doing something comparatively simple like making the EVA Hatch open and close requires us to understand a bit about the way that orbiter controls individual vessels.

PART 3: Call Back Functions

Call Back functions are used by the Orbiter core to update a vessel's state within the simulation and notify it...
Hlynkacg's Avatar
Aspiring rocket scientist
Views 1983 Comments 0 Hlynkacg is offline
Old

Coding a Lunar Lander from the ground up (when you don't know how to code)

Posted 01-19-2013 at 04:33 AM by Hlynkacg
Updated 01-21-2013 at 08:21 PM by Hlynkacg

Authors Note:
I know little to nothing about c++ outside the bounds of Orbiter's API.

I'm writing this tutorial in the hopes that it will help other hobbiests, tinkerers, and budding addon developers avoid the stupid mistakes and general frustration I've subjected myself to.

Further More if you want the meshes and complete code used in this tutorial dowload my addon.

With that out of the way, Let's Begin...
...
Hlynkacg's Avatar
Aspiring rocket scientist
Views 4169 Comments 2 Hlynkacg is offline

All times are GMT. The time now is 09:17 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.