Using your own Map data for the P3D GPS

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Locked
Barney_LM
Posts: 46
Joined: Tue Apr 03, 2018 10:49 am

Using your own Map data for the P3D GPS

Post by Barney_LM »

Currently have my own GPS for the F16.

However I need to know how to change the default GPS map to my own GPS map data.

I know this can be changed in the XML properties of the GPS, however I want to change it so that I have my own GPS map background data rather than the dafults already available in P3D.

I have my own map data in bgl and tiff formats

Regards
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Using your own Map data for the P3D GPS

Post by Beau Hollis »

Bgl defined data that included as add-on scenery should get rendered into the default GPS. (Eg runways, approaches, shorelines etc). We have a number of customers who have made custom maps. There are many ways to do this via our SDK:
- Flash/Scaleform - import images into Adobe Animate and shift them via script. Our engine renders this via DirectX
- IGaugeCDrawable - writes to an xml gauge element buffer via C++.
- PDK - custom render to DirectX texture in a C++ plugin
- C++ gauges - write to gauge image buffer in a C++ gauge dll

The IGaugeCDrawable is the same interface implemented by the layers of our default map. If you want you data integrated with the existing map, that may be your best option. The Custom Nav Draw sample draws some shapes into the GPS map. It can be found in the SDK here:

Code: Select all

SDK\Panels and User Interface\Panels\Custom Nav Draw
PDK/Scaleform options are hardware accelerated and may perform better. The DxGauge sample shows how to render to a DirectX texture and display it on a gauge.

Code: Select all

SDK\PDK\TextureAndEffectPluginSamples\DxGauge
Scaleform is the only option that doesn't require C++ code. I don't think we have a sample map, but we have a number of samples that use bitmap resources:

Code: Select all

SDK\Panels and User Interface\Scaleform\Samples
There are lots of Adobe Animate and ActionScript 3 tutorials out on the web.

Thanks
Beau Hollis
Prepar3D Software Architect
Barney_LM
Posts: 46
Joined: Tue Apr 03, 2018 10:49 am

Re: Using your own Map data for the P3D GPS

Post by Barney_LM »

Ok

Starting with the BGL option

I have my own UK map data in bgl format, if I add this as add-on scenery should it then display on the GPS?

Thanks
Barney_LM
Posts: 46
Joined: Tue Apr 03, 2018 10:49 am

Re: Using your own Map data for the P3D GPS

Post by Barney_LM »

I have imported my own bgl map data into the scenery add ons however the GPS map background still remains the same.
Barney_LM
Posts: 46
Joined: Tue Apr 03, 2018 10:49 am

Re: Using your own Map data for the P3D GPS

Post by Barney_LM »

I have used my own bgl data and set its priority to 1

However in the GPS map / fs9gps:map, the background of the map remains the same. I have also commented out the DetailLayerTerrain attribute in the xml so it draws nothing. Still there is no change.

Thanks
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Using your own Map data for the P3D GPS

Post by Beau Hollis »

What kind of data specifically are you expecting to see that isn't changing. What kind of data is in your bgl? The map water layer relies on vector-based water features. If you added new water vector data, i would expect the water data to be reflected on the water layer of the map. Likewise for elevation. As far as I understand it, the elevation layer pulls hightmap data from the terrain system which should include any areas replaced with add-on data. Imagery/Texture data from the terrain has never been displayed on the map as far as I'm aware. If the add-on is replacing ground textures with imagery, that won't change the map. As mentioned before, I believe that airport elements like runways should show up as long as they are attributed correctly in the bgl.
Beau Hollis
Prepar3D Software Architect
Locked