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 Vessel states and Staging

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

So now that we've got the basics of vessel states down it's time to nodel the actual staging.

But before we do, lets take a look at what exactly I've put in my vessel states...

Code:
// --------------------------------------------------------------
// Pre-Step processes
// --------------------------------------------------------------
void LM::clbkPreStep (double simt, double simdt, double mjd)
{
	// Update Vessel State
	SetEmptyMass
...
Hlynkacg's Avatar
Aspiring rocket scientist
Views 2903 Comments 0 Hlynkacg is offline
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 1832 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 1824 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 1429 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 2001 Comments 0 Hlynkacg is offline

All times are GMT. The time now is 04:42 AM.

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.