Compare commits

6 Commits
HEAD ... master

Author SHA1 Message Date
Slawek Mikula
865c1e465f - removed gitignore 2020-12-26 00:42:16 +01:00
Slawek Mikula
65e05fcb7d - addon-metadata.xml - fixing text format, added maintainer info 2020-12-15 01:14:06 +01:00
Slawek Mikula
944f021984 - add PL translations
- addon-main.nas - simplify addon detection
2020-07-26 21:52:45 +02:00
Slawek Mikula
cd4bc2bdd5 - documentation/usage completed 2020-01-01 15:29:05 +01:00
Slawek Mikula
8ade83d167 - refactoring to the current addon specification
- usage documentation
2019-12-26 23:57:00 +01:00
Slawek Mikula
72353f340d - cleaned todo file 2019-10-16 10:31:47 +02:00
18 changed files with 208 additions and 107 deletions

1
.gitignore vendored
View File

@@ -1 +0,0 @@
/.project

View File

@@ -5,37 +5,16 @@
var main = func( addon ) {
var root = addon.basePath;
var my_addon_id = "com.slawekmikula.flightgear.VfrNavigator";
var my_version = getprop("/addons/by-id/" ~ my_addon_id ~ "/version");
var my_root_path = getprop("/addons/by-id/" ~ my_addon_id ~ "/path");
var my_addon_id = addon.id;
var my_settings_root_path = "/addons/by-id/" ~ my_addon_id ~ "/addon-devel/";
var dialogs = ["vfrmap-settings", "vfrmap", "vfrstarter", "vfrtable"];
forindex (var i; dialogs) {
gui.Dialog.new("/sim/gui/dialogs/" ~ dialogs[i] ~ "/dialog", my_root_path ~ "/gui/" ~ dialogs[i] ~ ".xml");
}
var data = {
label : "VFR Starter",
name : "vfrstarter",
binding : { command : "dialog-show", "dialog-name" : "vfrstarter" },
enabled : "true",
};
foreach(var item; props.getNode("/sim/menubar/default/menu[2]").getChildren("item")) {
if (item.getValue("name") == "vfrstarter") {
return;
}
}
props.globals.getNode("/sim/menubar/default/menu[2]").addChild("item").setValues(data);
fgcommand("gui-redraw");
# persistent save of enable flag
props.globals.getNode(my_settings_root_path ~ "/showvfrstarter", 1).setAttribute("userarchive", "y");
var fdm_init_listener = _setlistener("/sim/signals/fdm-initialized", func {
removelistener(fdm_init_listener);
if (getprop("/addons/by-id/" ~ my_addon_id ~ "/showvfrstarter") == 1) {
if (getprop(my_settings_root_path ~ "/showvfrstarter") == 1) {
gui.showDialog("vfrstarter");
}
});
@@ -43,7 +22,7 @@ var main = func( addon ) {
var reinit_listener = _setlistener("/sim/signals/reinit", func {
removelistener(reinit_listener);
if (getprop("/addons/by-id/" ~ my_addon_id ~ "/showvfrstarter") == 1) {
if (getprop(my_settings_root_path ~ "/showvfrstarter") == 1) {
gui.showDialog("vfrstarter");
}
});

22
addon-menubar-items.xml Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<meta>
<file-type type="string">FlightGear add-on menu bar items</file-type>
<format-version type="int">1</format-version>
</meta>
<menubar-items>
<menu>
<label>Add-on</label>
<enabled type="bool">true</enabled>
<item>
<label>VFR Starter</label>
<binding>
<command>dialog-show</command>
<dialog-name>vfrstarter</dialog-name>
</binding>
</item>
</menu>
</menubar-items>
</PropertyList>

View File

@@ -1,71 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<meta>
<file-type type="string">FlightGear add-on metadata</file-type>
<format-version type="int">1</format-version>
</meta>
<meta>
<file-type type="string">FlightGear add-on metadata</file-type>
<format-version type="int">1</format-version>
</meta>
<addon>
<identifier type="string">com.slawekmikula.flightgear.VfrNavigator</identifier>
<name type="string">VFR Navigator</name>
<version type="string">1.0.0</version>
<addon>
<identifier type="string">com.slawekmikula.flightgear.VfrNavigator</identifier>
<name type="string">VFR Navigator</name>
<version type="string">1.1.0</version>
<authors>
<author>
<name type="string">slawekmikula from the FlightGear forum</name>
<email type="string"></email>
<url type="string"></url>
</author>
</authors>
<authors>
<author>
<name type="string">slawekmikula from the FlightGear forum</name>
<email type="string">slawek.mikula@gmail.com</email>
<url type="string"></url>
</author>
</authors>
<short-description type="string">
VFR Navigator Helper
</short-description>
<maintainers>
<maintainer>
<name type="string">slawekmikula from the FlightGear forum</name>
<email type="string">slawek.mikula@gmail.com</email>
<url type="string"></url>
</maintainer>
</maintainers>
<long-description type="string">
VFR helper dialogs
</long-description>
<short-description type="string">VFR Navigator Helper</short-description>
<long-description type="string">This add-on provides quick access menu to access common views and shortcuts with modified version of the map view especially for small resolution displays.</long-description>
<license>
<designation type="string">
GNU GPL version 2 or later
</designation>
<localized>
<pl>
<short-description type="string">Pomoc w nawigacji VFR</short-description>
<long-description type="string">To rozszerzenie dostarcza menu szybkiego dostępu do przydatnych widoków i skrótów dostępu wraz ze zmodyfikowanym widokiem mapy dostosowanym specyficznie dla wyświetlaczy o niskich rozdzielczościach.</long-description>
</pl>
</localized>
<file type="string">
LICENSE
</file>
<license>
<designation type="string">GNU GPL version 2 or later</designation>
<file type="string">LICENSE</file>
<url type="string">https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html</url>
</license>
<url type="string">
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
</url>
</license>
<min-FG-version type="string">2018.3.0</min-FG-version>
<max-FG-version type="string">none</max-FG-version>
<min-FG-version type="string">2018.3.0</min-FG-version>
<max-FG-version type="string">none</max-FG-version>
<urls>
<home-page type="string"><![CDATA[ https://forum.flightgear.org/viewtopic.php?f=0&t=0 ]]></home-page>
<download type="string">https://github.com/slawekmikula/fg-addon-vfrnavigator/download</download>
<support type="string">https://github.com/slawekmikula/fg-addon-vfrnavigator/issues</support>
<code-repository type="string">https://github.com/slawekmikula/fg-addon-vfrnavigator</code-repository>
</urls>
<urls>
<home-page type="string">
<![CDATA[ https://forum.flightgear.org/viewtopic.php?f=0&t=0 ]]>
</home-page>
<download type="string">
https://github.com/slawekmikula/fg-addon-vfrnavigator/download
</download>
<support type="string">
http://wiki.flightgear.org/addon-vfrnavigator
</support>
<code-repository type="string">
https://github.com/slawekmikula/fg-addon-vfrnavigator
</code-repository>
</urls>
<tags>
<tag type="string">vfr</tag>
<tag type="string">map</tag>
<tag type="string">flightplan</tag>
</tags>
</addon>
<tags>
<tag type="string">vfr</tag>
<tag type="string">map</tag>
<tag type="string">flightplan</tag>
</tags>
</addon>
</PropertyList>

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1009 KiB

After

Width:  |  Height:  |  Size: 1009 KiB

View File

Before

Width:  |  Height:  |  Size: 871 KiB

After

Width:  |  Height:  |  Size: 871 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

113
doc/usage.md Normal file
View File

@@ -0,0 +1,113 @@
This is FlightGear VFR flight helper add-on. It helps with VFR flights by
offering simplified map, route manager interface and helpers to get quickly to
most common settings.
Normally I use it after planning the route in the external route planners (e.g.
LittleNavMap or VfrFlight). Then export the data in gpx/fgfs format and import
it on the start or during the simulation in the route manager window. Then it
is used for navigation helper and to check how the planned route is performing.
# Add-on usage
Addon creates quickaccess toolbar to access most used functions during the VFR
flight. When enabled and configured the add-on places several additional windows
on top of the simulator window. From it you can track current progress with the
route, which can be imported with the Qt Launcher interface or via the route
manager interface in the simulator.
![alt quickmenu](screens/vfr_overview2.png "Overview")
On this window, add-on places two windows - smallmap with additional route
information and route plan.
**TIP:** After importing flight plan do not forget to activate it in the route manager
window. Without it, Flightgear won't be able to automatically switch between
waypoints.
**NOTE:** At the Overview window in the right lower corner, there is a control
visualization from FGCamera addon (I mostly fly with the double mouse configuration
and it is handy to see current yoke position when using mouse control)
# General interface
Addon creates it's `VFR Starter` menu in the Add-On main menu (the last menu in
the interface). If you can't see the main menu try pressing `F10` to reveal hidden
menu.
![alt quickmenu](screens/vfr_mainmenu.png "Main menu ")
When selecting `VFR Starter` from the menu, the quick view appears. It is a launcher
to most common used items needed for the flight.
![alt quickmenu](screens/vfr_quickmenu.png "Quick Menu")
* **MP** - Small Map - shows small map in the lower left corner.
* **PL** - Flight Plan - displays flight plan route with information about current route leg
* **SW** - Stopwatch - shows default stopwatch
* **R** - Radio interface - shows default radio interface
* **A** - ATC in range - displays ATC Stations in current aircraft range
* **RM** - Route Manager - displays Route Manager interface
* **X** - closes the quick access menu
Addon remembers the state of the quick access menu. When you close the simulator
with the quick start open, it opens on the next start.
# Small map
Small map is a variation of the normal map available in the main menu (Equipment -> Map).
It does not contain setting on the same screen, but has additional information
about current route leg and environment. It can be resized to smaller area than
normal map especially useful for lower resolution screens during the simulation.
**INFO:** This map shares its settings with the main map, so setting visibility in one
view affects the other.
![alt quickmenu](screens/vfr_smallmap.png "Small map")
On the top of the map the buttons have following meaning:
* **CONFIG** - access to the map configuration window
* **-/+** - zoom in/out of the current map view
* **C** - center view on the aircraft
* **X** - close the map window
Below the map there are several labels with the information lined in the
following order:
**Waypoint | Bearing | Distance | ETA | Wind DIRECTION/STRENGTH**
* **Waypoint** - current active waypoint
* **Bearing** - bearing from current position the current waypoint
* **Distance** - distance (in nm) to the current waypoint
* **ETA** - Estimated Time of Arrival to the current waypoint
* **Wind Direction/Strength** - current wind situation (120/13 -> wind from direction 120 with speed 13 knots)
After clicking `CONFIG` the standard configuration for the map view appears,
in which you can configure visibility and window behaviour.
![alt quickmenu](screens/vfr_smallmap_settings.png "Small map - settings")
# Flightplan
After clicking `PL` on the main quick access menu, the flightplan window appears.
It is a window with the current loaded flightplan list (via the `Route Manager`).
![alt quickmenu](screens/vfr_flightplan.png "Flight plan")
On the top line, there is a place for information about: Current waypoint name,
distance and ETA to this waypoint. If the time is not possible to calculate, the
place is empty.
# Stopwatch/Radio Interface/ATC in Range/Route Manager
These are standard instruments/devices/windows available in the flightgear
simulator. It is only a quick access window to this data.
# Support/Development
Look on the github page https://github.com/slawekmikula/fg-addon-vfrnavigator.
Post there issues, requests for new features and by all means fork it, modify and
provide pull requests :)
Have fun.

View File

@@ -15,11 +15,11 @@
<nasal>
<open>
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/showvfrstarter", 1);
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/addon-devel/showvfrstarter", 1);
</open>
<close>
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/showvfrstarter", 0);
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/addon-devel/showvfrstarter", 0);
</close>
</nasal>

View File

@@ -1,39 +1,37 @@
# About
Flightgear VFR flight helper. Mostly helps with VFR flights offering map, route manager interface and helpers to get quickly to most common settings
Flightgear VFR flight helper. Helps with VFR flights by offering simplified map,
route manager interface and helpers to get quickly to most common settings.
# Running
- extract zip (if downloaded as a zip) to a given location. For example let's say we have /myfolder/addons/vfrnavigator with contents of the navigator addon.
- run flightgear with --addon directive. WARNING this is not "additional settings" window in the launcher ! you have to modify windows shortcut or linux startup script for example to looks like this (in linux):
* extract zip (if downloaded as a zip) to a given location. For example
let's say we have /myfolder/addons/vfrnavigator with contents of the navigator
addon.
* run flightgear with --addon directive as in the example below or use Launcher
and go to "Add-Ons" section. There add this addon folder to Add-Ons and enable
it (checkbox at the line of the addon).
Code:
```
./fgbin/bin/fgfs --fg-root=./fgdata --launcher --prop:/sim/fg-home=/myfolder/flightgear/fghome --addon="/myfolder/addons/vfrnavigator"
fgfs --fg-root=./fgdata --launcher --prop:/sim/fg-home=/myfolder/flightgear/fghome --addon="/myfolder/addons/vfrnavigator"
```
# Running
In main menu Position -> VFR Starter. When activated small window will appear in the upper right corner with links to most common used functions:
* MP - map - small map in lower left corner with route navigation, access to configuration (config button), zoom settings (buttons +/-) and quick action center on the aircraft (C button). On the bottom you can see information about current waypoint name, bearing (B), distance (D), ETA and wind direction/speed (W).
* PL - flightplan - in upper left corner
* SW - stopwatch
* R - radio panel
* A - ATC in ranges search
* RM - route manager activation
In main menu Position -> VFR Starter. When activated small window will appear
in the upper right corner with links to most common used functions. More info
in the document `usage` in the doc folder.
# History
- 1.0.0 - first public version on github
* 1.0.0 - first public version on github
* 1.1.0 - structure and initialization changes according to add-ons API manual,
usage documentation
# Authors
- Slawek Mikula - source code
# Links
* Slawek Mikula - source code
# License

View File

@@ -1 +0,0 @@