Idea Shuttle Fleet recompile for Orbiter 2016

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
You have to look exactly what the error is telling you!
In this case you have to look exactly who was generating this error: It was the Linker, so you probably have not added (the Ultramath.lib ?) library to your project.

---------- Post added at 22:12 ---------- Previous post was at 22:11 ----------

In case you have the implementation sources of Ultramath (Ultramath.cpp) you should add that of course ;)
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
Thanks
I have this:
Code:
#include <UltraMath.h>

So I built the libUltra that has the Ultramath.cpp and .h

I have this set for additional Include directories:
C:\Orbiter2016\Orbitersdk\libUltra\include;c:\orbiter2016\Orbitersdk\include;%(AdditionalIncludeDirectories)
and then in the linker part:
Additional Library directories
C:\Orbiter2016\Orbitersdk\libUltra\lib;c:\orbiter2016\Orbitersdk\lib;%(AdditionalLibraryDirectories)
lastbuild log

Code:
TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
Release|Win32|C:\Orbiter2016\Orbitersdk\libUltra\|


So Do I have it set up right?

---------- Post added at 05:55 PM ---------- Previous post was at 05:48 PM ----------

So I fixed? a link to get the lib

But Now this:
Code:
Error	4	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Atlantis.obj	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
So Do I have it set up right?
So far: Yes :thumbup:

But Now this:
Code:
Error	4	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Atlantis.obj	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2
That is a nasty incompatibility between the different parts (Objects rsp. Libraries). Some have been build with other 'RuntimeLibrary' settings than others.
If you have all the sources, you should carefully set all the different projects to the same 'RuntimeLibrary' settings. If you only have headers and libs (or headers and object files) of one part, you might be out of luck.

This happens if for example libUltra.lib was compiled with one version of Visual Studio and you are trying to link it with a different Visual Studio...
...even happens when both parties used the same Visual Studio (VS2015 builds of Orbiter had this issue too...)

Unfortunately I am currently not able to present you a solution now, but you should try some different 'RuntimeLibrary' settings (static vs. dynamic, build vs. debug /MT vs. /MD, etc. pp.) in all the possible combinations. Sometimes this gets you running.

Good luck.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
Thanks.
Both are using the same compiler version

If I set the LibUltra and my solution to runtime MT
I get this error:
Code:
Error	9	error LNK2005: "double __cdecl linterp(double,double,double,double,double)" (?linterp@@YANNNNNN@Z) already defined in libUltra.lib(UltraMath.obj)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\* CIL library *(* CIL module *)	SPACESHUTTLE2016RMS2
if I put both to md then I get a lot of errors.

Where can you change the dynamic or static?

---------- Post added 09-21-18 at 07:17 AM ---------- Previous post was 09-20-18 at 06:38 PM ----------

So on this: Link2038. It states the run time setting need to be the same.
I think originally the libUltra was MD and mine MT
now both are the same MT

But now I get this:
Code:
Error	9	error LNK2005: "double __cdecl linterp(double,double,double,double,double)" (?linterp@@YANNNNNN@Z) already defined in libUltra.lib(UltraMath.obj)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\* CIL library *(* CIL module *)	SPACESHUTTLE2016RMS2

https://stackoverflow.com/questions/28887001/lnk2038-mismatch-detected-for-runtimelibrary-value-mt-staticrelease-doesn
 

barrygolden

Well-known member
Joined
Nov 3, 2009
Messages
949
Reaction score
298
Points
78
Location
North of Houston
gattis when you first started the 2016 shuttles the arm worked fine along the lines of Shuttle Fleet. It could use the speed up mode but it works fine As with the government they fix and fix stuff until its broken. One of the things that made SF so good was you didn't have to be a computer geek to use it.
I think with the orbiter nuts like me might not want to go back and use the Shuttles very much unless it has new payloads and updated ISS resupply missions.
the biggest think to do would be to get the AFS working for deorbit and landing.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,917
Reaction score
212
Points
138
Location
Cape
Nothing wrong with making it better than the Fleet. The RMS is too limiting in it's present version. IMHO
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
Well if I ever get this working then the rms will have more movement.

But after setting both to MT
I get this error:
Not sure how to fix
Code:
Error	9	error LNK2005: "double __cdecl linterp(double,double,double,double,double)" (?linterp@@YANNNNNN@Z) already defined in libUltra.lib(UltraMath.obj)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\* CIL library *(* CIL module *)	SPACESHUTTLE2016RMS2


---------- Post added at 05:26 PM ---------- Previous post was at 02:49 PM ----------

I looked at the SSu and both are set at /MD

So I did that and get 41 errors are are some of them:
Code:
Error	96	error LNK2001: unresolved external symbol _memcpy	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2
Error	72	error LNK2001: unresolved external symbol _atexit	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	1	1	SPACESHUTTLE2016RMS2
Error	73	error LNK2001: unresolved external symbol _atexit	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2
Error	74	error LNK2001: unresolved external symbol __purecall	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	1	1	SPACESHUTTLE2016RMS2
Error	75	error LNK2001: unresolved external symbol __purecall	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2
Error	95	error LNK2001: unresolved external symbol __libm_sse2_sqrt_precise	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2
Error	94	error LNK2001: unresolved external symbol __libm_sse2_sin_precise	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\libUltra.lib(UltraMath.obj)	SPACESHUTTLE2016RMS2

Error 101 error LNK1120: 29 unresolved externals C:\Orbiter2016\Modules\SPACESHUTTLE2016RMS.dll SPACESHUTTLE2016RMS2
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
So here is the latest shuttle stuff. I will need to add more scns and ships and Vandenberg.

Things I can fix if needed is the rms. Right now it only looks for distance not distance and angle. So I can change that.
Also the store/recall. I haven't been able to get that to work in the SF so not sure how it is suppose to work.

The big thing that I have NO clue how to add is AFC.

May need to tweak the flight pattern?

https://drive.google.com/open?id=1Ug3y2QJbgEQ9dBeg42-LxMc--JqLUUP1
 
Last edited:

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,917
Reaction score
212
Points
138
Location
Cape
The store and recall are the angle of the Arm joints. Each joint has a range of motion, and you are able to store them, then recall them at a later time. You can move the arm to a certain position, just by pressing the recall. The SRMS has six joints. The SSRMS has seven.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
So I am trying to do some work on the landing. SF had the chute deploy automatically. Not sure when it would deploy? Which the wheels touched?

So if it is when wheel touch is there a function that if landed then do this or check Alt if Alt is <.1? then deploy

It looks like SSU has
Code:
(airspeed <= CHUTE_DEPLOY_SPEED) && (airspeed > CHUTE_JETTISON_SPEED) && STS()->GroundContact())
then deploy.

Code:
const double CHUTE_DEPLOY_SPEED = 165.0/MPS2KTS;
// Speed at which chute is deployed (m/s)
Code:
const double CHUTE_JETTISON_SPEED = 60.0/MPS2KTS;
// Speed at which chute is jettisoned (m/s)

So if ground contact and airspeed is between 165 and 60 deploy
 
Last edited:

barrygolden

Well-known member
Joined
Nov 3, 2009
Messages
949
Reaction score
298
Points
78
Location
North of Houston
Yes Don your ISS with all the detail is super as well as SSU but I think too keep the Shuttle flying its going to take new payloads like the Star Wars stuff along with the unflown payloads and proposed missions
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
So on the chute I have:
Code:
double airspeed = GetAirspeed();
	double groundspeed = GetGroundspeed();

	if ((airspeed <= CHUTE_DEPLOY_SPEED) && (airspeed > CHUTE_JETTISON_SPEED) && GroundContact() && (DRAGCHUTEDEPLOYED ==0)) {
		SetMeshVisibilityMode(mesh_DRAGCHUTE, MESHVIS_ALWAYS);
		RevertDragchute();
	}

	if (airspeed < CHUTE_JETTISON_SPEED) ReleaseDragchute();


Code:
const double CHUTE_DEPLOY_SPEED = 165.0 / 1.94384;
// Speed at which chute is deployed (m/s)
const double CHUTE_JETTISON_SPEED = 60.0 / 1.94384;
// Speed at which chute is jettisoned (m/s)

So when the vessel makes ground contact and the speed <165 knots >60 the chute opens and when the airspeed gets to <60 the chute releases
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
So I am trying to get the chute to be made a vessel so that when released it doesn't follow the shuttle.
Code:
if ((airspeed < CHUTE_JETTISON_SPEED) &&  (DRAGCHUTE == 0)) ReleaseDragchute();
Code:
void Atlantis::ReleaseDragchute()
{
	SetMeshVisibilityMode(mesh_DRAGCHUTE, MESHVIS_NEVER);
	if (Shuttlechutereleased == 0){
	OBJHANDLE Shuttlechute;
	VESSELSTATUS2 vs;
	vs.version = 2;
	vs.flag = 0;
	GetStatusEx(&vs);
	VECTOR3 ofs = _V(0, -5.649, -11.656);
	VECTOR3 rofs, rvel = { vs.rvel.x, vs.rvel.y, vs.rvel.z };
	VECTOR3 vel = { 0, 0, 0 };
	Local2Rel(ofs, vs.rpos);
	GlobalRot(vel, rofs);
	vs.rvel.x = rvel.x + rofs.x;
	vs.rvel.y = rvel.y + rofs.y;
	vs.rvel.z = rvel.z + rofs.z;
	vs.vrot.x = 0.00;
	vs.status = 0;




	VESSEL *Shuttlechute_vessel;
	Shuttlechute = oapiCreateVesselEx("Shuttlechute", "Shuttle2016_Chute_released", &vs);
	Shuttlechute_vessel = oapiGetVesselInterface(Shuttlechute);
	Shuttlechutereleased = 1;

It works except the chute is orbiting the Earth.
Code:
Meshname = shuttlechutereleased
Mass = 10
Size = 10.0
;COG_OverGround = 1


; === Atmospheric flight model ===
;CW = 5 5 2 2.4
;CrossSections = 8 8 8
;RotResistance = 2.0 2.0 2.0

EnableFocus = TRUE
EnableXPDR = TRUE


I think what happens is it is created falls to the ground and then bounces into orbit?
Code:
Shuttlechute:Shuttle2016_Chute_released
  STATUS Orbiting Earth
  RPOS -33402938918.567 -12601523956.566 -20655074290.881
  RVEL -2164479149.7256 -816566947.1424 -1338429464.2508
  AROT -53.820 41.904 60.009
  VROT -1883.2677 1419.9461 -1369.6618
  AFCMODE 7
  NAVFREQ 0 0
  XPDR 0
END
 

Snax

Space Cowboy
Joined
Jun 20, 2018
Messages
214
Reaction score
151
Points
58
Location
Brussels
It is a very good job Gattispilot, I managed to get into orbit at 218x236km with the ET still having 36 seconds of fuel remaining. I manually cut the engines and jettisonned the tank. Also the controls during ascent are too sensitive, even with CTRL held down, I find that the rotations are too fast to be precise. also the shuttle is slightly drifting to the right during the ascent.

But overall, it's a very good start ! Wish you good luck !

gcQvn8s.jpg
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,728
Reaction score
2,692
Points
203
Location
Dallas, TX
Thanks. Not sure About the sensitive. this is what I have for the control surfaces.
Code:
void Atlantis::CreateAirfoils ()
{
	CreateAirfoil (LIFT_VERTICAL,   _V(0,0,-0.5), VLiftCoeff, 20, 270, 2.266);
	CreateAirfoil (LIFT_HORIZONTAL, _V(0,0,-4), HLiftCoeff, 20,  50, 1.5);

	CreateControlSurface (AIRCTRL_ELEVATOR, 5.0, 1.5, _V( 0, 0,  -15), AIRCTRL_AXIS_XPOS, anim_elev);
	CreateControlSurface (AIRCTRL_RUDDER,   2.0, 1.5, _V( 0, 3,  -16), AIRCTRL_AXIS_YPOS, anim_rudder);
	CreateControlSurface (AIRCTRL_AILERON,  3.0, 1.5, _V( 7,-0.5,-15), AIRCTRL_AXIS_XPOS, anim_raileron);
	CreateControlSurface (AIRCTRL_AILERON,  3.0, 1.5, _V(-7,-0.5,-15), AIRCTRL_AXIS_XNEG, anim_laileron);

	CreateVariableDragElement (&spdb_proc, 5, _V(0, 7.5, -14)); // speedbrake drag
	CreateVariableDragElement (&gear_proc, 2, _V(0,-3,0));      // landing gear drag
	CreateVariableDragElement (&rdoor_drag, 7, _V(2.9,0,10));   // right cargo door drag
	CreateVariableDragElement (&ldoor_drag, 7, _V(-2.9,0,10));  // right cargo door drag
}

Also I noticed I have the split tail rudder speed brake but there seem to be no brake in the Atlantis code either.?

One thing I need to change is this:
Code:
DYNPRESSURE = GetDynPressure();
	if (DYNPRESSURE < 478.803)//if dynamic pressue is >478.803 
	{
		EnableRCS(true);
		SetADCtrlMode(0);
	}
	else {
		EnableRCS(false);
		SetADCtrlMode(7);
	}

It turns rcs off and control surfaces on. But rather than Dyn pressure I might go with Atm. I notice on the ground the control surfaces don't change?
 

Sbb1413

Well-known member
Joined
Aug 14, 2018
Messages
948
Reaction score
373
Points
78
Location
India
Preferred Pronouns
he/his/him
I am working on the Shuttles on Orbiter 2016, by copying every stuff from Atlantis and renaming them (starting from Columbia) but the Shuttle remained unchanged!
 
Top