General Question Moving gear and touchdown points

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
10,548
Reaction score
4,373
Points
203
Location
Dallas, TX
I followed the code for the shuttleA
Code:
        SetTouchdownPoints (_V(0,-2.93+gear_proc*0.555,9), _V(-2,-2.93+gear_proc*0.555,-8), _V(2,-2.93+gear_proc*0.555,-8));

this is in :void ShuttleA::clbkPostCreation ()


here is my code:
Code:
SetTouchdownPoints (_V(0,-3.124+GEAR_proc*1.5,8.7), _V(-2,-3.124+GEAR_proc*1.5,-9.6), _V(2,-3.124+GEAR_proc*1.5,-9.6));

but it is in the :
void EAGLE3::clbkPostStep(double simt, double simdt, double mjd)


I get a slight vertical speed even when landed.

Not sure where it should go.

I do have this:
void EAGLE3::clbkPostCreation (void)

{
JohnSoundID=ConnectToOrbiterSoundDLL3(GetHandle());

SoundOptionOnOff3(JohnSoundID,PLAYMAINTHRUST,FALSE);

SoundOptionOnOff3(JohnSoundID,PLAYHOVERTHRUST,FALSE);
SoundOptionOnOff3(JohnSoundID,PLAYATTITUDETHRUST,FALSE);

SoundOptionOnOff3(JohnSoundID,PLAYCOUNTDOWNWHENTAKEOFF,FALSE);

SoundOptionOnOff3(JohnSoundID,PLAYCABINAIRCONDITIONING,FALSE);

SoundOptionOnOff3(JohnSoundID,PLAYCABINRANDOMAMBIANCE,FALSE);

SoundOptionOnOff3(JohnSoundID,PLAYRADIOATC,FALSE);

SoundOptionOnOff3(JohnSoundID,DISPLAYTIMER,FALSE);
SetTouchdownPoints (_V(0,-3.124+GEAR_proc*1.5,8.7), _V(-2,-3.124+GEAR_proc*1.5,-9.6), _V(2,-3.124+GEAR_proc*1.5,-9.6));

}

If I put it in there the gear moves but not the touchdown.
 
Last edited:
Use the debugger to see how GEAR_proc is changing in clbkPostStep. Is it changing how you would expect?
 
Then that tells you that GEAR_proc is not having the expected values inside clbkPostStep. How does GEAR_proc change at the point in the code where your SetTouchdownPoints is located? Does it increase/decrease with the gear motion as you would expect?
 
Thanks ok trying to get the debug set up

I get this error:
------ Build started: Project: EAGLE3, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D9007 : '/Gm' requires '/Zi or /ZI'; option ignored
EAGLE3.cpp
.\EAGLE3.cpp(1385) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
.\EAGLE3.cpp(1488) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
LINK : fatal error LNK1104: cannot open file 'C:\orbiter\modules\eagle3.dll'
Build log was saved at "file://c:\ORBITER\Orbitersdk\samples\EAGLE3\Debug\BuildLog.htm"
EAGLE3 - 1 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


The eagle3.dll is in that directory.


Since the animation works I would think then gear_proc is working.
 
Last edited:
LINK : fatal error LNK1104: cannot open file 'C:\orbiter\modules\eagle3.dll'
Please try to delete that file before you will try to compile it again. If you can't delete it, it can be used by some other process, or hasn't been unloaded yet from the memory after Orbiter crash, as also either disable "/Gm" option, and check if that changed something, or change debugging information to "/Zi", which will produce external file for symbols and line numbers for debugging.
 
Which file?
If I delete the eagle3.dll then won't the eagle CTD
 
Which file?
If I delete the eagle3.dll then won't the eagle CTD
No it won't, because it will be relinked before you start debugging session. And there is error telling that this file cannot be opened, so it can't be recreated by linker, because for example it is read only, by either acl, attribute, or sharing access that has been set when it was opened by other process.
 
ok deleted the orbiter/modules/eagle3.dll

And now get these:
------ Build started: Project: EAGLE3, Configuration: Debug Win32 ------
Linking...
Creating library .\Debug/ShuttlePB.lib and object .\Debug/ShuttlePB.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
C:\orbiter\modules\eagle3.dll : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\ORBITER\Orbitersdk\samples\EAGLE3\Debug\BuildLog.htm"
EAGLE3 - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
------ Build started: Project: EAGLE3, Configuration: Debug Win32 ------
Linking...
Creating library .\Debug/ShuttlePB.lib and object .\Debug/ShuttlePB.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

Add libcmt.lib to ignored libraries, or directly add to .vcproj file lines from this post as attributes of '<Tool Name="VCLinkerTool"' tag inside '<Configuration Name="Debug|Win32"', as described for debug build.
 
ok i have these:
<Configuration
Name="Debug|Win32"
....


<Tool
Name="VCLinkerTool"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib"
OutputFile="C:\orbiter\modules\eagle3.dll "
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="C:\Orbiter\Orbitersdk\lib;"C:\Program Files\Microsoft Platform SDK\Lib""
IgnoreDefaultLibraryNames="msvcirt.lib;msvcrt.lib;libcmt.lib"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/ShuttlePB.pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\Debug/ShuttlePB.lib"
TargetMachine="1"
/>


Now I get 89 errors are the first
Linking...
Creating library .\Debug/ShuttlePB.lib and object .\Debug/ShuttlePB.exp
libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
EAGLE3.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
OrbiterSoundSDK35.lib(OrbiterSoundSDK35.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
EAGLE3.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
OrbiterSoundSDK35.lib(OrbiterSoundSDK35.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
EAGLE3.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
OrbiterSoundSDK35.lib(OrbiterSoundSDK35.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
EAGLE3.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z)
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z)
OrbiterSoundSDK35.lib(OrbiterSoundSDK35.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z)
EAGLE3.obj : error LNK2001: unresolved external symbol __fltused
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol __fltused


....
C:\orbiter\modules\eagle3.dll : fatal error LNK1120: 47 unresolved externals
 
Try this in the debug:
Code:
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib msvcrtd.lib msvcprtd.lib orbiter.lib Orbitersdk.lib"

What was the source for the project? Was it the ShuttlePB sample from Orbiter 2006 P1?

The linking log and contents of files would be more readable with [code] tags.
 
Also it gets locked up here I and press continue but the screen comes back up.

If I press Break then I get this screen
 
Last edited:
You can't continue through unhandled exception. You need to break Orbiter execution, and if you had compiled your module in debug mode, you could trace back the last Orbiter function called from your module and the exact line would be highlighted in your sources then.
 
Thanks. Maybe I'm do something wrong.

I press F5 to start the debug then it opens launchpad and I have it running in a window not full screen. It loads but he mesh and no thrust....

the scenario only has the eagle3 in it

Should I see the vessel?
 
Last edited:
ok this is what I am doing to run the debugger.

run F5 I get This project is out of date, would you like to build it.
I say yes
It links this is where i get my error. Then I get the message that there were build errors would you like to continue and run the last successful build. I say yes
Then I get Debuging information.
Debugging information for orbiter.exe can not be found or does not match. Binary was not built with debug information.
Do you want to continue debugging? I says Yes
I then launch orbiter current state in a window.
Orbiters opens but no eagles mesh and no thrusters,.....

What's wrong?
 
Last edited:
To debug a DLL under Orbiter, see instructions here.
 
And as noted in this thread, if you load last successful build instead of the current one, the debugging symbols won't match the sources, so you should say "No", and fix compiler and linker errors first, before you will run the debug session.
 
Then I get the message that there were build errors would you like to continue and run the last successful build. I say yes
...
What's wrong?
Read what that error is saying. If there were build errors, the build failed, and you need to resolve those failures before debugging will be useful. Clicking "yes" to that dialog is typically the wrong choice.
 
Back
Top