Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ardupilot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACS
ardupilot
Commits
a9eec29e
Commit
a9eec29e
authored
10 years ago
by
priseborough
Committed by
Andrew Tridgell
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
DataFlash: Update EKF optical flow data logging
parent
69e86d3e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/DataFlash/DataFlash.h
+6
-5
6 additions, 5 deletions
libraries/DataFlash/DataFlash.h
libraries/DataFlash/LogFile.cpp
+9
-7
9 additions, 7 deletions
libraries/DataFlash/LogFile.cpp
with
15 additions
and
12 deletions
libraries/DataFlash/DataFlash.h
+
6
−
5
View file @
a9eec29e
...
@@ -354,12 +354,13 @@ struct PACKED log_EKF5 {
...
@@ -354,12 +354,13 @@ struct PACKED log_EKF5 {
uint32_t
time_ms
;
uint32_t
time_ms
;
int16_t
FIX
;
int16_t
FIX
;
int16_t
FIY
;
int16_t
FIY
;
int
16
_t
AFI
X
;
u
int
8
_t
normInnovF
X
;
int
16
_t
AFI
Y
;
u
int
8
_t
normInnovF
Y
;
int16_t
gndPos
;
u
int16_t
estHAGL
;
uint8_t
scaler
;
uint8_t
scaler
;
int16_t
RI
;
int16_t
RI
;
uint16_t
range
;
uint16_t
meaRng
;
uint16_t
errHAGL
;
};
};
struct
PACKED
log_Cmd
{
struct
PACKED
log_Cmd
{
...
@@ -531,7 +532,7 @@ struct PACKED log_Esc {
...
@@ -531,7 +532,7 @@ struct PACKED log_Esc {
{ LOG_ESC8_MSG, sizeof(log_Esc), \
{ LOG_ESC8_MSG, sizeof(log_Esc), \
"ESC8", "Icccc", "TimeMS,RPM,Volt,Curr,Temp" }, \
"ESC8", "Icccc", "TimeMS,RPM,Volt,Curr,Temp" }, \
{ LOG_EKF5_MSG, sizeof(log_EKF5), \
{ LOG_EKF5_MSG, sizeof(log_EKF5), \
"EKF5","Ihh
hhc
BcC","TimeMS,FIX,FIY,
AFIX,AFIY,gndPos,fScaler,RI,rng
" }
"EKF5","Ihh
BBC
BcC
C
","TimeMS,FIX,FIY,
SFX,SFY,estHAGL,fScaler,RI,meaRng,errHAGL
" }
#if HAL_CPU_CLASS >= HAL_CPU_CLASS_75
#if HAL_CPU_CLASS >= HAL_CPU_CLASS_75
#define LOG_COMMON_STRUCTURES LOG_BASE_STRUCTURES, LOG_EXTRA_STRUCTURES
#define LOG_COMMON_STRUCTURES LOG_BASE_STRUCTURES, LOG_EXTRA_STRUCTURES
...
...
This diff is collapsed.
Click to expand it.
libraries/DataFlash/LogFile.cpp
+
9
−
7
View file @
a9eec29e
...
@@ -1009,23 +1009,25 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
...
@@ -1009,23 +1009,25 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
// Write fifth EKF packet
// Write fifth EKF packet
if
(
optFlowEnabled
)
{
if
(
optFlowEnabled
)
{
float
fscale
;
float
fscale
;
float
gndPos
;
float
estHAGL
;
float
flowInnovX
,
flowInnovY
;
float
flowInnovX
,
flowInnovY
;
float
augFlowInnovX
,
augFlowInnov
Y
;
float
flowVarX
,
flowVar
Y
;
float
rngInnov
;
float
rngInnov
;
float
range
;
float
range
;
ahrs
.
get_NavEKF
().
getFlowDebug
(
fscale
,
gndPos
,
flowInnovX
,
flowInnovY
,
augFlowInnovX
,
augFlowInnovY
,
rngInnov
,
range
);
float
gndOffsetErr
;
ahrs
.
get_NavEKF
().
getFlowDebug
(
fscale
,
estHAGL
,
flowInnovX
,
flowInnovY
,
flowVarX
,
flowVarY
,
rngInnov
,
range
,
gndOffsetErr
);
struct
log_EKF5
pkt5
=
{
struct
log_EKF5
pkt5
=
{
LOG_PACKET_HEADER_INIT
(
LOG_EKF5_MSG
),
LOG_PACKET_HEADER_INIT
(
LOG_EKF5_MSG
),
time_ms
:
hal
.
scheduler
->
millis
(),
time_ms
:
hal
.
scheduler
->
millis
(),
FIX
:
(
int16_t
)(
1000
*
flowInnovX
),
FIX
:
(
int16_t
)(
1000
*
flowInnovX
),
FIY
:
(
int16_t
)(
1000
*
flowInnovY
),
FIY
:
(
int16_t
)(
1000
*
flowInnovY
),
AFIX
:
(
int
16
_t
)(
100
0
*
augFlowInnovX
),
normInnovFX
:
min
((
u
int
8
_t
)(
100
*
flowVarX
),
255
),
AFIY
:
(
int
16
_t
)(
100
0
*
augFlowInnovY
),
normInnovFY
:
min
((
u
int
8
_t
)(
100
*
flowVarY
),
255
),
gndPos
:
(
int16_t
)(
100
*
gndPos
),
estHAGL
:
(
u
int16_t
)(
100
*
estHAGL
),
scaler:
(
uint8_t
)(
100
*
fscale
),
scaler:
(
uint8_t
)(
100
*
fscale
),
RI
:
(
int16_t
)(
100
*
rngInnov
),
RI
:
(
int16_t
)(
100
*
rngInnov
),
range
:
(
uint16_t
)(
100
*
range
)
meaRng
:
(
uint16_t
)(
100
*
range
),
errHAGL
:
(
uint16_t
)(
100
*
gndOffsetErr
)
};
};
WriteBlock
(
&
pkt5
,
sizeof
(
pkt5
));
WriteBlock
(
&
pkt5
,
sizeof
(
pkt5
));
}
}
...
...
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