You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tobias Dammers 74b3a057ad
Don't crash when departure / destination runways don't exist
2 years ago
gui/dialogs Aircraft development hooks 3 years ago
.gitignore gitignore 3 years ago
LICENSE Initial commit 3 years ago
README More documentation 3 years ago
addon-config.xml Explicit start/stop buttons for winds-aloft updater 3 years ago
addon-main.nas Don't crash when departure / destination runways don't exist 2 years ago
addon-menubar-items.xml Put actual stuff in 3 years ago
addon-metadata.xml Put actual stuff in 3 years ago

README

FG SimBrief Importer Add-On

===========================

What Is This?
-------------

This is an add-on for FlightGear that adds a SimBrief Import dialog.

(See https://www.simbrief.com/).

What It Does
------------

The SimBrief importer can import various aspects of a SimBrief flight plan into
FlightGear. The import functionality attempts to support as many aircraft types
as possible, but due to the nature of the beast, it does not work equally well
with all of them.

To use it, you need to create an account on https://www.simbrief.com/. Then:

1. Create a new flight in the SimBrief "dispatch" system. Generate the OFP for
it.
2. In FlightGear, select "Equipment" > "SimBrief Import" in the main menu.
3. Enter your SimBrief username
4. Select which parts of the flight plan you want to import (see below)
5. Click "Import" and wait until it says "All Done".

Available options:

- Flight Plan Route: This one imports the departure and destination airports,
and all enroute waypoints, into the default flightplan. If "Activate
immediately" is checked, it will also activate the flightplan.
- Departure RWY, SID: This will attempt to select the planned departure runway,
and the planned SID, from the flightplan. Note that this will only work if
your FlightGear navdata matches the selections from SimBrief, which may not
be the case, especially if you're using the default FG navdata and/or an
outdated AIRAC cycle in SimBrief. SID selection will also fail if SimBrief
uses a different naming convention than FG's navdata.
- Arrival RWY, STAR: This will attempt to select the planned arrival runway and
STAR. The same caveats apply as with the departure runway and SID.
- Performance Init: This sets a handful of key performance parameters;
currently: cruise altitude and callsign.
- Activate immediately: with this checkmark on, the imported flight plan will
immediately become the active flight plan after a successful import. Without
it, the flight plan will be staged as the "modified flightplan" first. This
only really makes sense in aircraft that support this properly, and allow
you to review the modified flightplan before activating it.
- Payload: Imports passenger and cargo weights, and attempts to distribute them
sensibly over available payload weight slots.
- Fuel: Imports block fuel as per the flightplan, and attempts to distribute it
sensibly over available fuel tanks. Two fuel allocation strategies are
provided:
- "Balanced": distributes required fuel proportionally over all tanks,
according to their declared capacities - large tanks get more fuel, small
tanks get less fuel.
- "First come, first serve": distributes fuel by filling tanks in declaration
order. Some crude heuristic is in place that attempts to detect left/right
pairs of wing tanks from their names, to keep things balanced, but it is
not foolproof.
Which of these strategies is more suitable depends on the aircraft type. If
neither is good enough, but the aircraft comes with a "balance fuel" button,
the recommended way is to use either fuel strategy, and then simply press
the "balance fuel" button to let the aircraft sort it out.
- Winds Aloft: Runs a background process that sets winds aloft according to the
forecast winds in the flightplan. This will only work with Basic Weather,
since the Advanced Weather engine runs its own wind simulation that will
overwrite winds aloft regardless of what we set. The "Start" and "Stop"
buttons allow you to manually start and stop the winds updater.

Supported Aircraft Types (as per 09/2021)
-----------------------------------------

| FPL | Dep/SID | Arr/STAR | Perf Init | Payload | Fuel |
+------------------------+-----+---------+----------+-----------+---------+------+
| E-Jet-family-YV [6] | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| A320-family [1] | n/a |
+------------------------+-----+---------+----------+-----------+---------+------+
| 747-8i | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| MD-11 [5] | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| 747-400 | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| 737-800YV [2] | yes | yes | yes | yes | partial | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| 777 [3] | yes | yes | yes | yes | no | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| Citation-II [4] | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| Citation X | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| CRJ700-family | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| QSeries | yes | yes | yes | yes | no | yes |
+------------------------+-----+---------+----------+-----------+---------+------+
| DHC6 [4] | yes | yes | yes | yes | yes | yes |
+------------------------+-----+---------+----------+-----------+---------+------+

[1] - This aircraft already includes a SimBrief import feature, so this addon
will either not work or disable itself. Please use the aircraft's
built-in SimBrief importer instead.
[2] - Imports cargo, but not passengers, due to nonstandard handling of
passenger counts.
[3] - Nonstandard handling of cargo and passengers.
[4] - Imported flight plan is of limited use, because the aircraft does not
have an FMS.
[5] - Currently works, but devs plan to make a custom importer, at which point
[1] will apply.
[6] - Current version (as of 2021-10-17) has its own SimBrief importer, which
this addon is based on. The next release of the E-Jet family will not
include the custom importer anymore, instead requiring you to use this
addon instead.

Aircraft types not on this list may or may not work; they simply haven't been
tested. Contributions on this front are very welcome.

Aircraft Developer Information
------------------------------

The add-on should do a decent job on most aircraft types as long as you use the
standard built-in features. Some tips for making your aircraft maximally
compatible:

- If your aircraft supports flight plan staging ("ACTIVE" vs. "MODIFIED" flight
plans), then you can support this by providing custom implementations of the
following two Nasal functions, which must be in the global namespace:

`globals.getFlightplan(index=0)` - `index` is 0 for the active flightplan,
1 for the modified (staged) flightplan.

`globals.commitFlightplan()` - activates the modified flightplan, if any,
and triggers the necessary updates to your instrumentation.
- To make fuel allocation work, it is recommended that tanks that come in
left/right pairs include the words "Left" and "Right", respectively, in their
names, and listed consecutively. This way, the fuel import system will keep
their fuel levels synchronized. It is further recommended to list fuel tanks
in order of priority: this way, the "first-come-first-serve" strategy will do
the right thing, topping up the highest-priority tanks first, before adding
fuel to the additional tanks. For example, a typical airliner with two pairs
of wing tanks (inboard and outboard), and one center tank, might list them in
the following order:
- Inboard Left
- Inboard Right
- Outboard Left
- Outboard Right
- Center
This way, the first-come-first-serve strategy will first fill the inboard
tanks equally; if there is any fuel left, it will then fill the outboard
tanks equally, and finally, any remaining fuel goes into the center tank.
- Passengers and cargo will be distributed over all weight nodes whose names
look like they're either passenger spaces or cargo holds. Weight nodes that
contain any of the words "passenger", "cabin", "pax", "class", "baggage" or
"seat" are considered passenger spaces; weight nodes that contain any of the
words "cargo" or "payload" are considered cargo holds.

Then, the algorithm fills them as follows:
1. If no passenger spaces were found, but passengers are to be transported,
it will treat all passengers as cargo (assuming some kind of cargo
aircraft or military transport, where passengers can be carried in the
cargo hold).
2. Then, all cargo is distributed over available cargo holds.
3. If any cargo is left, it is added to the passengers (the idea being that
baggage that doesn't fit in the cargo hold can go into the cabin).
4. The passenger weight is then distributed over the available passenger
spaces.
- If your aircraft requires a custom SimBrief import, simply create a global
Nasal object or namespace named 'simbrief'; the addon will see that and
disable itself.