Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gnss_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
algorithms
gnss_utils
Commits
11fad89f
Commit
11fad89f
authored
6 years ago
by
Pep Martí Saumell
Browse files
Options
Downloads
Patches
Plain Diff
removed static from getPos and cosmetics
parent
8b84149a
No related branches found
No related tags found
2 merge requests
!4
Resolve "Enable Standard Point Positioning (SPP) computation"
,
!2
Resolve "Enable Standard Point Positioning (SPP) computation"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/gnss_utils/gnss_utils.h
+3
-1
3 additions, 1 deletion
include/gnss_utils/gnss_utils.h
src/CMakeLists.txt
+19
-19
19 additions, 19 deletions
src/CMakeLists.txt
src/gnss_utils.cpp
+35
-32
35 additions, 32 deletions
src/gnss_utils.cpp
with
57 additions
and
52 deletions
include/gnss_utils/gnss_utils.h
+
3
−
1
View file @
11fad89f
...
...
@@ -14,6 +14,8 @@ extern "C"
namespace
GNSSUtils
{
static
int
getPos
(
Observations
obs
,
Navigation
nav
,
sol_t
sol
);
int
getPos
(
const
std
::
shared_ptr
<
Observations
>
&
_observations
,
const
std
::
shared_ptr
<
Navigation
>
&
_navigation
,
sol_t
&
_sol
);
}
#endif
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
19
−
19
View file @
11fad89f
# rtklib path
set
(
rtklib_dir
../deps/RTKLIB
)
set
(
rtklib_src_dir
${
rtklib_dir
}
/src
)
SET
(
RTKLIB_DIR
../deps/RTKLIB
)
SET
(
RTKLIB_SRC_DIR
${
RTKLIB_DIR
}
/src
)
# driver source files
SET
(
sources
SET
(
SOURCES
gnss_utils.cpp
observations.cpp
navigation.cpp
)
SET
(
rtklib_src
${
rtklib_src_dir
}
/pntpos.c
${
rtklib_src_dir
}
/rtkcmn.c
${
rtklib_src_dir
}
/sbas.c
${
rtklib_src_dir
}
/ephemeris.c
${
rtklib_src_dir
}
/preceph.c
${
rtklib_src_dir
}
/qzslex.c
${
rtklib_src_dir
}
/rtcm.c
${
rtklib_src_dir
}
/rtcm2.c
${
rtklib_src_dir
}
/rtcm3.c
${
rtklib_src_dir
}
/rtcm3e.c
${
rtklib_src_dir
}
/ionex.c
${
rtklib_src_dir
}
/rinex.c
)
SET
(
RTKLIB_SRC
${
RTKLIB_SRC_DIR
}
/pntpos.c
${
RTKLIB_SRC_DIR
}
/rtkcmn.c
${
RTKLIB_SRC_DIR
}
/sbas.c
${
RTKLIB_SRC_DIR
}
/ephemeris.c
${
RTKLIB_SRC_DIR
}
/preceph.c
${
RTKLIB_SRC_DIR
}
/qzslex.c
${
RTKLIB_SRC_DIR
}
/rtcm.c
${
RTKLIB_SRC_DIR
}
/rtcm2.c
${
RTKLIB_SRC_DIR
}
/rtcm3.c
${
RTKLIB_SRC_DIR
}
/rtcm3e.c
${
RTKLIB_SRC_DIR
}
/ionex.c
${
RTKLIB_SRC_DIR
}
/rinex.c
)
# application header files
SET
(
headers
SET
(
HEADERS
../include/gnss_utils/gnss_utils.h
../include/gnss_utils/observations.h
../include/gnss_utils/navigation.h
)
...
...
@@ -45,7 +45,7 @@ link_directories(/usr/lib/x86_64-linux-gnu/)
INCLUDE_DIRECTORIES
(
../include/
${
EIGEN3_INCLUDE_DIR
}
${
Boost_INCLUDE_DIRS
}
${
RTK_LIB_PATH
}
)
# create the shared library
ADD_LIBRARY
(
gnss_utils SHARED
${
sources
}
${
rtklib_src
}
)
ADD_LIBRARY
(
gnss_utils SHARED
${
SOURCES
}
${
RTKLIB_SRC
}
)
TARGET_LINK_LIBRARIES
(
gnss_utils
${
Boost_LIBRARIES
}
)
# Installing
...
...
@@ -53,7 +53,7 @@ INSTALL(TARGETS gnss_utils
RUNTIME DESTINATION bin
LIBRARY DESTINATION /usr/local/lib
ARCHIVE DESTINATION lib
)
INSTALL
(
FILES
${
headers
}
DESTINATION include/gnss_utils
)
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/gnss_utils
)
# INSTALL(FILES ../gnss_utils.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
INSTALL
(
FILES ../Findgnss_utils.cmake DESTINATION
${
CMAKE_ROOT
}
/Modules/
)
ADD_SUBDIRECTORY
(
examples
)
This diff is collapsed.
Click to expand it.
src/gnss_utils.cpp
+
35
−
32
View file @
11fad89f
#include
"gnss_utils/gnss_utils.h"
using
namespace
GNSSUtils
;
static
int
getPos
(
Observations
&
observations
,
Navigation
&
navigation
,
sol_t
sol
)
namespace
GNSSUtils
{
// Define observations
std
::
vector
<
obsd_t
>
obs
=
observations
.
getObservations
();
// Define navigation
nav_t
nav
=
navigation
.
getNavigation
();
// Define processing options
prcopt_t
prcopt
=
prcopt_default
;
prcopt
.
mode
=
PMODE_SINGLE
;
prcopt
.
soltype
=
0
;
prcopt
.
nf
=
1
;
prcopt
.
navsys
=
SYS_GPS
;
//prcopt.elmin = 1.05; // 60 degrees = 1.05 rad
prcopt
.
sateph
=
EPHOPT_BRDC
;
prcopt
.
ionoopt
=
IONOOPT_OFF
;
prcopt
.
tropopt
=
TROPOPT_OFF
;
prcopt
.
dynamics
=
0
;
prcopt
.
tidecorr
=
0
;
prcopt
.
sbascorr
=
SBSOPT_FCORR
;
// Define solution
sol_t
solb
=
{{
0
}};
// Define error msg
char
msg
[
128
]
=
""
;
int
stat
=
pntpos
(
&
(
obs
[
0
]),
obs
.
size
(),
&
nav
,
&
prcopt
,
&
solb
,
NULL
,
NULL
,
msg
);
return
stat
;
int
getPos
(
const
std
::
shared_ptr
<
GNSSUtils
::
Observations
>
&
_observations
,
const
std
::
shared_ptr
<
GNSSUtils
::
Navigation
>
&
_navigation
,
sol_t
&
_sol
)
{
// Define observations
std
::
vector
<
obsd_t
>
obs
=
_observations
->
getObservations
();
// Define navigation
nav_t
nav
=
_navigation
->
getNavigation
();
// Define processing options
prcopt_t
prcopt
=
prcopt_default
;
prcopt
.
mode
=
PMODE_SINGLE
;
prcopt
.
soltype
=
0
;
prcopt
.
nf
=
1
;
prcopt
.
navsys
=
SYS_GPS
;
//prcopt.elmin = 1.05; // 60 degrees = 1.05 rad
prcopt
.
sateph
=
EPHOPT_BRDC
;
prcopt
.
ionoopt
=
IONOOPT_OFF
;
prcopt
.
tropopt
=
TROPOPT_OFF
;
prcopt
.
dynamics
=
0
;
prcopt
.
tidecorr
=
0
;
prcopt
.
sbascorr
=
SBSOPT_FCORR
;
// Define solution
sol_t
solb
=
{{
0
}};
// Define error msg
char
msg
[
128
]
=
""
;
int
stat
=
pntpos
(
&
(
obs
[
0
]),
obs
.
size
(),
&
nav
,
&
prcopt
,
&
solb
,
NULL
,
NULL
,
msg
);
return
stat
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment