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()