Notes on PLN Files and "Custom" Waypoints

The normal method for setting up a plan in the sim is to set your start and end waypoints, then if you want to add nav aids, you click on one and choose “Add.” If you clicked the wrong one, you click it again and select “Remove.” But if you set a custom way point after you’ve gone through the steps to add several waypoints because you’re doing a nice long cross-country, then realize you put it in the wrong place, you have two options - live with it in the wrong place, or restart from scratch. You can’t remove a “Custom” waypoint! So until this is remedied (and I know it’ll be low priority), I came up with a work-around. Just save it like it is, and close the sim. Now comes the fun part. The pln files are XML. Each waypoint is enclosed in “ATCWaypoint” tags. Open the pln file with Notepad++ (or just Notepad if that’s all you have), and search for “Custom” (Ctrl+F) to find the section, then delete it. Save the file, relaunch the sim, then you can load the pln file and make the correct additions.

I know this seems cumbersome, but at least to me, it’s better than starting from scratch.

Yeah, it is horrific. Maybe use LittleNavMap or similar instead for the time being and import the plan.

1 Like

THANK YOU. I do a fair bit of crosscountry and bush flights with various waypoints - accidentally setting up the wrong place and restarting is horrific - I’ve lost so many waypoints in such little time D:

1 Like

To get it right the first time, open Google Maps, and click on the spot you want. At the bottom of the map, you’ll get a link with lat/lon coordinates. Click that, then copy from the left sidebar. Be sure to use the decimal version. Feed that into the Search, and it will locate the spot for you.

1 Like

I wrote the powershell script below to convert KML DD to DMS for pln. You can use it to convert exported google map waypts. 1). Create your map and waypts in google map. Put the Altitude on the description in feed. Export the map to KML. Create and save a flight pln with just a DEP and ARR airport. Run it with powershell ISE and select the KML export. Copy and paste the waypts into the pln. save it and load it to FS.

[void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Drawing”)
[void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
[void] [System.Windows.Forms.Application]::EnableVisualStyles()

$Form = New-Object system.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(800,500)

$form.MaximizeBox = $false
$Form.StartPosition = “CenterScreen”
$Form.FormBorderStyle = ‘Fixed3D’
$Form.Text = “Google Map KML To FS Plan WPT”

$File = New-Object System.Windows.Forms.OpenFileDialog -Property @{

InitialDirectory = [Environment]::GetFolderPath(‘Desktop’)
Filter='Keyhole Markup Language (*.kml)|*.kml|All Files|*.*'

}

$null = $File.ShowDialog()

$KMLFile = $File.FileName

$objTextBox1 = New-Object System.Windows.Forms.TextBox
$objTextBox1.Multiline = $True;
$objTextBox1.Location = New-Object System.Drawing.Size(10,10)
$objTextBox1.Size = New-Object System.Drawing.Size(770,470)
$objTextBox1.Scrollbars = “Vertical”
$Form.Controls.Add($objTextBox1)

If ($KMLFile -ne “”) {
[XML]$kml = Get-Content $KMLfile

foreach ($wayptDetail in $kml.DocumentElement.Document.Folder.Placemark) {

    $wayptCoordinates=$wayptDetail.point.coordinates.TrimStart()

    [double] $LON=[math]::round($wayptCoordinates.Split(",")[0],6)
    [double] $LAT=[math]::round($wayptCoordinates.Split(",")[1],6)
    if ( $LON -le 0 ) {
        $LONDir="W"  
        $LON=($LON * -1)
    } else {
        $LONDir="E"
    } 

    if ( $LAT -le 0 ) {
        $LATDir="S"  
        $LAT=($LAT * -1)    
    } else {
        $LATDir="N"
    } 
    [double] $LONDeg=[math]::Truncate($LON)

    [double] $LONmmdb=[math]::round(($LON - $LONDeg), 6) * 60
    [double] $LONmm=[math]::Truncate($LONmmdb)

    [double] $LONSS=[math]::round(($LONmmdb - $LONmm)*60,2)


    [double] $LATDeg=[math]::Truncate($LAT)

    [double] $LATmmdb=[math]::round(($LAT - $LATDeg), 6) * 60
    [double] $LATmm=[math]::Truncate($LATmmdb)

    [double] $LATss=[math]::round(($LATmmdb - $LATmm)*60,2)

    #write-host $LON $LAT

    $LONstring="$LONDir$LONDeg"+"° "+"$LONmm"+"' "+"$LONss"+'"'

    $LATstring="$LATDir$LATDeg"+"° "+"$LATmm"+"' "+"$LATss"+'"'

    $WPName=$wayptDetail.name.TrimStart()
    if (-not ([string]::IsNullOrEmpty($wayptDetail.description)))
    {
        $WPDesc=($wayptDetail.description).padleft(6,"0")
    } else {
        $WPDesc="0".padleft(6,"0")
    }
    $WorldPosition="$LATstring,$LONString,+$WPDesc.00"
    $Line1='        <ATCWaypoint id="'+$WPName+'">'
    $objTextBox1.Text = $objTextBox1.Text + "$Line1 
        <ATCWaypointType>Intersection</ATCWaypointType>
        <WorldPosition>'$WorldPosition'</WorldPosition>
        <Alt1FP>'$WPDesc'</Alt1FP>
        <AltDescFP>AT_OR_ABOVE</AltDescFP>
        <SpeedMaxFP>-1</SpeedMaxFP>
        <ICAO>
            <ICAOIdent>'$WPName'</ICAOIdent>
        </ICAO>
    </ATCWaypoint>'

"
}
}else {
$objTextBox1.Text=“No file selected!!”
}
$null = $Form.ShowDialog()

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.