Board index FlightGear Development New features

Welcome to MapGear.py!

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Welcome to MapGear.py!

Postby Zequinha » Sat Feb 25, 2017 9:57 pm

MapGear is a python 3 post-processing routine to create animations of the flight path that is stored in fg_log.csv. The animation can be viewed on screen or stored in a file (GIF or MP4). It makes direct use of Basemap toolkit, so the customization power is huge. It can also be used as a tool to measure the total length of your flightpath.

Here's some screenshots:
Image

You can clearly see in the route below that my autopilot was off!

Image

In the next one I turned it on!

Image

Image

Short youtube tutorial: https://www.youtube.com/watch?v=0BaVbCtOr3E


MapGear.py can:

-Create the maps and animations of flight paths (providing basemap toolkit/geopy functionality);

-Calculate and display total distance travelled;

-Display automatically the cities according to their population (cities with less population will show in 'zoomed in' maps).

License: GPL v2+

Link to download MapGear: https://github.com/crazyBaboon/MapGear

How to use:

1.Extract the contents of MapGear-master.zip into your /home folder.

2.Run in the terminal:
Code: Select all
fgfs --launcher  && python MapGear.py

In order to save .GIF files, uncomment the last line of the script. Note: it will take a few minutes to save the .GIF file. Also, make sure you have Debug > Logging enabled, so you can log the lat/lon of your route. MapGear.py will automatically save all of your routes in your \home folder under the names fg_log-1.csv, fg_log-2.csv, fg_log-3.csv,...

3.When you exit FlightGear, wait a few seconds and you will see the animated path of your journey.


Stay tuned for updates!



Any feedback/help/sugestions/feature requests are appreciated!
Last edited by Zequinha on Fri Sep 01, 2017 10:06 am, edited 77 times in total.
Zequinha
 
Posts: 204
Joined: Sun Mar 13, 2016 5:26 pm
OS: GNU

Re: Welcome to MapGear!

Postby yanes » Sat Feb 25, 2017 10:31 pm

thank you for your effort , the idea seems to be nice ,
some scr-shots can be very helpful , please submit if you have some (even for the output vids or some console window snapshot may).
I don't have most packages (numpy,mpl_toolkits.basemap,matplotlib) on my system , please tell me how to fast install,
I know it's a python installation matter but you can help ,
Thanks again ,
can't wait to test
Yanes Bechir .
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Welcome to MapGear!

Postby Zequinha » Sun Feb 26, 2017 11:33 am

Thanks for your interest Yanes!

You need to install quite a few python libraries:
-Basemap
-Matplotlib
-Pandas
-Numpy

The code is written for python 3. I think it can also be used for python 2 but you will have to install Pandas, Numpy... for python 2!

In addition you need to have the program 'imagemagick' installed if you can create animated .gif.

I assume you are using GNU/Linux, so you can just install this stuff from the software centre (I did it like that).

Hope that helps. Let me know if you have any problems!
Last edited by Zequinha on Sun Feb 26, 2017 11:08 pm, edited 3 times in total.
Zequinha
 
Posts: 204
Joined: Sun Mar 13, 2016 5:26 pm
OS: GNU

Re: Welcome to MapGear!

Postby Hooray » Sun Feb 26, 2017 11:38 am

feel free to create a corresponding wiki article and add an announcement to the FlightGear newsletter.

PS: Note that there's so called "fgtape" files (see the wiki for details), as well as other ways to obtain a corresponding flight path, e.g. from a live/running fgfs instance, see Torsten's Phi work and the underlying AJAX APIs
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Welcome to MapGear.py!

Postby Zequinha » Sun Feb 26, 2017 12:27 pm

Thanks Hooray,

I've updated the announcment to make it clear that this is a post-processing utility, at least in the foreseable future!

What are the advantages of "fgtape" files could offer over the fg_log.csv, from a MapGear.py perspective?
Zequinha
 
Posts: 204
Joined: Sun Mar 13, 2016 5:26 pm
OS: GNU

Re: Welcome to MapGear.py!

Postby Johan G » Sun Feb 26, 2017 5:12 pm

Zequinha wrote in Sun Feb 26, 2017 12:27 pm:What are the advantages of "fgtape" files could offer over the fg_log.csv, from a MapGear.py perspective?

Pretty much none. The fgtape files are both binary and, in general, aircraft specific. They are primarily used for instant replay, but can also be used for replaying someone else's flight, provided one have the same aircraft installed.

For details on instant replay and fgtape files, see the wiki article Instant Replay (perm) and the readme file $FG_ROOT/Docs/README.flightrecorder (where $FG_ROOT is the "data" directory in your FlightGear installation).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Welcome to MapGear.py!

Postby Zequinha » Sun Mar 19, 2017 1:33 am

I was thinking of using Cartopy for detailed 'zoomed in' maps. However this is proving to be difficult. One of the reasons is that the default images that come with Cartopy such as stock_img() are only available in low resolution. There are other problems as well. Help on how to use Cartopy for high resolution zoomed in maps would be greatly appreciated!
Zequinha
 
Posts: 204
Joined: Sun Mar 13, 2016 5:26 pm
OS: GNU

Re: Welcome to MapGear.py!

Postby Hooray » Sun Mar 19, 2017 4:39 pm

I don't know anything about the state of the internal Qt5 launcher - but if it has any support for pre-recorded flights, replay tapes and/or tutorials, those images would be nice to show while picking one of these - e.g. by pre-creating those and shipping them as part of the base package, so that people can directly see the path of a flight/tutorial.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Welcome to MapGear.py!

Postby Zequinha » Sat Mar 25, 2017 11:17 am

Thanks Hooray for your interest!

I have changed the license of the script to GPLv2+, in the possibility of someone wanting to integrate it with flightgear.
Zequinha
 
Posts: 204
Joined: Sun Mar 13, 2016 5:26 pm
OS: GNU


Return to New features

Who is online

Users browsing this forum: No registered users and 5 guests