Orbiter-Forum  

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

Addon Requests If you have a request for a new addon or want to know where to find a specific addon, ask it here!

Reply
 
Thread Tools
Old 09-15-2018, 09:04 PM   #151
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Oh. so more like this:


I might add cross hairs.



Not sure about the clipping though

So on the OBSS maybe when I attach I need to be rotated? To grab an item I have distance only should I have must have the correct angle also?
gattispilot is online now   Reply With Quote
Old 09-15-2018, 09:10 PM   #152
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by gattispilot View Post
 Oh. so more like this:


I might add cross hairs.



Not sure about the clipping though

So on the OBSS maybe when I attach I need to be rotated? To grab an item I have distance only should I have must have the correct angle also?
Yes, you need to have the EE rotated so that the pin of the alignment aid looks like a 2D white dot inside the center circle. If you can see the black shaft, you're not aligned. This screenshot shows a proper alignment: https://www.dropbox.com/s/wvrbqj9we1...igned.jpg?dl=0
DaveS is offline   Reply With Quote
Old 09-15-2018, 09:34 PM   #153
Donamy
Beta Tester


Default

Lining up on the Dragon grapple fixture with the Canadarm2.

Using the EE camera and the boom camera.
Attached Thumbnails
10meters.jpg   boomcam.jpg  
Donamy is offline   Reply With Quote
Old 09-18-2018, 12:28 AM   #154
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Ok. Looking at the code of SSU and SSRMS for deteremining attachment status. On the Atlantis is was just a distance factor

---------- Post added at 05:20 PM ---------- Previous post was at 04:56 PM ----------

Code:
if (cameraView == ACTIVE_LEE) {
		// draw crosshairs
		// grapple target pin has diameter of 0.375 inches and is 4 inches long
		const double GRAPPLE_PIN_RADIUS = (0.5*0.375 / 12.0) / MPS2FPS;
		const double DIST_TO_PIN = (LEE_POS.z - LEE2_CAM_POS.z) - (4.0 / 12.0) / MPS2FPS; // distance from camera to grapple target pin
		int pinSize = round(hps->Scale*DEG*atan(GRAPPLE_PIN_RADIUS / DIST_TO_PIN)); // angular size of grapple target pin when EE is aligned with grapple fixture
		skp->Line(hps->CX - pinSize, hps->CY, hps->CX - pinSize - hps->Markersize, hps->CY);
		skp->Line(hps->CX + pinSize, hps->CY, hps->CX + pinSize + hps->Markersize, hps->CY);
		skp->Line(hps->CX, hps->CY - pinSize, hps->CX, hps->CY - pinSize - hps->Markersize);
		skp->Line(hps->CX, hps->CY + pinSize, hps->CX, hps->CY + pinSize + hps->Markersize);
But not sure what MP2FPS is declared

---------- Post added 09-16-18 at 08:20 AM ---------- Previous post was 09-15-18 at 05:20 PM ----------

So slowly adding rms code from SSU. But not sure where this is defined:
Code:
	SaveAnimation(pRMS_ep_anim);
There are several of the same command but with different animations

---------- Post added at 02:23 PM ---------- Previous post was at 08:20 AM ----------

So not sure which way to go. Looking at the SSU code I assume these are values from a panel

Code:
DiscInPort JointSelect[6], DirectDrivePlus, DirectDriveMinus;
	DiscInPort RHCInput[3], THCInput[3];
	DiscInPort RMSMode[12];
	DiscInPort RMSCoarseRateCMD;

I would use the SSRMS code since it is uses a window. But it has a Shoulder roll which except the MPM the rms doesn't have one.

---------- Post added at 03:39 PM ---------- Previous post was at 02:23 PM ----------

So I am trying to figure this external reference:
Code:
Error	59	error LNK2001: unresolved external symbol "union VECTOR3 __cdecl RotateVector(union VECTOR3 const &,double,union VECTOR3 const &)" (?RotateVector@@YA?ATVECTOR3@@ABT1@N0@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	SPACESHUTTLE2016RMS2
This is the code that sets it off:
Code:
void Atlantis::CalculateVectors()
{
	
	// work forward through joints and update vectors
	arm_ee_dir = _V(1, 0, 0);
	arm_ee_rot = RotateVectorX(_V(0, 0, 1), -joint_angle[SHOULDER_ROLL]); // should probably be -joint_angle[SR]
	//arm_ee_rot = _V(0, 0, 1);
	arm_ee_pos = _V(SR_SY_DIST, 0, 0) + arm_ee_rot*SY_SP_VERT_DIST;
	// handle SY joint; get new direction, than translate EE pos to compensate for horizontal offset between booms
	arm_ee_dir = RotateVector(arm_ee_rot, RAD*joint_angle[SHOULDER_YAW], arm_ee_dir);
	VECTOR3 rot_cross_dir = crossp(arm_ee_rot, arm_ee_dir); // pitch joints rotate around this vector
	arm_ee_pos -= rot_cross_dir*LEE_OFFSET;
	
	// handle 3 pitch joints
	arm_ee_dir = RotateVector(rot_cross_dir, RAD*joint_angle[SHOULDER_PITCH], arm_ee_dir);
	arm_ee_pos += arm_ee_dir*SP_EP_DIST;
	arm_ee_dir = RotateVector(rot_cross_dir, RAD*joint_angle[ELBOW_PITCH], arm_ee_dir);
	arm_ee_pos += arm_ee_dir*EP_WP_DIST;
	arm_ee_dir = RotateVector(rot_cross_dir, RAD*joint_angle[WRIST_PITCH], arm_ee_dir);
	arm_ee_rot = RotateVector(rot_cross_dir, RAD*(joint_angle[SHOULDER_PITCH] + joint_angle[ELBOW_PITCH] + joint_angle[WRIST_PITCH]), arm_ee_rot);
	arm_ee_pos -= arm_ee_rot*WP_WY_DIST;
	
	// wrist yaw
	arm_ee_dir = RotateVector(arm_ee_rot, RAD*joint_angle[WRIST_YAW], arm_ee_dir);
	arm_ee_pos += arm_ee_dir*WY_EE_DIST;
	// wrist roll
	arm_ee_rot = RotateVector(arm_ee_dir, RAD*joint_angle[WRIST_ROLL], arm_ee_rot);

	VECTOR3 old_arm_ee_pos = arm_tip[0] - SR_JOINT;
	old_arm_ee_pos = _V(old_arm_ee_pos.z, old_arm_ee_pos.x, -old_arm_ee_pos.y);
	
}
I believe it is in UltraMath.
And I have it included:
Code:
#define STRICT 1
#define ORBITER_MODULE
#include "Atlantis.h"
#include "PlBayOp.h"
//#include "AscentAP.h"
#include "DlgCtrl.h"
#include "meshres.h"
#include "meshresods.h"
#include "RMS2meshres.h"
#include "meshres_vc_hi.h"
#include "resource.h"
#include <stdio.h>
#include <fstream>
#include <UltraMath.h>


---------- Post added at 03:56 PM ---------- Previous post was at 03:39 PM ----------

More not sure it is seeing them:
Code:
Error	63	error LNK2001: unresolved external symbol "public: void __thiscall Atlantis::RotateVector(union VECTOR3 const &,union VECTOR3 const &,union VECTOR3 &)" (?RotateVector@Atlantis@@QAEXABTVECTOR3@@0AAT2@@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	SPACESHUTTLE2016RMS2
Error	59	error LNK2001: unresolved external symbol "public: void __thiscall Atlantis::GetRotMatrixZ(double,union MATRIX3 &)" (?GetRotMatrixZ@Atlantis@@QAEXNAATMATRIX3@@@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	SPACESHUTTLE2016RMS2
Error	60	error LNK2001: unresolved external symbol "public: void __thiscall Atlantis::GetRotMatrixY(double,union MATRIX3 &)" (?GetRotMatrixY@Atlantis@@QAEXNAATMATRIX3@@@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	SPACESHUTTLE2016RMS2
Error	61	error LNK2001: unresolved external symbol "public: void __thiscall Atlantis::GetRotMatrixX(double,union MATRIX3 &)" (?GetRotMatrixX@Atlantis@@QAEXNAATMATRIX3@@@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	SPACESHUTTLE2016RMS2
Error	62	error LNK2001: unresolved external symbol "public: union VECTOR3 __thiscall Atlantis::RotateVector(union VECTOR3 const &,double,union VECTOR3 const &)" (?RotateVector@Atlantis@@QAE?ATVECTOR3@@ABT2@N0@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	SPACESHUTTLE2016RMS2


---------- Post added at 07:24 PM ---------- Previous post was at 03:56 PM ----------

So I figure my links are off somewhere. I redid them to this. But now get this:
Error 3 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1800' in Atlantis.obj C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) SPACESHUTTLE2016RMS2
Error 4 error LNK1319: 1 mismatches detected C:\Orbiter2016\Orbitersdk\Modules\SPACESHUTTLE2016 RMS2.dll 1 1 SPACESHUTTLE2016RMS2

Code:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="Atlantis.cpp" />
    <ClCompile Include="Common.cpp" />
    <ClCompile Include="PlBayOp.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\include\UltraMath.h" />
    <ClInclude Include="..\Common\Dialog\Graph.h" />
    <ClInclude Include="..\Common\Dialog\TabDlg.h" />
    <ClInclude Include="Atlantis.h" />
    <ClInclude Include="Graph.h" />
    <ClInclude Include="meshres.h" />
    <ClInclude Include="meshresods.h" />
    <ClInclude Include="meshres_vc_hi.h" />
    <ClInclude Include="PlBayOp.h" />
    <ClInclude Include="resource.h" />
    <ClInclude Include="RMS2meshres.h" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="Atlantis.rc" />
  </ItemGroup>
  <ItemGroup>
    <Library Include="DlgCtrl.lib" />
  </ItemGroup>
  <ItemGroup>
    <Image Include="..\Bitmaps\tkbk_label.bmp" />
    <Image Include="down.ico" />
    <Image Include="ico00001.ico" />
    <Image Include="ico00002.ico" />
    <Image Include="ico00003.ico" />
    <Image Include="ico00004.ico" />
    <Image Include="icon1.ico" />
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectName>SPACESHUTTLE2016RMS2</ProjectName>
    <ProjectGuid>{1A57C099-C6AF-43A7-8899-83608A6FF011}</ProjectGuid>
    <RootNamespace>SPACESHUTTLERMS</RootNamespace>
    <Keyword>Win32Proj</Keyword>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
    <WholeProgramOptimization>true</WholeProgramOptimization>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <OutDir>..\..\..\Modules\</OutDir>
    <IntDir>$(Configuration)\</IntDir>
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <OutDir>..\..\..\Modules\SPACESHUTTLE2016RMS2.dll</OutDir>
    <IntDir>..\</IntDir>
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <Optimization>Disabled</Optimization>
      <AdditionalIncludeDirectories>C:\ORBITER2016\Orbitersdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;E3VIP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <MinimalRebuild>true</MinimalRebuild>
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
      <PrecompiledHeader />
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
    </ClCompile>
    <Link>
      <AdditionalDependencies>orbiter.lib;orbitersdk.lib;libUltra.lib;gdi32.lib;user32.lib</AdditionalDependencies>
      <OutputFile>..\..\Modules\Spaceshuttlerms2.dll</OutputFile>
      <AdditionalLibraryDirectories>..\lib;..\libUltra\lib</AdditionalLibraryDirectories>
      <IgnoreSpecificDefaultLibraries>libcmt;libcmtd</IgnoreSpecificDefaultLibraries>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <RandomizedBaseAddress>false</RandomizedBaseAddress>
      <DataExecutionPrevention>
      </DataExecutionPrevention>
      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <Optimization>MaxSpeed</Optimization>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <AdditionalIncludeDirectories>c:\orbiter2016\Orbitersdk\include;C:\Orbiter2016\Orbitersdk\include\libUltra;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;E3VIP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <PrecompiledHeader />
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    </ClCompile>
    <Link>
      <AdditionalDependencies>orbiter.lib;orbitersdk.lib;libUltra.lib;gdi32.lib;user32.lib</AdditionalDependencies>
      <OutputFile>..\..\Modules\SPACESHUTTLE2016RMS2.dll</OutputFile>
      <AdditionalLibraryDirectories>C:\Orbiter2016\Orbitersdk\lib;..\lib;..\libUltra\lib</AdditionalLibraryDirectories>
      <IgnoreSpecificDefaultLibraries>libcmt;libcmtd</IgnoreSpecificDefaultLibraries>
      <RandomizedBaseAddress>false</RandomizedBaseAddress>
      <DataExecutionPrevention>
      </DataExecutionPrevention>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>
I am using VS2013 professional It seem I maybe need an older UltraMAth or compile in a newer version?

---------- Post added at 08:14 PM ---------- Previous post was at 07:24 PM ----------

So I tried it in VS2017 Communtity and now get this:
Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in Atlantis.obj SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) 1

---------- Post added 09-17-18 at 06:01 AM ---------- Previous post was 09-16-18 at 08:14 PM ----------

sO IN VS2017 i GET THIS:
Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in Atlantis.obj SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) 1
IN VS2013 the same but value 1800.

---------- Post added at 07:28 PM ---------- Previous post was at 06:01 AM ----------

So I built libUltra in 2013:
Code:
1>------ Build started: Project: libUltra, Configuration: Release Win32 ------
1>  ValveManager.cpp
1>  libUltra_2013.vcxproj -> C:\Orbiter2016\Orbitersdk\samples\libUltra\./lib\libUltra.lib
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Then I tried to rebuild my solution in 2013:
Error 4 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1800' in Atlantis.obj C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) SPACESHUTTLE2016RMS2
Error 5 error LNK1319: 1 mismatches detected C:\Orbiter2016\Orbitersdk\Modules\SPACESHUTTLE2016 RMS2.dll 1 1 SPACESHUTTLE2016RMS2

Last edited by gattispilot; 09-17-2018 at 12:34 AM.
gattispilot is online now   Reply With Quote
Old 09-18-2018, 12:36 AM   #155
Donamy
Beta Tester


Default

I wish I could help you. I hope you solve it.
Donamy is offline   Reply With Quote
Thanked by:
Old 09-19-2018, 10:51 AM   #156
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So I am confused. I moved the SSU: libUltra files from the SSu folder into my Orbiter2016. Now I moved them into this folder:
C:\Orbiter2016\Orbitersdk\samples\libUltra\ and it built just fine in VS2013

But If I but the same files here:
C:\Orbiter2016\Orbitersdk\include and run the solution I get all sorts of errors but no missing links.

But this doesn't solve the using the wrong version error. Both used the same sdk set

moved the libUltra file here:C:\Orbiter2016\Orbitersdk and compiles fine
But doesn't solve wrong issue:

---------- Post added 09-19-18 at 05:51 AM ---------- Previous post was 09-18-18 at 01:06 PM ----------

At a lost not sure what I should do.

So I tried to compile in VS2017 and get the can't find the afxres.h

Severity Code Description Project File Line Suppression State
Error RC1015 cannot open include file 'afxres.h'. SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\Atlantis.rc 10



back in 2013 I get a new error:
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\SPACESHUTTLE2016 RMSSS\* CIL library *(* CIL module *) SPACESHUTTLE2016RMS2
Error 10 error LNK1169: one or more multiply defined symbols found C:\Orbiter2016\Orbitersdk\Modules\SPACESHUTTLE2016 RMS2.dll 1 1 SPACESHUTTLE2016RMS2

Last edited by gattispilot; 09-19-2018 at 01:05 AM.
gattispilot is online now   Reply With Quote
Old 09-19-2018, 04:11 PM   #157
turtle91
Orbinaut
Default

I re-compiled the default Shuttle a long time ago using Visual Studio Express, and got the same error about missing afxres.h:

Even without knowing what I am doing, I replaced "afxres.h" with "winres.h"...and all was fine.
Found an article here:

http://www.winprog.org/tutorial/errors.html

From the article:



Fatal error RC1015: cannot open include file 'afxres.h'.
Oddly enough, VC++ adds afxres.h to resource files even when you aren't using an MFC project, and yet the file may only be installed if you install MFC. This perticular file isn't actually required, so to fix the error you can edit the .rc file in notepad and replace both occurances of "afxres.h" with "winres.h" (note that there should be two of them, and you need to change both).
turtle91 is offline   Reply With Quote
Thanked by:
Old 09-19-2018, 09:44 PM   #158
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

SO I built libUltra and my solution using the same sdk in 2017 Community

But get these now:
Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in Atlantis.obj SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z) SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) 1
Error LNK1120 1 unresolved externals SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\Modules\SPACESHUTTLE2016 RMS2.dll 1

---------- Post added at 03:51 PM ---------- Previous post was at 03:36 PM ----------

So I my solution set at MT libUltra is set at MD.

Code:
Error	61	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
So if I set mine to MD then I get this error:
Code:
Error	66	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
Error	67	error LNK1169: one or more multiply defined symbols found	C:\Orbiter2016\Orbitersdk\Modules\SPACESHUTTLE2016RMS2.dll	SPACESHUTTLE2016RMS2
I also took out the LibUltra.lib in the include. So now it is just Orbitsdk/include

---------- Post added at 04:44 PM ---------- Previous post was at 03:51 PM ----------

So I am back to this externals. They are in the Ultramath which is included.

I put them in my Atlantis.h and not change.

This is the code that has them:
Code:
if (!Eq(THCInput, _V(0.0, 0.0, 0.0), 0.0001) || !Eq(RHCInput, _V(0.0, 0.0, 0.0))) {
			VECTOR3 EETrans, newDir, newRot;
			if (RefFrame == BASE_FRAME) {
				EETrans = THCInput;
				RotateVector(arm_ee_dir, _V(RHCInput.data[ROLL], RHCInput.data[PITCH], RHCInput.data[YAW]), newDir);
				RotateVector(arm_ee_rot, _V(RHCInput.data[ROLL], RHCInput.data[PITCH], RHCInput.data[YAW]), newRot);
			}
			else if (RefFrame == EE_FRAME) {
				//EETrans = _V(THCInput.x*arm_ee_dir.x, THCInput.y*arm_ee_dir.y, THCInput.z*arm_ee_dir.z);
				EETrans = arm_ee_dir*THCInput.x + arm_ee_rot*THCInput.z + crossp(arm_ee_rot, arm_ee_dir)*THCInput.y;
			}
		}
				/*
				VECTOR3 y_axis = crossp(arm_ee_rot, arm_ee_dir);
				MATRIX3 RotMatrix = _M(arm_ee_dir.x, y_axis.x, arm_ee_rot.x,
					arm_ee_dir.y, y_axis.y, arm_ee_rot.y,
					arm_ee_dir.z, y_axis.z, arm_ee_rot.z);
				//MATRIX3 RotMatrix = RotationMatrix(arm_ee_dir, , arm_ee_rot);
				MATRIX3 RotMatrixRoll, RotMatrixPitch, RotMatrixYaw;
				GetRotMatrixX(RHCInput.data[ROLL], RotMatrixRoll);
				GetRotMatrixY(RHCInput.data[PITCH], RotMatrixPitch);
				GetRotMatrixZ(RHCInput.data[YAW], RotMatrixYaw);
				RotMatrix = mul(RotMatrix, RotMatrixPitch);
				RotMatrix = mul(RotMatrix, RotMatrixYaw);
				RotMatrix = mul(RotMatrix, RotMatrixRoll);

				newDir = _V(RotMatrix.m11, RotMatrix.m21, RotMatrix.m31);
				newRot = _V(RotMatrix.m13, RotMatrix.m23, RotMatrix.m33);
			}
			MoveEE(arm_ee_pos + EETrans, newDir, newRot, simdt);
		}
		//if(!Eq(THCInput, _V(0.0, 0.0, 0.0), 0.01)) MoveEE(arm_ee_pos+RotateVectorZ(EETrans, joint_angle[SHOULDER_ROLL]), arm_ee_dir, arm_ee_rot);
gattispilot is online now   Reply With Quote
Thanked by:
Old 09-20-2018, 12:52 AM   #159
turtle91
Orbinaut
Default

Error LNK2038 mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in Atlantis.obj SPACESHUTTLE2016RMS2 C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016 RMSSS\libUltra.lib(UltraMath.obj) 1

Ok...I am not at expert, but did you (Unix-Speaking) a kind of "make clean" before tried to recompile ?
Or in other words (I really don't remember the "Windows-VS-Studio-function/button for a "make clean") to make sure, that you are not using obsoleted OBJ-files in your latest build ? ( value '1800' doesn't match value '1900' in Atlantis.obj )
turtle91 is offline   Reply With Quote
Old 09-20-2018, 09:48 PM   #160
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Yes. I did. I ran the libultra and shuttle solution on the same sdk and compiler. But sure where to check the version. Also the mt or md issue

---------- Post added 09-20-18 at 05:53 AM ---------- Previous post was 09-19-18 at 08:30 PM ----------

So on the external issue.
it is called here and defined in Ultramath.h
See the highlighted area shows the definition.


Code:
Error    60    error LNK2001: unresolved external symbol "void __cdecl RotateVector(union VECTOR3 const &,union VECTOR3 const &,union VECTOR3 &)" (?RotateVector@@YAXABTVECTOR3@@0AAT1@@Z)    C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj    1    1    SPACESHUTTLE2016RMS2
This is the code that is setting the errors:
Code:
RotateVector(arm_ee_dir, _V(RHCInput.data[ROLL], RHCInput.data[PITCH], RHCInput.data[YAW]), newDir);
                RotateVector(arm_ee_rot, _V(RHCInput.data[ROLL], RHCInput.data[PITCH], RHCInput.data[YAW]), newRot);
And in Ultramath:
Code:
VECTOR3 RotateVector(const VECTOR3 &Axis, double radAngle, const VECTOR3 &v);
/**
 * Rotates vector around specified Euler angles in XYZ order
 */
void RotateVector(const VECTOR3 &Initial, const VECTOR3 &Angles, VECTOR3 &Result);
/**
 * Returns Euler angles (in radians); Pitch=X axis, Yaw=Y axis, Roll=Z axis
  */



So if I comment those definitions out of Ultramath.h I get the same results.


So to me it means it may not be seeing Ultramath.h


I tried putting them in my Atlantis.H and the same result. So not sure how to fix

---------- Post added at 04:48 PM ---------- Previous post was at 05:53 AM ----------

So this line:
Code:
RotateVector(arm_ee_dir, _V(RHCInput.data[ROLL], RHCInput.data[PITCH], RHCInput.data[YAW]), newDir);
Give me this error:
Code:
Error	60	error LNK2001: unresolved external symbol "public: void __thiscall Atlantis::RotateVector(union VECTOR3 const &,union VECTOR3 const &,union VECTOR3 &)" (?RotateVector@Atlantis@@QAEXABTVECTOR3@@0AAT2@@Z)	C:\Orbiter2016\Orbitersdk\samples\SPACESHUTTLE2016RMSSS\Atlantis.obj	1	1	SPACESHUTTLE2016RMS2
So in my H:
Code:
VECTOR3 RotateVector(const VECTOR3 &Axis, double radAngle, const VECTOR3 &v);
	/**
	* Rotates vector around specified Euler angles in XYZ order
	*/
	void RotateVector(const VECTOR3 &Initial, const VECTOR3 &Angles, VECTOR3 &Result);
What am I missing?

Last edited by gattispilot; 09-20-2018 at 12:20 PM. Reason: update
gattispilot is online now   Reply With Quote
Old 09-20-2018, 10:12 PM   #161
kuddel
Donator
Default

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
kuddel is offline   Reply With Quote
Old 09-20-2018, 10:55 PM   #162
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

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:\orbi ter2016\Orbitersdk\include;%(AdditionalIncludeDire ctories)
and then in the linker part:
Additional Library directories
C:\Orbiter2016\Orbitersdk\libUltra\lib;c:\orbiter2 016\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
gattispilot is online now   Reply With Quote
Old 09-20-2018, 11:16 PM   #163
kuddel
Donator
Default

Quote:
Originally Posted by gattispilot View Post
 So Do I have it set up right?
So far: Yes

Quote:
Originally Posted by gattispilot View Post
 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 by kuddel; 09-20-2018 at 11:20 PM. Reason: typos fixed
kuddel is offline   Reply With Quote
Old 09-21-2018, 12:17 PM   #164
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

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/...crelease-doesn
gattispilot is online now   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Addons > Addon Requests


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:35 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.