Skip to content

Commit

Permalink
[modules][messages] DC_INFO: add course additionally to heading
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Dec 3, 2014
1 parent dac8d85 commit f54a456
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/messages.xml
Expand Up @@ -915,6 +915,7 @@
<field name="phi" type="int16" unit="decideg">Euler angle around x-axis (roll)</field>
<field name="theta" type="int16" unit="decideg">Euler angle around y-axis (pitch)</field>
<field name="psi" type="int16" unit="decideg">Euler angle around z-axis (yaw)</field>
<field name="course" type="int16" unit="decideg">Course over ground (CW/north)</field>
<field name="speed" type="uint16" unit="cm/s">horizontal ground speed</field>
<field name="itow" type="uint32" unit="ms">GPS time of week</field>
</message>
Expand Down
3 changes: 3 additions & 0 deletions sw/airborne/modules/digital_cam/dc.c
Expand Up @@ -98,6 +98,8 @@ void dc_send_shot_position(void)
int16_t phi = DegOfRad(stateGetNedToBodyEulers_f()->phi*10.0f);
int16_t theta = DegOfRad(stateGetNedToBodyEulers_f()->theta*10.0f);
int16_t psi = DegOfRad(stateGetNedToBodyEulers_f()->psi*10.0f);
// course in decideg
int16_t course = DegOfRad(*stateGetHorizontalSpeedDir_f()) * 10;
// ground speed in cm/s
uint16_t speed = (*stateGetHorizontalSpeedNorm_f()) * 10;
int16_t photo_nr = -1;
Expand All @@ -116,6 +118,7 @@ void dc_send_shot_position(void)
&phi,
&theta,
&psi,
&course,
&speed,
&gps.tow);
}
Expand Down

0 comments on commit f54a456

Please sign in to comment.