Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
Marble
Commits
38b00243
Commit
38b00243
authored
Mar 23, 2016
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isnan() is C99 and since we're using C++11 we need std::isnan
parent
db17a941
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp
...gins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp
+8
-8
No files found.
src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp
View file @
38b00243
...
...
@@ -12,7 +12,7 @@
#include "GpsdThread.h"
#include "MarbleDebug.h"
#include <math
.h
>
#include <
c
math>
using
namespace
Marble
;
/* TRANSLATOR Marble::GpsdPositionProviderPlugin */
...
...
@@ -76,7 +76,7 @@ void GpsdPositionProviderPlugin::update( gps_data_t data )
{
PositionProviderStatus
oldStatus
=
m_status
;
GeoDataCoordinates
oldPosition
=
m_position
;
if
(
data
.
status
==
STATUS_NO_FIX
||
isnan
(
data
.
fix
.
longitude
)
||
isnan
(
data
.
fix
.
latitude
)
)
if
(
data
.
status
==
STATUS_NO_FIX
||
std
::
isnan
(
data
.
fix
.
longitude
)
||
std
::
isnan
(
data
.
fix
.
latitude
)
)
m_status
=
PositionProviderStatusAcquiring
;
else
{
m_status
=
PositionProviderStatusAvailable
;
...
...
@@ -88,29 +88,29 @@ void GpsdPositionProviderPlugin::update( gps_data_t data )
m_accuracy
.
level
=
GeoDataAccuracy
::
Detailed
;
#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 )
if
(
!
isnan
(
data
.
fix
.
epx
)
&&
!
isnan
(
data
.
fix
.
epy
)
)
{
if
(
!
std
::
isnan
(
data
.
fix
.
epx
)
&&
!
std
::
isnan
(
data
.
fix
.
epy
)
)
{
m_accuracy
.
horizontal
=
qMax
(
data
.
fix
.
epx
,
data
.
fix
.
epy
);
}
#else
if
(
!
isnan
(
data
.
fix
.
eph
)
)
{
if
(
!
std
::
isnan
(
data
.
fix
.
eph
)
)
{
m_accuracy
.
horizontal
=
data
.
fix
.
eph
;
}
#endif
if
(
!
isnan
(
data
.
fix
.
epv
)
)
{
if
(
!
std
::
isnan
(
data
.
fix
.
epv
)
)
{
m_accuracy
.
vertical
=
data
.
fix
.
epv
;
}
if
(
!
isnan
(
data
.
fix
.
speed
)
)
if
(
!
std
::
isnan
(
data
.
fix
.
speed
)
)
{
m_speed
=
data
.
fix
.
speed
;
}
if
(
!
isnan
(
data
.
fix
.
track
)
)
if
(
!
std
::
isnan
(
data
.
fix
.
track
)
)
{
m_track
=
data
.
fix
.
track
;
}
if
(
!
isnan
(
data
.
fix
.
time
)
)
if
(
!
std
::
isnan
(
data
.
fix
.
time
)
)
{
m_timestamp
=
QDateTime
::
fromMSecsSinceEpoch
(
data
.
fix
.
time
*
1000
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment