Using ChatGPT to create a flight simulator flight plan in Little NavMap format

Short post to just doc­u­ment the prompt I use with Chat­G­PT. It works ok, for short flights. For some reas­on, Chat­G­PT seems to stall out if the flight­plan has more than five or six user way­po­ints, in addi­tion to the depar­ture and des­tin­a­tion waypoints. I should prob­ably look at optim­iz­ing this prompt, it’s a bit long 🙂


Short post to just doc­u­ment the prompt I use with Chat­G­PT. It works ok, for short flights. For some reas­on, Chat­G­PT seems to stall out if the flight­plan has more than five or six user way­po­ints, in addi­tion to the depar­ture and des­tin­a­tion waypoints.

I should prob­ably look at optim­iz­ing this prompt, it’s a bit long 🙂

XML
Please remember the following. You will be making a flight plan using Little Navmap XML format. 

Do NOT create a Python program.

If any line after this one begins with ## then ignore the rest of that line.

## My name is Bob, please address me as Bob.

I will provide an origin and a destination. I may also give a flight plan type [VFR/IFR] cruising altitude and other way points or locations as [VIA]. Always use published sources for Airport and RNAV information.

Initial assumptions:
If VFR, Cruising altitude = 5000
If IFR, Cruising altitude = airway assigned altitude
Flight plan type = VFR
Rules = NORMAL

Tell me when you're ready to begin, please, and save the information I give you into a variable called USERINPUT. Convert USERINPUT to uppercase.

Flight plan creation:
Create the flight plan using the NORMAL rules, and additional rules only if specified in the request. 

NORMAL flight rules:
- The flight plan route should follow waypoints that are airports and RNAV beacons. 
- If no airport exists along the shortest route, then use a nav beacon. 
- If none exist, then create a unique waypoint. See the waypoint creation rules below.
- Routes can follow established transport infrastructure (highways, rail lines, shipping lanes, rivers, etc)
- Routes should use an altitude to avoid obstacles and terrain features (mountains, etc). Prompt me if an altitude issue occurs.
- If the route is over 500km, ask me if I want to plot a Great Circle route. If yes, then your output route should follow a great circle route plan.
- Do not use <Route> and <Leg> xml tags.


Use these SCENIC rules only if USERINPUT contains SCENIC:
- NORMAL and SCENIC rules apply
- Please tell me when including SCENIC rules.
- If a SCENIC flight plan, then the route should include additional waypoints that are of scenic value between the origin and destination. Things like great vistas, lovely views, historical locations, landmarks, and buildings.
- SCENIC waypoints will have the Name prepended with SCN- followed by a brief description
## WAYPOINT LIMIT FOLLOWS
- IMPORTANT: limit total number of SCENIC waypoints to 5

Use these DIRECT rules only if USERINPUT contains DIRECT:
- The flight plan should always follow the shortest direct route between origin and destination. 
- Always use the fewest number of waypoints possible. 
- If I tell you VERY DIRECT, then just plot a route with the Origin and Destination, no waypoints in between.

Use these MISSION rules only if USERINPUT contains MISSION:
- create a dramatic mission for me to perform. Do not ask me for origin or destination, You select the starting point, and the destination based on the fiction you're creating.  
- create and display a fictional backstory/reason for the mission, then create the waypoints for that mission using the waypoint creation  below.
- The mission should be interesting, somewhat dramatic, and perhaps have a time-sensitive component.
- assume aircraft type Beech Bonanza or Cessna 172.
- You must plot waypoints for the mission.
- assume VFR
- append a brief summary of the mission in the COMMENT section of the flight plan


Waypoint creation:
If you need to create a unique waypoint it will be Type=User using the format below. A unique waypoint you create will never be Type=AIRPORT.  

     <Waypoint>
        <Name>WPT</Name>
        <Ident>USER1</Ident>
        <Type>USER</Type>
        <Pos Lon="-113.333404" Lat="53.513576" Alt="5000.00"/>

If possible, no waypoint should be within 20nm of another waypoint, unless it's an airport navigation beacon for takeoff or landing.

Output file creation:
Do not use <Route> and <Leg> xml tags.
These variables will be included in the COMMENT element at the location indicated in the format below. 
VERSION = 1.01
CREATION DATE = Today's date and time 
WAYPOINTS = number of waypoints in the flightplan
FLIGHTRULES = the rules you're using to generate this flight plan
CHATGPT_VERSION = the version of ChatGPT that is parsing these instructions

Use the following format to create the COMMENT variable
LNM_ChatGPT_FlightPlanGenerator VERSION -- CREATION DATE -- WAYPOINTS waypoints -- CHATGPT_VERSION -- Rules: FLIGHTRULES -- User Input: USERINPUT

Put the output in a code window. The output must have the following at the start:

<?xml version="1.0" encoding="UTF-8"?>
<LittleNavmap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://www.littlenavmap.org/schema/lnmpln.xsd">

  <Flightplan>
    <Header>
      <FlightplanType>VFR</FlightplanType>
      <Comment>COMMENT</Comment>
      <Comment>PROMPT</comment>
      <CruisingAlt>4500</CruisingAlt>
      <CreationDate>2023-03-27T11:39:24-06:00</CreationDate>
      <FileVersion>1.1</FileVersion>
      <ProgramName>Little Navmap</ProgramName>
      <ProgramVersion>2.8.9</ProgramVersion>
      <Documentation>https://www.littlenavmap.org/lnmpln.html</Documentation>
    </Header>
    <SimData>MSFS</SimData>
    <NavData>MSFS</NavData>

Waypoints are next, in this format:
    <Waypoints>
      <Waypoint>
        <Name>Edmonton International Airport</Name>
        <Ident>CYEG</Ident>
        <Type>AIRPORT</Type>
        <Pos Lon="-113.579666" Lat="53.309666" Alt="2373.00"/>
      </Waypoint>
     </Waypoints>

If not provided in the my request assume the type of flightplan is VFR and the cruising altitude is 5000

For IFR flightplans, please prompt me for a preferred route or airway. If none provided, select the most appropriate one. 

Please save the flightplan in the Little Navmap XML format.
XML

Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.