Garmin GPSMap 196

From FlightGear wiki
Jump to navigation Jump to search

The Garmin GPSMAP 196 is a portable GPS receiver with a 4.5‑inch grayscale display. It includes a built‑in basemap and supports additional map data via data cards. The device provides waypoint and route management, an aviation mode with direct‑to navigation and airport search, and an E6B flight calculator. It runs on batteries and uses a button‑based interface.

Usage

First, press the red power button to turn on the device.

Press the Page key to switch pages, press the Quit key to go back to the previous level, and press the Menu key to access the menu and settings. You can use the arrow keys to select buttons. Press the In and Out keys to zoom in and out on the map.

You can press the power button twice to turn on the screen backlight when turning on.

Development

Design

The basic idea is to use concepts from the Avidyne/Entegra (extra500) code to encapsulate the most important common MFD components, such as having a single MFDisplay class that contains helpers for registering buttons, mapping those to modes, and mapping modes to Pages, where each page may contain an arbitrary number of PageElements. Instruments (animated SVGs) would then be registered as PageElements and animated through properties and transformations.

var MFDisplay = {};
var MFDButton = {}
var MFDMode = {}
var MFDPage = {};
var MFDPageElement = {};

var GPSMap196 = MFDDisplay.new();

Instruments

GPSMap196 Instrument page (SVG driven), via Canvas and Nasal
F-JJTH has updated the SVG file implementing the panel page for the Garmin GPSMap 196
Protoyping the G196 instrument display using wikimedia/commons SVG images and the unmodified Canvas SVG parser as per [1]

It would make sense to look up each element ID and animate those by associating a Nasal timer with a callback.


var SVGElement = {};
var SVGInstrument = {};

# look up by ID
# set up animation callback via timer/listener
# in a foreach loop

Testing & Patches

F-JJTH's GPSMap196 in the process of being ported to Canvas using Philosopher's MapStructure framework for mapping (LOD/scaling not applied here, but available) - see [2]
MapStructure layers integrated in GPSMap196 with some custom styling applied
GPSMap196 with MapStructure layers (currently exhibiting some scaling/LOD issues due to hard-coded assumptions in some of the layers)

Here's the diff for testing the modified instrument, use "git apply" to apply the patch (in $FG_ROOT) and then start fgfs with --aircraft=DR400-dauphin

diff --git a/Aircraft/DR400-dauphin/Models/Interior/panel.xml b/Aircraft/DR400-dauphin/Models/Interior/panel.xml
index b9d9551..4b5e42d 100644
--- a/Aircraft/DR400-dauphin/Models/Interior/panel.xml
+++ b/Aircraft/DR400-dauphin/Models/Interior/panel.xml
@@ -10,6 +10,18 @@
 
 <PropertyList>
 
+  <model>
+    <path>Aircraft/Instruments-3d/GPSmap196/gpsmap196.xml</path>
+    <offsets>
+      <x-m>  0.60 </x-m>
+      <y-m> -0.202 </y-m>
+      <z-m>  0.28 </z-m>
+      <roll-deg>    0.0 </roll-deg>
+      <pitch-deg> -5.0 </pitch-deg>
+      <heading-deg> 0.0 </heading-deg>
+    </offsets>
+  </model>
+
   <!-- Based on http://www.aeroclub-montpellier.com/flotte/F-GOZZ/Tableau.jpg -->
 
   <!-- ################################################################-->
diff --git a/Aircraft/DR400-dauphin/dr400-dauphin-set.xml b/Aircraft/DR400-dauphin/dr400-dauphin-set.xml
index 66494b9..5641243 100644
--- a/Aircraft/DR400-dauphin/dr400-dauphin-set.xml
+++ b/Aircraft/DR400-dauphin/dr400-dauphin-set.xml
@@ -390,6 +390,9 @@
   </instrumentation>
 
   <nasal>
+    <gpsmap196>
+      <file>Aircraft/Instruments-3d/GPSmap196/gpsmap196.nas</file>
+    </gpsmap196>
     <dr400>
       <file>Aircraft/DR400-dauphin/Nasal/physics.nas</file>
       <file>Aircraft/DR400-dauphin/Nasal/light.nas</file>

Related content

Forum topics

Source code

External links