[Marble-devel] Review Request: First version of flightgear position provider plugin

Ralf Habacker ralf.habacker at gmail.com
Thu May 3 07:42:47 UTC 2012



> On April 30, 2012, 3:09 p.m., Dennis Nienhüser wrote:
> > Looks great, thanks for the patch! :-)
> > 
> > I tested this on Linux (Kubuntu 12.04), where it works flawlessly. The only problem I see is that the dependency (nmea library from http://nmea.sourceforge.net/) is not packaged for e.g. Debian and *buntu, so it's unlikely that distributions will ship the plugin... which would be a pity. Maybe we can find a Debian guy willing to package and maintain it or find a replacement for it in the future.
> > 
> > If anyone else wants to give it a try, you need to start flightgear like this: fgfs --nmea=socket,out,5,localhost,5500,udp
> > A Debian package for the nmea library is at http://nienhueser.de/marble/libnmea/
> > The CMakeLists.txt is a replacement for the Makefile of the library (which didn't behave sane for building a package).
> >

> The CMakeLists.txt is a replacement for the Makefile of the library (which didn't behave sane for building a package).
you may use the one from https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/changes/portage/win32libs-sources/nmealib-src/0008-cmake-support.patch. It builds and install a static library. 

Beside this there are some more nmealib related patches located at https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/changes/portage/win32libs-sources/nmealib-src


> On April 30, 2012, 3:09 p.m., Dennis Nienhüser wrote:
> > src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.cpp, line 144
> > <http://git.reviewboard.kde.org/r/104736/diff/3/?file=58673#file58673line144>
> >
> >     I read this as #ifndef NMEA_TUD_FEED being a version check for nmealib <= 0.5.3.
> >     
> >     Wouldn't the following work as well?
> >     
> >     qreal elevation = m_info.elv;
> >     #ifndef NMEA_TUD_FEED
> >     elevation *= 0.3048;
> >     #endif
> >     
> >     The advantage is that you don't create a "foreign" #define
> >

> I read this as #ifndef NMEA_TUD_FEED being a version check for nmealib <= 0.5.3.
yes, because nmealib do not have a dedicated version macro. 

> The advantage is that you don't create a "foreign" #define
what about moving this hack completly to nmealib ?  I added a related patch at
https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/changes/portage/win32libs-sources/nmealib-src/0009-feet-unit-elevation-fix.patch


> On April 30, 2012, 3:09 p.m., Dennis Nienhüser wrote:
> > cmake/modules/Findnmealib.cmake, line 4
> > <http://git.reviewboard.kde.org/r/104736/diff/3/?file=58669#file58669line4>
> >
> >     For consistency I'd strip the lib postfix everywhere, i.e. use Findnmea.cmake, NMEA_FOUND, ...
> >

consistency to what ? there are Findlibgps.cmake using a lib prefix and some without any prefix or postfix. The original project on sf used nmealib.  


> On April 30, 2012, 3:09 p.m., Dennis Nienhüser wrote:
> > cmake/modules/Findnmealib.cmake, line 9
> > <http://git.reviewboard.kde.org/r/104736/diff/3/?file=58669#file58669line9>
> >
> >     Unless it's taken directly from Kitware, please add your name here for copyright (you can credit Kitware, but not claim copyright for them unless you work for them).
> >

will fix that 


> On April 30, 2012, 3:09 p.m., Dennis Nienhüser wrote:
> > src/plugins/positionprovider/flightgear/CMakeLists.txt, line 3
> > <http://git.reviewboard.kde.org/r/104736/diff/3/?file=58671#file58671line3>
> >
> >     I need a
> >     
> >     INCLUDE_DIRECTORIES(
> >      ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/positionprovider/flightgear
> >      ${CMAKE_BINARY_DIR}/src/plugins/positionprovider/flightgear
> >      ${QT_INCLUDE_DIR}
> >     )
> >     
> >     otherwise the .moc file is not found
> >

will fix that


> On April 30, 2012, 3:09 p.m., Dennis Nienhüser wrote:
> > CMakeLists.txt, line 4
> > <http://git.reviewboard.kde.org/r/104736/diff/3/?file=58668#file58668line4>
> >
> >     Doesn't work here for some reason (cmake doesn't find the Findnmealib.cmake file). I'd suggest simply placing the .cmake file next to the other ones in the marble root folder.
> >

will fix that


- Ralf


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104736/#review13077
-----------------------------------------------------------


On April 27, 2012, 6:27 a.m., Ralf Habacker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104736/
> -----------------------------------------------------------
> 
> (Updated April 27, 2012, 6:27 a.m.)
> 
> 
> Review request for Marble.
> 
> 
> Description
> -------
> 
> When selecting the plugin in the current location panel it starts listen on an udp socket (localhost:5500), which is the default port flightgear uses for exporting map display information. The data send to this port is build as gps data in nmea format.
> 
> The plugin depends on the mnea library http://nmea.sourceforge.net/. The presence of this library is checked on configure time. Building of this plugins only happens when this library is available. 
> 
> On windows the nmea library has been added to the KDE on windows build enviroment. 
> 
> 
> This addresses bug 298785.
>     http://bugs.kde.org/show_bug.cgi?id=298785
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt d6466aa 
>   cmake/modules/Findnmealib.cmake PRE-CREATION 
>   src/plugins/positionprovider/CMakeLists.txt bebe774 
>   src/plugins/positionprovider/flightgear/CMakeLists.txt PRE-CREATION 
>   src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h PRE-CREATION 
>   src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/104736/diff/
> 
> 
> Testing
> -------
> 
> succesfull build and tested on windows 7 with msvc 2010 in debug and release mode
> 
> 
> Thanks,
> 
> Ralf Habacker
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120503/c7970a05/attachment-0001.html>


More information about the Marble-devel mailing list