Orbiter-Forum  

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

Addon Development Developers post news, updates, & discussions here about your projects in development.

Reply
 
Thread Tools
Old 12-11-2017, 11:47 PM   #361
fred18
Addon Developer

Default

I'm sorry but I have zero in time in these days, so I'll be quick:

1) payload definitions in the cfg file are useless relevant to MS2015 (don't know if you are using some other code to read them)
2) in order to have a ms2015 vehicle there must be at least 1 stage, it's not possible to have just payloads. so define a stage_1 and then you can attach payload to it.
3) as far as I could see you're trying to modificate the ms2015 original code to make this, please be advised that the code is quite complicated and not well explained, I learned a lot since I did that code, so my best advise is to use it as it is and exploit it for what he has.

cheers
Fred
fred18 is offline   Reply With Quote
Thanked by:
Old 01-17-2018, 12:28 PM   #362
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So on our crawler. I have been able to get it to move and turn. But not sure how to get it to crab walk?
this is my right turn code:
Code:
if ((i3 > 0)&&(FORWARD==1))//RIGHT TURN
	{
		VESSELSTATUS2 vs2;
		memset(&vs2, 0, sizeof(vs2));
		vs2.version = 2;
		GetStatusEx(&vs2);

		double dheading = .01;
		//double d_hdg = AngSpeed*oapiGetSimStep();
		double d_hdg = dheading*oapiGetSimStep();
		vs2.surf_hdg += d_hdg;

		if (vs2.surf_hdg>2 * PI){ vs2.surf_hdg -= 2 * PI; }
and straight forward
Code:
if (FORWARD==1)
		{

			VESSELSTATUS2 vs2;
			memset(&vs2, 0, sizeof(vs2));
			vs2.version = 2;
			GetStatusEx(&vs2);

			double d_lat = (Speed*oapiGetSimStep()*cos(vs2.surf_hdg)) / each_deg;
			double d_lng = (Speed*oapiGetSimStep()*sin(vs2.surf_hdg)) / each_deg;
			vs2.surf_lat += d_lat*RAD* targetSpeed;
			vs2.surf_lng += d_lng*RAD* targetSpeed;
It will be open source. Not sure what to put in the heading . Using combination of Fred's and the SSu code
gattispilot is offline   Reply With Quote
Old 01-18-2018, 11:09 PM   #363
BrianJ
thing
Default

Quote:
Originally Posted by gattispilot View Post
  But not sure how to get it to crab walk?
Hi,
add or subtract PI/2 to your vs2.surf_hdg.
I think that will make it go crabwise.

Code:
if (FORWARD==1)
        {

            VESSELSTATUS2 vs2;
            memset(&vs2, 0, sizeof(vs2));
            vs2.version = 2;
            GetStatusEx(&vs2);


double crab_hdg = vs2.surf_hdg + (PI/2);

            double d_lat = (Speed*oapiGetSimStep()*cos(crab_hdg)) / each_deg;
            double d_lng = (Speed*oapiGetSimStep()*sin(crab_hdg)) / each_deg;
            vs2.surf_lat += d_lat*RAD* targetSpeed;
            vs2.surf_lng += d_lng*RAD* targetSpeed;

Last edited by BrianJ; 01-19-2018 at 12:42 AM.
BrianJ is offline   Reply With Quote
Thanked by:
Old 01-19-2018, 09:18 PM   #364
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So trying to determine the angle from the pad to the crawler.
Code:
OBJHANDLE pad_handle = oapiGetObjectByName("LP39_SLS");

	if (pad_handle != NULL && oapiIsVessel(pad_handle))
	{
		VECTOR3 rpos;
		GetRelativePos(pad_handle, rpos);
		distance = length(rpos);
		checkTouchdownPoints();
	}


	sprintf(oapiDebugString(), "rposX  %2.2f rposY  %2.2f rposZ  %2.2f",  rpos.x, rpos.y, rpos.z);
I can get the distance but I want to know the angles and then I set it to climb the hill or fall thru if not on the ramp
gattispilot is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Addons > Addon Development

Tags
em1, hlv, orion mpcv, sls


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 01:58 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.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.