diff --git a/sw/airborne/subsystems/ins.h b/sw/airborne/subsystems/ins.h index 3509b1412c..cdb15483c8 100644 --- a/sw/airborne/subsystems/ins.h +++ b/sw/airborne/subsystems/ins.h @@ -80,21 +80,6 @@ extern void ins_reset_altitude_ref(void); */ extern void ins_reset_utm_zone(struct UtmCoor_f * utm); -/** INS horizontal realign. - * This only reset the filter to a given value, but doesn't change the local reference. - * Needs to be implemented by each INS algorithm. - * @param pos new horizontal position to set - * @param speed new horizontal speed to set - */ -extern void ins_realign_h(struct FloatVect2 pos, struct FloatVect2 speed); - -/** INS vertical realign. - * This only reset the filter to a given value, but doesn't change the local reference. - * Needs to be implemented by each INS algorithm. - * @param z new altitude to set - */ -extern void ins_realign_v(float z); - /** Propagation. Usually integrates the gyro rates to angles. * Reads the global #imu data struct. * Needs to be implemented by each INS algorithm. diff --git a/sw/airborne/subsystems/ins/ins_alt_float.c b/sw/airborne/subsystems/ins/ins_alt_float.c index 0499e48b30..493bbec908 100644 --- a/sw/airborne/subsystems/ins/ins_alt_float.c +++ b/sw/airborne/subsystems/ins/ins_alt_float.c @@ -142,15 +142,6 @@ void ins_reset_utm_zone(struct UtmCoor_f * utm) { stateSetLocalUtmOrigin_f(utm); } -void ins_realign_h(struct FloatVect2 pos __attribute__ ((unused)), struct FloatVect2 speed __attribute__ ((unused))) { -} - -void ins_realign_v(float z) { - ins_impl.alt = z; - ins_impl.alt_dot = 0.; - alt_kalman_reset(); -} - void ins_propagate(void) { } diff --git a/sw/airborne/subsystems/ins/ins_ardrone2.c b/sw/airborne/subsystems/ins/ins_ardrone2.c index f166152b91..19ede2bab3 100644 --- a/sw/airborne/subsystems/ins/ins_ardrone2.c +++ b/sw/airborne/subsystems/ins/ins_ardrone2.c @@ -85,14 +85,6 @@ void ins_reset_altitude_ref( void ) { #endif } -void ins_realign_h(struct FloatVect2 pos __attribute__ ((unused)), struct FloatVect2 speed __attribute__ ((unused))) { - -} - -void ins_realign_v(float z __attribute__ ((unused))) { - -} - void ins_propagate() { /* untilt accels and speeds */ FLOAT_RMAT_VECT3_TRANSP_MUL(ins_impl.ltp_accel, (*stateGetNedToBodyRMat_f()), ahrs_impl.accel); diff --git a/sw/airborne/subsystems/ins/ins_float_invariant.c b/sw/airborne/subsystems/ins/ins_float_invariant.c index 9b64c3699c..09a526c00a 100644 --- a/sw/airborne/subsystems/ins/ins_float_invariant.c +++ b/sw/airborne/subsystems/ins/ins_float_invariant.c @@ -327,15 +327,10 @@ void ins_reset_utm_zone(struct UtmCoor_f * utm) { } #endif -void ins_realign_h(struct FloatVect2 pos __attribute__ ((unused)), struct FloatVect2 speed __attribute__ ((unused))) {} -void ins_realign_v(float z __attribute__ ((unused))) {} - - void ahrs_init(void) { ahrs.status = AHRS_UNINIT; } - void ahrs_align(void) { /* Compute an initial orientation from accel and mag directly as quaternion */ diff --git a/sw/airborne/subsystems/ins/ins_gps_passthrough.c b/sw/airborne/subsystems/ins/ins_gps_passthrough.c index 8dbe0d9ac5..af37654828 100644 --- a/sw/airborne/subsystems/ins/ins_gps_passthrough.c +++ b/sw/airborne/subsystems/ins/ins_gps_passthrough.c @@ -112,10 +112,3 @@ void ins_update_baro(void) { void ins_update_sonar(void) { } - -void ins_realign_h(struct FloatVect2 pos __attribute__ ((unused)), struct FloatVect2 speed __attribute__ ((unused))) { -} - -void ins_realign_v(float z __attribute__ ((unused))) { -} - diff --git a/sw/airborne/subsystems/ins/ins_int.c b/sw/airborne/subsystems/ins/ins_int.c index 81b892f3f8..48568e7e94 100644 --- a/sw/airborne/subsystems/ins/ins_int.c +++ b/sw/airborne/subsystems/ins/ins_int.c @@ -203,22 +203,6 @@ void ins_reset_altitude_ref(void) { ins_impl.vf_reset = TRUE; } -#if USE_HFF -void ins_realign_h(struct FloatVect2 pos, struct FloatVect2 speed) { - b2_hff_realign(pos, speed); - ins_update_from_hff(); -} -#else -void ins_realign_h(struct FloatVect2 pos __attribute__ ((unused)), - struct FloatVect2 speed __attribute__ ((unused))) {} -#endif /* USE_HFF */ - - -void ins_realign_v(float z) { - vff_realign(z); - ins_update_from_vff(); -} - void ins_propagate(void) { /* untilt accels */ struct Int32Vect3 accel_meas_body;