GPSFileDepot Forums

General Category => Map Making Support => Topic started by: opie on January 08, 2013, 05:47:42 AM

Title: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 08, 2013, 05:47:42 AM
Hi,

I am writing custom mapping tools for use with the Garmin Area 796 aviation GPS (the most recent hw/sw versions) and I have a unique requirement.

I have IMG files that define our survey lines, but depending on the day sometimes I want to see IMG 1 for an hour and then IMG 2 for a while (without being cluttered with IMG 1 anymore).

I know I could produce separate gmapsupp.img files for each use case and put them on different SD cards, but this doesn't scale to the 6 or so layers (IMG files) I want to produce and update daily before we leave the office.

The 796 has a Map Info page where you can select an 'map or mapset' by a given name (but it usually just says cGPSmapper version0100d - which I do a binary search and replace on to the name I want).

The problem is that if I load 6 IMG files into the SD:\map directory they all render ok, but only 1 of 6 show up as a show/hide option on the Map Info page. 

Has anyone run into this before?  Is there another way to load several IMG files without combining/joining them to be able hide/show them at will?

Thanks,
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 08, 2013, 06:12:06 AM
Are you using unique FID numbers for each map? If you just use the default number, they will be grouped together as you describe. I don't know anything about the aviation devices, but the new Garmin handheld models allow you to use any filename you want for a map as long as it is in the \Garmin folder and has a .img file extension.

If you use the "old" way of sending maps to these devices (select tiles from all the different maps in Mapsource and send them to the device in a single file), they will sometimes group everything together also. Try using separate names and separate FID's and see if it works.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Seldom on January 08, 2013, 07:52:18 AM
Like Boyd my experience is limited to handhelds.  What map editor are you using?   What compiler?  All tiles with the same FID will show up on a handheld as a single selectable map.  Unfortunately, to be able to enable and disable individual tiles they will have to be compiled as separate maps with separate FIDs.  You should be able to have multiple (don't know the upper limit) of such individual tiles on the device, but all FIDs you want to show separately will need to also have separate map names (8 digit number) and file names. 

I'm only familiar with cgpsmapper and mkgmap compilers.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 08, 2013, 08:25:47 AM
This tutorial shows you how to set the FID and name using mapsetToolkit: http://www.gpsfiledepot.com/tutorials/how-to-load-.img-files-into-mapsource-with-mapsettoolkit/
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 08, 2013, 09:12:36 AM
Hi all,

Thanks for the feedback.

Perhaps where I have been going wrong is that I am creating the maps from our internal data sources and generate a MP file by hand.  I've been compiling them with the latest version of cGPSmapper and taking the resulting IMG file and placing it on the SD card (in either 'garmin' or 'map'). 

After returning to the cGPSmapper documentation with Boyd's hint at looking at the FID I am trying to learn more about mapsets.

Can you have multiple mapsets installed (assume the newer general use handhelds)?
Can you enable one mapset at a time?

I can figure out how to compile a mapset, for just one of my [IMG] defining MP files at a time and uniquely set the FID and MapSet name - but that will be tomorrow's project.

I've tried following the steps suggested to use mapSetToolkit - but when I look at the resulting mapset-IMG file using GMapTool it doesn't appear to have set a FID at all, and the MapSet Name is missing as the Garmin 796 simply writes 'Card Map' in the Map Info Section.
see output from GMapTool 'details' below:

I also noticed that the Garmin will read the first .IMG file in the map directory (sort alphabetically) and display it, but not others.

This is all complicated stuff, but a challenge, thanks for your help guys

Below is the output from GMapTool - Details page for one of my MP Files -> IMG -> GMapTool to a MapSet (with a single IMG) - it doesn't appear to set the FID properly - am I doing something wrong?

====================================================================
Input file: C:/SGL-Kuwait/PilotMaps/MP_Includes/New Folder/Pads.img.
Reading file C:/SGL-Kuwait/PilotMaps/MP_Includes/New Folder/Pads.img.


File:      C:/SGL-Kuwait/PilotMaps/MP_Includes/New Folder/Pads.img, length 6144
Header:      08.01.2013 20:10:29, DSKIMG, XOR 00, V 0.00, Ms 1
Mapset:      Pads
fat:      400h - 600h - C00h, block 512
maps:      1, sub-files 3

Sub-file         fat     length
09999999 RGN    600h       491
09999999 TRE    800h       588
   map 98967f (9999999)
   date 08.00.2005 20:10:29
   priority 25, parameters 1 1 4 1
   levels [21,22], zoom [83,2]
   N: 30.091896, S: 28.792763, W: 46.577396, E: 48.273067
   cgpsmapper version0100d
   DEFAULT
09999999 LBL    A00h      1153
   CP 1252, map created with cgpsmapper

Map              length s-f  CP    prio  PID   FID  name
09999999 MPC      2232  3  1252   25   



End.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 08, 2013, 09:17:32 AM
If it has a folder named \Map then it probably supports multiple .img files - or at least this is the case on the Nuvi series. Garmin calls these "nMap devices".

Don't know where you are going wrong with MapSetToolking but it works for me when I build large maps. Do you have Basecamp or Mapsource on your computer? If you use MSTK properly, then your maps should appear as separate items on the dropdown menu. like this

(http://www.gpsfiledepot.com/images/articles/image/open-mapsource2.jpg)
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 08, 2013, 10:35:03 AM
I'm not familiar with MapSource or Basemap, but did download it earlier today.  I've just rerun the MSTK and they do in fact appear in Basecamp and are appropriate.  I am also downloading MapSource, but I understand it is deprecated now.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 08, 2013, 11:27:09 AM
Yes, no need to use mapsource unless you are already comfortable with it. If the maps show separately in Basecamp then they *should* be listed individually on the GPS. However different devices each have their own "quirks" and I have no idea what these might be on an aviation device.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: popej on January 08, 2013, 12:23:07 PM
You don't have FID/PID numbers inside your img. You can add them only if you install your map for BaseCamp / Mapsource and then send this map to GPS using Mapsinstall (invoked by BaseCamp or manually) or by Mapsource. This way FID/PID settings created by MapSetToolKit will be added to img.

If you send a map with Mapsource/Mapinstall then you can get proper name in selection menu too.

Next problem you should solve is map ID. In a header of your sources you probably have commands like:

[IMG ID]
...
ID=9999999
...


This ID should be different for each img you create. GPS ignores img with repeated ID.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 08, 2013, 09:05:38 PM
Thanks guys,

I need to come up with as automated a solution as possible to generate daily updated maps for our pilots.  As it is, I have them run a DOS script, which later prompts for the SD card to be inserted, copies the files over and then repeats for X number of SD cards.  Asking the flight crews (who are not technically proficient necessarily) to also use Basecamp would be the thing that stops them from using this tool.

So if I understand right, the only way to set a FID and display name is with Basecamp or Map Source?  If yes, is there a way of scripting this step to load the files on the SD card?

Mapset Toolkit appears to allow for the setting of the FID (by way of creating the MP preview file and letting cGPSmapper compile it).  But when I look at the resulting IMG files the FID isn't set.

Today I will try and create my own preview MP files by hand and compile them using cGPSmapper.  I was reading the docs last night and believe I understand the task at hand

I have also been experimenting with the ID element, trying to make them unique.  The cGPSmapper docs talk about always setting it to 1 - which didn't strike me as right.

Thanks guys!
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: popej on January 08, 2013, 10:17:05 PM
You have to invent your own values. FID number should be in range 1-65000, PID 1-63, map ID nearly anything you like. You simply have to select values that are different than in any other map you are using. Usually choosing at random works good enough ;)

If your map have no search index, than you can create final img using Gmaptool. Just add to your scripts command like:
> gmt -j  -f 800  -m "My map"  -o final.img   Pads.img

This example will create file "final.img" with FID=800, PID=1 and internal name "My map". gmt.exe is command line version of GMaptool and is included in installation.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 09, 2013, 01:40:30 AM
Thanks so much PopeJ and Boyd.  I actually just finished doing a test exactly as you suggested and it worked... and then read your post :)

I can integrate this into my scripts now no problem and the Aera 796 works as expect (as an nMap device). 

On a side note, do you know if anyone has ever produce a test file of all POI / Polygon Type of all the possible types that INCLUDES the aviation types?  I see in the cGPSmapper folder type test for lots of marine stuff, some of which render on the Aera 796. 

If such a thing does not exist, I might endeavor to make one and post it here.

Thanks so much guys,

Owen
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 09, 2013, 04:51:05 AM
If you have an existing map, you could try this program and see if it will do what you want: http://pinns.co.uk/osm/img2typ.html
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 09, 2013, 06:25:52 AM
Thanks Boyd, that is not precisely what I'm looking to do, but it does open up lots of potential.  I'll be making a donation and getting a couple of those tools.

The Area 796 seems very selective about the TYPs it is prepared to render.  For example it does about 20 of the blocks on the marine test IMG file from cGPSmapper.  I will adapt his file to test out the various Aviation datatypes.  I'm not sure if I can extract the aviation database/IMG file from the unit itself to run backwards through the tool you suggested but I'll take a look.

I'm very happy to have found this website/resource.  I fly helicopter mostly and work on this project part time, mostly as a way to build tools to make my job easier.  My background is as a software eng but I don't get to do it much anymore.  I had been working in a bit of a black hole for the past year as I try and figure out how best to build a workflow bridge between two systems (Garmin Aera 696 and 796s and our internal geophysical processing software).

Cheers
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: popej on January 09, 2013, 11:07:54 AM
You can check objects in basemap, this is file gmapbmap.img. I think it include object types specific to aerial GPS.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 10, 2013, 02:28:39 AM
Hmmm.. perhaps I am not as clever as I thought/hoped, but I can't find a copy of gmapbmap.img on the Aera 796.  Is there one I can download somewhere that might show the icons?  I plugged in the 796 with the USB cable and searched the internal memory, but no luck.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 10, 2013, 04:31:07 AM
Since you said the device had a \Map directory, then perhaps it's like the Nuvi which has a hidden directory for critical files named .System

Set your folder options like this and you should see it if it's there.

(http://stephencreek.com/gpsreview/folders.png)

BTW, this would be a good time to do a full backup of the device, including the hidden folder. It's easy to create a big problem by accidentally deleting a file. It will be easy to correct if you have a backup, but a big hassle if you don't.
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 11, 2013, 03:27:42 AM
Hi guys, one more question.

Do you know of a way of forcing the visibility of a mapset to be either On or Off when the GPS boots up.  I've generated several layers worth of data and I'd like some of them to be visible by default and others hidden.

When I 'touch' through to the Map Info page I can turn them on or off there, but I'm thinking about the KML equivalent of the 'open' tag.

Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 11, 2013, 06:06:49 AM
I can't imagine there's anyway to do this. You are limited by whatever features Garmin has put into the firmware. Garmin's new outdoor products have something called "profiles" that let you capture all your settings, including map selection and activate them with a couple screen taps. The Montana goes even further with "shortcuts" which are actually macro's that you can create. Don't know if any of this is supported on an aviation device though. I think it's unique to the Montana series.

BTW, just curious, does your device have a hidden .System folder as described above?
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 18, 2013, 07:07:00 AM
Sorry Boyd, I got busy flying everyday and didn't check back in here till just now.

I accidentally left the GPS in the helicopter tonight, but will check when I am out there next time.  I'm pretty sure that there is a .System folder as I had gone looking for hidden files previously.  I'll let you know what I find.

So far my scripts are working nicely with your guys' help.  I have 5 mapsets for each layer I want to be able to turn on or off depending what kind of flying I am doing or where and then one general gmapsupp.img file with a 'name' element set that tells me how current the data is when I put the card in
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 19, 2013, 04:41:39 AM
Hi Boyd,

Here is what I found in the .System directory.


Volume in drive E is GARMIN
Volume Serial Number is 4D4A-A04C

Directory of E:\.System

06/22/2011  10:06 AM    <DIR>          .
06/22/2011  10:06 AM    <DIR>          ..
01/01/1980  12:00 AM    <DIR>          RemoteSW
08/21/1999  06:04 PM    <DIR>          AVTN
07/16/2008  04:17 AM       207,192,064 gmapbmap.img
09/12/2007  09:03 AM            25,214 drive.ico
11/03/2008  01:29 AM         1,449,472 audio_db.img
12/01/2012  09:09 PM           595,456 gmaptz.img
08/21/1999  06:00 PM                 4 audio_db.sum
08/21/1999  06:01 PM                 4 gmapbmap.sum
08/21/1999  06:01 PM                 4 gmaptz.sum
12/01/2012  09:08 PM                 0 GUPDATE.GCD
               8 File(s)    209,262,218 bytes

Directory of E:\.System\RemoteSW

01/01/1980  12:00 AM    <DIR>          .
01/01/1980  12:00 AM    <DIR>          ..
01/19/2009  02:38 AM            65,536 gxm40sw.bin
04/18/2011  07:50 AM            54,528 006B136200.GCD
09/14/2011  05:08 AM            54,528 006B136201.GCD
03/23/2011  07:30 AM           341,672 006B137900.GCD
01/01/1601  03:00 AM         1,434,113 006B134300.GCD
               5 File(s)      1,950,377 bytes

Directory of E:\.System\AVTN

01/01/1980  12:00 AM    <DIR>          .
01/01/1980  12:00 AM    <DIR>          ..
01/01/1980  12:00 AM    <DIR>          FliteCharts
08/21/1999  06:01 PM                 4 avtn_db.sum
08/21/1999  06:03 PM                 4 terrain.sum
08/21/1999  06:03 PM                 4 obstacle.sum
08/21/1999  06:04 PM                 4 safetaxi.sum
               4 File(s)             16 bytes

Directory of E:\.System\AVTN\FliteCharts

01/01/1980  12:00 AM    <DIR>          .
01/01/1980  12:00 AM    <DIR>          ..
               0 File(s)              0 bytes

Directory of E:\.System\Diag

01/01/1601  03:00 AM    <DIR>          .
01/01/1601  03:00 AM    <DIR>          ..
01/19/2013  03:37 PM    <DIR>          EventLogs
01/19/2013  03:37 PM         2,097,152 sys_log1.bin
               1 File(s)      2,097,152 bytes

Directory of E:\.System\Diag\EventLogs

01/01/1601  03:00 AM    <DIR>          .
01/01/1601  03:00 AM    <DIR>          ..
01/17/2013  10:45 AM           118,578 0000009A.txt
01/18/2013  07:19 AM           117,649 0000009D.txt
01/17/2013  02:52 PM           118,012 0000009C.txt
01/18/2013  08:32 AM           117,680 0000009E.txt
01/18/2013  08:37 AM           117,655 0000009F.txt
01/19/2013  01:17 PM           118,111 000000A0.txt
01/19/2013  03:37 PM           118,078 000000A1.txt
01/17/2013  02:43 PM           118,129 0000009B.txt
               8 File(s)        943,892 bytes

     Total Files Listed:
              26 File(s)    214,253,655 bytes
              16 Dir(s)   3,577,794,560 bytes free
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: Boyd on January 19, 2013, 04:50:07 AM
Cool - thanks for following up. I'll wager that very few people on this site have ever seen an aviation GPS.  :)
Title: Re: Dynamically show/hide multiple IMG files on Garmin 796
Post by: opie on January 27, 2013, 07:21:13 AM
Funny, they are all I've ever used for the past 10 years, never really used the non-aviation models.  When I get a chance I will make a Types test file and see if I can uncover more info on the subset of types that the aviation units will render.

Thanks again,

Owen