Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
mobile_robotics
wolf_projects
wolf_lib
plugins
gnss
Commits
9ceeffb2
Commit
9ceeffb2
authored
2 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Use derived state blocks
parent
13675fd4
No related branches found
No related tags found
2 merge requests
!39
devel->main
,
!38
Resolve "follow core 465 Migrate from StateBlock to StateDerived"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/capture/capture_gnss.cpp
+5
-5
5 additions, 5 deletions
src/capture/capture_gnss.cpp
src/sensor/sensor_gnss.cpp
+7
-7
7 additions, 7 deletions
src/sensor/sensor_gnss.cpp
with
12 additions
and
12 deletions
src/capture/capture_gnss.cpp
+
5
−
5
View file @
9ceeffb2
...
...
@@ -20,7 +20,7 @@
//
//--------LICENSE_END--------
#include
"gnss/capture/capture_gnss.h"
#include
<core/state_block/state_block_derived.h>
namespace
wolf
{
...
...
@@ -30,18 +30,18 @@ CaptureGnss::CaptureGnss(const TimeStamp& _ts, SensorBasePtr _sensor_ptr, GnssUt
{
// Clock bias
assert
(
_sensor_ptr
->
getStateBlock
(
'T'
)
!=
nullptr
and
_sensor_ptr
->
isStateBlockDynamic
(
'T'
));
addStateBlock
(
'T'
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
nullptr
);
addStateBlock
(
'T'
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
()
,
true
),
nullptr
);
// interconstellation clock bias
assert
(
_sensor_ptr
->
getStateBlock
(
'G'
)
!=
nullptr
);
if
(
_sensor_ptr
->
isStateBlockDynamic
(
'G'
))
addStateBlock
(
'G'
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
nullptr
);
addStateBlock
(
'G'
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
()
,
true
),
nullptr
);
assert
(
_sensor_ptr
->
getStateBlock
(
'E'
)
!=
nullptr
);
if
(
_sensor_ptr
->
isStateBlockDynamic
(
'E'
))
addStateBlock
(
'E'
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
nullptr
);
addStateBlock
(
'E'
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
()
,
true
),
nullptr
);
assert
(
_sensor_ptr
->
getStateBlock
(
'M'
)
!=
nullptr
);
if
(
_sensor_ptr
->
isStateBlockDynamic
(
'M'
))
addStateBlock
(
'M'
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
nullptr
);
addStateBlock
(
'M'
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
()
,
true
),
nullptr
);
}
...
...
This diff is collapsed.
Click to expand it.
src/sensor/sensor_gnss.cpp
+
7
−
7
View file @
9ceeffb2
...
...
@@ -20,7 +20,7 @@
//
//--------LICENSE_END--------
#include
"gnss/sensor/sensor_gnss.h"
#include
"
core/state_block/state_block.h
"
#include
<
core/state_block/state_block
_derived
.h
>
#include
"core/state_block/state_angle.h"
#include
"gnss_utils/gnss_utils.h"
#include
"gnss_utils/utils/transformations.h"
...
...
@@ -31,7 +31,7 @@ SensorGnss::SensorGnss(const Eigen::VectorXd& _extrinsics,
const
ParamsSensorGnssPtr
&
_params
)
:
SensorBase
(
"SensorGnss"
,
std
::
make_shared
<
State
Block
>
(
_extrinsics
,
_params
->
extrinsics_fixed
),
std
::
make_shared
<
State
Point3d
>
(
_extrinsics
,
_params
->
extrinsics_fixed
),
nullptr
,
// antena orientation has no sense in GNSS
nullptr
,
// SensorParams are set afterwards
0
),
...
...
@@ -46,15 +46,15 @@ SensorGnss::SensorGnss(const Eigen::VectorXd& _extrinsics,
// STATE BLOCKS
// ENU-MAP
addStateBlock
(
't'
,
std
::
make_shared
<
State
Block
>
(
3
,
params_
->
translation_fixed
),
false
);
addStateBlock
(
't'
,
std
::
make_shared
<
State
Point3d
>
(
Vector3d
::
Zero
()
,
params_
->
translation_fixed
),
false
);
addStateBlock
(
'r'
,
std
::
make_shared
<
StateAngle
>
(
0.0
,
params_
->
roll_fixed
),
false
);
addStateBlock
(
'p'
,
std
::
make_shared
<
StateAngle
>
(
0.0
,
params_
->
pitch_fixed
),
false
);
addStateBlock
(
'y'
,
std
::
make_shared
<
StateAngle
>
(
0.0
,
params_
->
yaw_fixed
),
false
);
// clock bias
addStateBlock
(
CLOCK_BIAS_KEY
,
std
::
make_shared
<
State
Block
>
(
1
,
false
),
true
);
// receiver clock bias
addStateBlock
(
CLOCK_BIAS_GPS_GLO_KEY
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
params_
->
clock_bias_GPS_GLO_dynamic
);
// GPS-GLO clock bias
addStateBlock
(
CLOCK_BIAS_GPS_GAL_KEY
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
params_
->
clock_bias_GPS_GAL_dynamic
);
// GPS-GAL clock bias
addStateBlock
(
CLOCK_BIAS_GPS_CMP_KEY
,
std
::
make_shared
<
State
Block
>
(
1
,
true
),
params_
->
clock_bias_GPS_CMP_dynamic
);
// GPS-CMP clock bias
addStateBlock
(
CLOCK_BIAS_KEY
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
::
Zero
()
,
false
),
true
);
// receiver clock bias
addStateBlock
(
CLOCK_BIAS_GPS_GLO_KEY
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
::
Zero
()
,
true
),
params_
->
clock_bias_GPS_GLO_dynamic
);
// GPS-GLO clock bias
addStateBlock
(
CLOCK_BIAS_GPS_GAL_KEY
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
::
Zero
()
,
true
),
params_
->
clock_bias_GPS_GAL_dynamic
);
// GPS-GAL clock bias
addStateBlock
(
CLOCK_BIAS_GPS_CMP_KEY
,
std
::
make_shared
<
State
Params1
>
(
Vector1d
::
Zero
()
,
true
),
params_
->
clock_bias_GPS_CMP_dynamic
);
// GPS-CMP clock bias
// ENU-ECEF
// Mode "manual": ENU provided via params
...
...
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