Skip to content

Commit

Permalink
fix to use ins_alt_dot with baro wen USE_BAROMETER is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasMue committed Aug 9, 2013
1 parent d86f3d2 commit 732bdcd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sw/airborne/subsystems/ins/ins_alt_float.c
Expand Up @@ -105,6 +105,10 @@ void ins_update_baro() {
UTM_COPY(utm, *stateGetPositionUtm_f());
utm.alt = ins_alt;
stateSetPositionUtm_f(&utm);
struct NedCoor_f ned_vel;
memcpy(&ned_vel, stateGetSpeedNed_f(), sizeof(struct NedCoor_f));
ned_vel.z = -ins_alt_dot;
stateSetSpeedNed_f(&ned_vel);
}
}
#endif
Expand All @@ -129,7 +133,7 @@ void ins_update_gps(void) {
struct NedCoor_f ned_vel = {
gps.ned_vel.x / 100.,
gps.ned_vel.y / 100.,
gps.ned_vel.z / 100.
-ins_alt_dot
};
// set velocity
stateSetSpeedNed_f(&ned_vel);
Expand Down

0 comments on commit 732bdcd

Please sign in to comment.