• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Setting Up PDK Camera Project

Messages
85
Country
spain
Hi. I am trying to understand how the PDK works in P3D v3 in order to control a camera. I try to follow the SDK instructions without any success (I get a dll file but it does nothing) :

Setting Up the Project
To build the project:

  1. Open the CameraPDK.sln found in the SDK at <Prepar3D SDK Path>\Utilities\PDK\CameraSystemPrototypes\CameraSystemPDK with Visual Studio 2013.
  2. Right-click on the Main Project within the Solution Explorer and select "Properties".
  3. In the Project Property Pages, select the VC++ Directories Entry.
  4. Update the Include Directories path to include the paths to:
    • Pdk.h and ICameraInterface.h.
    • <Prepar3D SDK Path>\Utilities\PDK\Inc
  5. Update the Library Directories to include the paths to:
    • Pdk.lib
    • <Prepar3D SDK Path>\Utilities\PDK\lib
  6. Click the Apply button to save the settings.
  7. Right-click on Solution. Select Build to begin building the Sample.
NOTE: Paths denoted with < > represent paths on your machine that may vary based on your installation. Please ensure you have input these paths correctly, as failure to do so may cause the build to fail.

My problem is that I can't find the ICameraInterface.h (file) nor the Pdk.lib (file and folder in SDK). I guess I'm missing something. Can somebody help or give an explanation about this?
 
Yes. I have downloaded it from Prepared3d web. I have re-downloaded it and re-installed it with the antivirus protection off just to be sure. I have also checked
older versions of the SDK (v2) and there's no track of a \lib folder in it. I have also search in MyPC for the folder and the files, and it's not by there...

I reckon my C++ knowledge is poor, but an example should be an easy task...
 
My problem is that I can't find the ICameraInterface.h (file) nor the Pdk.lib (file and folder in SDK). I guess I'm missing something. Can somebody help or give an explanation about this?

At least yours seems to run. My dll will crash P3D v3.1. I think the lib is not required or the compile would not work. IcamerInterface.h is not in the list of includes. Best to ask LM
 
Ah Nuts ... again forgot the

<DLLType>PDK</DLLType>

in the dll.xml

So you also have to change the "Virtual Cockpit - View 00" to something else like "Virtual Cockpit - View 45", then you get two views from the start of your flight.

Looks like you don't need the PDK.lib file. I have asked LM about these files.
 
The main Dllmain.cpp file. SystemReadyCallback::Invoke routine.

S_NAME variable
 
Still not working. I changed the manual load to true and it asks me permission to open it. I think that something flickers once on the top left corner of the window. But after that,
nothing... I'm missing something. What VS do you use to compile the dll?
 
Hmm,

I use VS2013. copied dll to modules folder.

I have this in the dll.xml

Code:
  <Launch.Addon>
    <Name>Camera PDK</Name>
    <DLLType>PDK</DLLType>
    <Disabled>False</Disabled>
    <ManualLoad>False</ManualLoad>
    <Path>Modules\cameraPDK.dll</Path>
  </Launch.Addon>
 
I have the same in dll.xml. I was using VS2010 (silly mistake) but now I'm with VS2013. I keep trying and trying but it still doesn't work.
I have made sure I don't have any content error (I had many). I don't know what more to do.

Perhaps you could lend me your .dll just to check if my problem is with my P3D configuration or mi VS configuration (and therefore the dll).

My intention is to build a flir gauge in a VC screen for my AW139 I'm developing as freeware. I know how to integrate the camera view in the
gauge but I want to be able to control that camera to give the flir all the real features (automatic scan, manual control, etc.). The firs step
would be having the Camera PDK example working and after that I would make the appropriate changes to achieve what I want.
 
Thank you very much Ron. I tried your dll and it does not work. I'm pretty sure my dll.xml is correct because it loads other
addons such as xmlvars without problem. So I assume the problem is in my P3D v3 (perhaps the academic licence, or something
in the configuration...).

My dll.xml content is the following:

Code:
<?xml version="1.0" encoding="Windows-1252"?> 

<SimBase.Document Type="Launch" version="1,0"> 
  <Descr>Launch</Descr> 
  <Filename>dll.xml</Filename> 
  <Disabled>False</Disabled> 
  <Launch.ManualLoad>False</Launch.ManualLoad> 

             
    <Launch.Addon>
        <Name>XMLVars</Name>
        <Disabled>False</Disabled>
        <ManualLoad>False</ManualLoad>
        <Path>modules\XMLVars.dll</Path>
        <DLLStartName>module_init</DLLStartName>
        <DLLStopName>module_deinit</DLLStopName>
    </Launch.Addon>
    <Launch.Addon>
        <Name>Camera PDK</Name>
        <DLLType>PDK</DLLType>
        <Disabled>False</Disabled>
        <ManualLoad>False</ManualLoad>
        <Path>modules\CameraPDK.dll</Path>
    </Launch.Addon>
             
</SimBase.Document>

Again, thank you for your help!
 
Create a simconnect.ini file in %USERPROFILE%\Documents\Prepar3D v3 Files folder.


Code:
[SimConnect]
level=verbose
console=1
RedirectStdOutToConsole=1
OutputDebugString=1
file=c:\simconnect%03u.log
file_next_index=0
file_max_index=9



That may give you a clue as to the issues.

Are you full screen or window mode. Should not make a difference
 
I did it. This is what I get.

0.00000 SimConnect version 3.0.0.0

0.00188 Server: Scope=local, Protocol=Pipe, Name=\\.\pipe\Lockheed Martin Prepar3D v3\SimConnect, MaxClients=64
0.00342 Server: Scope=local, Protocol=Pipe, Name=\\.\pipe\Microsoft Flight Simulator\SimConnect, MaxClients=64
0.00500 Server: Scope=local, Protocol=Pipe, Name=\\.\pipe\Microsoft ESP\SimConnect, MaxClients=64
0.00658 Server: Scope=local, Protocol=Pipe, Name=\\.\pipe\Lockheed Martin(R) Prepar3DÖ\SimConnect, MaxClients=64
0.00815 Server: Scope=local, Protocol=Pipe, Name=\\.\pipe\Lockheed Martin Prepar3D v2\SimConnect, MaxClients=64
0.00972 Server: Scope=local, Protocol=Pipe, Name=\\.\pipe\Lockheed Martin Prepar3D v3\SimConnect, MaxClients=64
0.01131 Server: Scope=local, Protocol=IPv6, Address=::1, Port=65375, MaxClients=64
0.01288 Server: Scope=local, Protocol=IPv4, Address=127.0.0.1, Port=65376, MaxClients=64

0.01638 Panels data export found and set to 67BBE2C8
0.01652 DLL Loaded: Path="radar.dll" Version="3.0.0.0"
3.03398 DLL Loaded: Path="Oculus.dll" Version="3.0.0.0"
3.05890 Panels data export found and set to 67BBE2C8
3.05912 DLL Loaded: Path="ControllableCamera.dll" Version="<Unknown>"
3.08374 DLL Loaded: Path="modules\CameraPDK.dll" Version="<Unknown>"
3.08565 Panels data export found and set to 67BBE2C8
3.08582 DLL Loaded: Path="modules\XMLVars.dll" Version="1.0.0.0"
> 5.85969 [64, 1]Open: Version=0x00000004 Name="C:\Prepar3D v3\Gauges\dsd_fsx_x
ml_sound.gau"
> 5.86024 [64, 2]SubscribeToSystemEvent:EventID=1, SystemEventName="Pause"
< 5.86050 [64] Event: 1
> 5.86071 [64, 3]SubscribeToSystemEvent:EventID=0, SystemEventName="Sound"
< 5.86100 [64] Event: 0
> 5.86107 [64, 4]SubscribeToSystemEvent:EventID=2, SystemEventName="View"
< 5.86140 [64] Event: 2
> 5.86146 [64, 5]SubscribeToSystemEvent:EventID=4, SystemEventName="SimStart"
> 5.86170 [64, 6]SubscribeToSystemEvent:EventID=5, SystemEventName="SimStop"
> 6.05635 [64, 7]SubscribeToSystemEvent:EventID=6, SystemEventName="Frame"
< 6.08612 [64] EventFrame: 6 7.108443
< 6.30417 [64] EventFrame: 6 4.582503
< 6.35412 [64] EventFrame: 6 20.012451
< 6.45096 [64] EventFrame: 6 10.326123
< 6.53745 [64] EventFrame: 6 11.561438
< 6.58745 [64] EventFrame: 6 20.001698
< 6.64055 [64] EventFrame: 6 18.832096
< 6.69052 [64] EventFrame: 6 20.013538
< 6.75037 [64] EventFrame: 6 16.707811
....................................................
...................................................

I don't see anything special...
 
Seems to load. You don't see a second view - very small 100x100 px

camera pic

camerpkd.png
 
Last edited:
No, not at all. I have tried in full screen and window mode and it's the same. It would be incredible to add that
feature to the AW139.

I made a gauge that does the same (a dmap with a sensor page, with a view which is sinchronized with the flir turret)
but I wanted to integrate it in the VC screen...
 
Back
Top