Jump to content

Archived

This topic is now archived and is closed to further replies.

Akila

Converting FSX *.pln to P3D *.pln format?

Recommended Posts

I have bunch of *.PLN flight plans that were created ages ago for FSX.

the PLN files for FSX are plain text format.

e.g.

[flightplan]
AppVersion=9.1.40901
title=OJAI Queen Alia Intl to LLBG Ben Gurion
description=OJAI, LLBG
type=IFR
routetype=2
cruising_altitude=11000
departure_id=OJAI, N31* 43.35', E35* 59.59', +002395.00
departure_position=1
destination_id=LLBG, N32* 0.57', E34* 52.97', +000135.00
departure_name=Queen Alia Intl
destination_name=Ben Gurion
waypoint.0=, OJAI, , OJAI, A, N31* 43.35', E35* 59.59', +002395.00,
waypoint.1=LLLL, SALAM, , SALAM, I, N31* 56.00', E35* 31.00', +000000.00,
waypoint.2=, LLBG, , LLBG, A, N32* 0.57', E34* 52.97', +000135.00,

the Prepar3D however on the other hand are XML format *.PLN flight plan

e.g.

<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document Type="AceXML" version="1,0">
<Descr>AceXML Document</Descr>
<FlightPlan.FlightPlan>
	<Title>LLBG Ben Gurion to OJAI Queen Alia Intl</Title>
	<FPType>IFR</FPType>
	<RouteType>HighAlt</RouteType>
	<CruisingAlt>7000</CruisingAlt>
	<DepartureID>LLBG</DepartureID>
	<DepartureLLA>N32° 0' 34.13",E34° 52' 58.20",+000135.00</DepartureLLA>
	<DestinationID>OJAI</DestinationID>
	<DestinationLLA>N31° 43' 21.00",E35° 59' 35.40",+002395.00</DestinationLLA>
	<Descr>LLBG, OJAI</Descr>
	<DeparturePosition>1</DeparturePosition>
	<DepartureName>Ben Gurion</DepartureName>
	<DestinationName>Queen Alia Intl</DestinationName>
	<AppVersion>
		<AppVersionMajor>10</AppVersionMajor>
		<AppVersionBuild>3708</AppVersionBuild>
	</AppVersion>
	<ATCWaypoint id="LLBG">
		<ATCWaypointType>Airport</ATCWaypointType>
		<WorldPosition>N32° 0' 34.15",E34° 52' 58.20",+000135.00</WorldPosition>
		<ICAO>
			<ICAOIdent>LLBG</ICAOIdent>
		</ICAO>
	</ATCWaypoint>
	<ATCWaypoint id="SALAM">
		<ATCWaypointType>Intersection</ATCWaypointType>
		<WorldPosition>N31° 56' 0.03",E35° 31' 0.00",+000000.00</WorldPosition>
		<ICAO>
			<ICAORegion>LL</ICAORegion>
			<ICAOIdent>SALAM</ICAOIdent>
		</ICAO>
	</ATCWaypoint>
	<ATCWaypoint id="OJAI">
		<ATCWaypointType>Airport</ATCWaypointType>
		<WorldPosition>N31° 43' 21.03",E35° 59' 35.40",+002395.00</WorldPosition>
		<ICAO>
			<ICAOIdent>OJAI</ICAOIdent>
		</ICAO>
	</ATCWaypoint>
</FlightPlan.FlightPlan>
</SimBase.Document>

What I have noticed is that FSX could read both Plain text PLN files and XML PLN format files, but Prepar3D can't read the plain text FSX PLN file, but only the XML PLN format.

I don't want to recreate all my Flight plans again.

does any one knows of a tool that know how to convert the FSX PLN file to a P3D PLN file?

Share this post


Link to post

Seeing the format of the data, I could probably whip one up for ya pretty quick once I get time. All the data is the same type, just laid out in different places.

Share this post


Link to post

Isn't the first one an FS9 flight plan file? FSX .PLN files are already in XML format. I began to write a program, but then realized that FSX files are already in XML format.

Share this post


Link to post

Well, if he has flgihtplans he kept around from FS9, that would be why he has plans in .txt format.

Share this post


Link to post

it could be that it is the original FS9 PLN (i thought that myself) , but that is what vroute.premium tool exports it too.

they do have P3D export format as well, but that means I need to route everything again

 

Seeing the format of the data, I could probably whip one up for ya pretty quick once I get time. All the data is the same type, just laid out in different places.

that would be great.

Share this post


Link to post

leave them in their present format, and when you want to use one, just browse from the P3 flightplanner UI to Documents\FSX files and select the one you want.

 

I am sure there may be a more sophisticated way of doing things, but it enables me to make use of the excellent FSBuild 2 simply by exporting the plans to FSX as usual, then by browsing from the in-game planner I Load the plan. I have no FS9 stuff, gave that away when I grew up!

Share this post


Link to post

leave them in their present format, and when you want to use one, just browse from the P3 flightplanner UI to Documents\FSX files and select the one you want.

I tried it before I posted that Question.

P3D doesn't recognize those files. i.e. it doesn't even list them for you to pick.

that is how I realized this problem in the 1st place.

I saw it shows me only 3 FP even though I had about 20 of them.

I open those FP with notepad and an one example/random FP of those who did not show on the list and I saw the difference that I mention at my original post.

Share this post


Link to post

FSX/P3D must be trying to load the XML document and when it fails, it doesn't display it as a choice. If FSX fails to load the XML, it reverted to the FS9 loading method of INI configuration data.

 

As an update, it's half done now, just making sure it imports/exports everything as expected and has failsafes for ensuring no overwriting of originals and backing them up (don't wanna lose that work).

 

Hopefully, I'll have it done tonight after work or in the next 3 days I have off (best Memorial Day plans ever - sit at home, drink some liqour, eat some hot dogs with my wife and roommates/extended family and program a program for the hell of it)

Share this post


Link to post

My god, you are amazing!!!!!!

Share this post


Link to post

It is done. Take a look at the readme as it will detail a lot, but for starters, unzip the PlanConverter.exe into the flight plan directory you want to convert and run the program. There is no GUI or anything, just a black CommandLine box will appear, the disappear. It will move the converted files to a new directory called BACKUPS and the new converted plans will be in a CONVERTED directory. It is quick and dirty, but should get the job done.

 

You're looking for a file in the FSX Utilities called Flight Plan Converter by Aaron Parsons (me). I got the upload confirmation, but the file still hasn't been processed by the file admins. Hopefully, it will be downloadable tomorrow for you and anyone else who needs the utility.

Share this post


Link to post

thank a million , will give it a shot.

Share this post


Link to post

they denied my upload as I am unwilling to put my email address for technical support questions about the upload and am not a publisher with an active support forum.

 

I don't normally upload files to share with others, so this will have to do for now..

 

 

 

Its free and easy for me, but takes you a few clicks to get the file.

Share this post


Link to post

that is more then perfect.

Share this post


Link to post

they denied my upload as I am unwilling to put my email address for technical support questions about the upload and am not a publisher with an active support forum.

 

I don't normally upload files to share with others, so this will have to do for now..

 

 

 

Its free and easy for me, but takes you a few clicks to get the file.

 

Ok , Finally I got the time to test the tool.

it converted the planes as expected to XML format however unfortunately Prepar3D still can't read them.

maybe there is a different format for P3D.

Share this post


Link to post

Ok , Finally I got the time to test the tool.

it converted the planes as expected to XML format however unfortunately Prepar3D still can't read them.

maybe there is a different format for P3D.

 

Can you read the converted files with FSX? Could be a bug in the software.

Share this post


Link to post

dont forget, the converted files are put into a "converted" folder to keep them separate just for clarity sake which files are which and the originals are moved to a backup folder...the new plans wont be in the folder the files were in, you'll either have to point P3D to the new "converted" subdirectory or copy the files in the converted directory into the main folder. I don't have P3D installed, so couldn't test, but FSX loads my old FS9 plans fine after running them thru my tool.

Share this post


Link to post

yeah , I saw that the tool moves them to the "converted" folder and "Backup" the old ones.

I just finished installing FSX, I will try to use the converted Files.

Share this post


Link to post

Finally I got to test it in FSX.

the Answer is no, as soon as I load the converted FP FSX crashes.

Share this post


Link to post

Finally I got to test it in FSX.

the Answer is no, as soon as I load the converted FP FSX crashes.

Then the problem is with the converted file.

Why don't you try this. Load the original file in FSX, make a minor adjustment. Just select the destination airport again. It should let you save it and overwrite the original flight plan. The new file should be saved in the FSX xml schema and thus compatible with P3D.

Share this post


Link to post

yeah I can do that, but I was hoping that the tool's code could be corrected (the format it converts is broken).

that way we can all enjoy the Tool :)

Share this post


Link to post

Can you pm me a copy of the text in the converted file that crashes the sim and the original file that was converted from? That way I can see what data may or may not be causing the crash. I'll test that on my FSX until I figure out how to fix it and re-upload the fixed tool.

Share this post


Link to post

I just finished a parsing routine in Gambas3 that reads FSX flight plans and generates the XML code.  I am sure there are still bugs but so far it seems to do the trick.  Flight plans I generated on simroutes for FSX converted without a hitch.  

 

Now it has been a while since I have coded so it is not the prettiest code in the world but it does the job.  If anyone is interested let me know.

 

Andrew

Share this post


Link to post

Hi Andrew,

 

I would be interest in how you were able to change the FSX flight plans to the XML code.

 

Angela

Share this post


Link to post
×
×
  • Create New...