Skip to content

Commit

Permalink
Only take stateGetPositionEnu_f once
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindehecker committed Aug 12, 2016
1 parent 7b575a3 commit ca8e1a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sw/airborne/modules/sensors/kalamos_uart.c
Expand Up @@ -144,13 +144,15 @@ void kalamos_event() {
void kalamos_periodic() {

struct FloatEulers *att = stateGetNedToBodyEulers_f();
struct EnuCoor_f *pos = stateGetPositionEnu_f();


struct PPRZ2KalamosPackage p2k_package;
p2k_package.phi = att->phi;
p2k_package.theta = att->theta;
p2k_package.gpsx = stateGetPositionEnu_f()->x;
p2k_package.gpsy = stateGetPositionEnu_f()->y;
p2k_package.gpsz = stateGetPositionEnu_f()->z;
p2k_package.gpsx = pos->x;
p2k_package.gpsy = pos->y;
p2k_package.gpsz = pos->z;


// Send Telemetry report
Expand Down

0 comments on commit ca8e1a9

Please sign in to comment.