Beispiel #1
0
def main():

    #   traj_nb = 0; # static
    #   traj_nb = 1; # sine orientation
    #   traj_nb = 2; # sine X quad
    #   traj_nb = 3; # step_phi
    #   traj_nb = 4; # step_phi_2nd_order
    #   traj_nb = 5; # step_bias
    #   traj_nb = 6; # coordinated circle
    #   traj_nb = 7; # stop stop X quad
    traj_nb = 8
    # bungee takeoff

    build_opt1 = []
    #   build_opt1 = ["Q="];
    build_opt1 += ["FREQUENCY=120"]
    #   build_opt1 += ["PROPAGATE_LOW_PASS_RATES=1"];
    build_opt1 += ["GRAVITY_UPDATE_COORDINATED_TURN=1"]
    build_opt1 += ["GRAVITY_UPDATE_NORM_HEURISTIC=1"]
    #   build_opt1 += ["DISABLE_MAG_UPDATE=1"];
    #   build_opt1 += ["USE_GPS_HEADING=1"];
    #   build_opt1 += ["MAG_UPDATE_YAW_ONLY=1"];

    #   ahrs_type1 = "FCQ";
    #   ahrs_type1 = "FCR2";
    #   ahrs_type1 = "FLQ";
    ahrs_type1 = "ICQ"
    #   ahrs_type1 = "FCR";

    sim_res1 = ahrs_utils.run_simulation(ahrs_type1, build_opt1, traj_nb)
    #   import code; code.interact(local=locals())

    build_opt2 = []
    build_opt2 += ["FREQUENCY=120"]
    build_opt2 += ["GRAVITY_UPDATE_COORDINATED_TURN=1"]
    build_opt2 += ["GRAVITY_UPDATE_NORM_HEURISTIC=1"]
    build_opt2 += ["USE_AHRS_GPS_ACCELERATIONS=1"]
    #   build_opt2 += ["DISABLE_MAG_UPDATE=1"];
    #   build_opt2 += ["USE_GPS_HEADING=1"];
    #   build_opt2 += ["MAG_UPDATE_YAW_ONLY=0"];
    #   build_opt2 += ["PROPAGATE_LOW_PASS_RATES=1"];
    #   build_opt2 = build_opt1;

    #   ahrs_type2 = "FLQ";
    #   ahrs_type2 = "FCR2";
    #   ahrs_type2 = "ICQ";
    ahrs_type2 = "FCR"
    #   ahrs_type2 = ahrs_type1;

    sim_res2 = ahrs_utils.run_simulation(ahrs_type2, build_opt2, traj_nb)

    ahrs_utils.plot_simulation_results(False, "b", ahrs_type1, sim_res1)
    ahrs_utils.plot_simulation_results(True, "g", ahrs_type2, sim_res2)
    ahrs_utils.show_plot()
Beispiel #2
0
def main():

    #   traj_nb = 0; # static
    #   traj_nb = 1; # sine orientation
    #   traj_nb = 2; # sine X quad
    #   traj_nb = 3; # step_phi
    #   traj_nb = 4; # step_phi_2nd_order
    #   traj_nb = 5; # step_bias
    #   traj_nb = 6; # coordinated circle
    #   traj_nb = 7; # stop stop X quad
    traj_nb = 8
    # bungee takeoff

    build_opt1 = []
    #   build_opt1 = ["Q="];
    build_opt1 += ["FREQUENCY=120"]
    #   build_opt1 += ["PROPAGATE_LOW_PASS_RATES=1"];
    build_opt1 += ["GRAVITY_UPDATE_COORDINATED_TURN=1"]
    build_opt1 += ["GRAVITY_UPDATE_NORM_HEURISTIC=1"]
    #   build_opt1 += ["DISABLE_MAG_UPDATE=1"];
    #   build_opt1 += ["USE_GPS_HEADING=1"];
    #   build_opt1 += ["MAG_UPDATE_YAW_ONLY=1"];

    #   ahrs_type1 = "FCQ";
    #   ahrs_type1 = "FCR2";
    #   ahrs_type1 = "FLQ";
    ahrs_type1 = "ICQ"
    #   ahrs_type1 = "FCR";

    sim_res1 = ahrs_utils.run_simulation(ahrs_type1, build_opt1, traj_nb)
    #   import code; code.interact(local=locals())

    build_opt2 = []
    build_opt2 += ["FREQUENCY=120"]
    build_opt2 += ["GRAVITY_UPDATE_COORDINATED_TURN=1"]
    build_opt2 += ["GRAVITY_UPDATE_NORM_HEURISTIC=1"]
    build_opt2 += ["USE_AHRS_GPS_ACCELERATIONS=1"]
    #   build_opt2 += ["DISABLE_MAG_UPDATE=1"];
    #   build_opt2 += ["USE_GPS_HEADING=1"];
    #   build_opt2 += ["MAG_UPDATE_YAW_ONLY=0"];
    #   build_opt2 += ["PROPAGATE_LOW_PASS_RATES=1"];
    #   build_opt2 = build_opt1;

    #   ahrs_type2 = "FLQ";
    #   ahrs_type2 = "FCR2";
    #   ahrs_type2 = "ICQ";
    ahrs_type2 = "FCR"
    #   ahrs_type2 = ahrs_type1;

    sim_res2 = ahrs_utils.run_simulation(ahrs_type2, build_opt2, traj_nb)

    ahrs_utils.plot_simulation_results(False, 'b', ahrs_type1, sim_res1)
    ahrs_utils.plot_simulation_results(True, 'g', ahrs_type2, sim_res2)
    ahrs_utils.show_plot()
Beispiel #3
0
def main():

    #    traj_nb = 0; # static
    #    traj_nb = 1; # sine orientation
    #    traj_nb = 2; # sine X quad
    traj_nb = 3
    # step_phi
    #    traj_nb = 4; # step_phi_2nd_order
    #    traj_nb = 5; # step_bias
    #    traj_nb = 6; # coordinated circle
    #    traj_nb = 7; # stop stop X quad

    build_opt1 = []
    #    build_opt1 = ["Q="];
    build_opt1 += ["PROPAGATE_LOW_PASS_RATES=1"]
    #    build_opt1 = ["GRAVITY_UPDATE_COORDINATED_TURN=1"];
    build_opt1 += ["GRAVITY_UPDATE_NORM_HEURISTIC=0"]
    #    build_opt1 = ["MAG_UPDATE_YAW_ONLY=1"];
    ahrs_type1 = "FCQ"
    #    ahrs_type1 = "FCR2";
    #    ahrs_type1 = "FLQ";
    #    ahrs_type1 = "ICQ";
    sim_res1 = ahrs_utils.run_simulation(ahrs_type1, build_opt1, traj_nb)
    #    import code; code.interact(local=locals())

    build_opt2 = []
    #    build_opt2 = ["GRAVITY_UPDATE_COORDINATED_TURN=1"];
    build_opt2 += ["GRAVITY_UPDATE_NORM_HEURISTIC=1"]
    #    build_opt2 = ["MAG_UPDATE_YAW_ONLY=0"];
    build_opt2 += ["PROPAGATE_LOW_PASS_RATES=1"]
    #    build_opt2 = build_opt1;
    #    ahrs_type2 = "FLQ";
    ahrs_type2 = "FCQ"
    #    ahrs_type2 = "ICQ";
    ahrs_type2 = ahrs_type1
    sim_res2 = ahrs_utils.run_simulation(ahrs_type2, build_opt2, traj_nb)

    ahrs_utils.plot_simulation_results(False, 'b', sim_res1)
    ahrs_utils.plot_simulation_results(True, 'g', sim_res2)
    ahrs_utils.show_plot()
Beispiel #4
0
def main():

#    traj_nb = 0; # static
#    traj_nb = 1; # sine orientation
#    traj_nb = 2; # sine X quad
    traj_nb = 3; # step_phi
#    traj_nb = 4; # step_phi_2nd_order
#    traj_nb = 5; # step_bias
#    traj_nb = 6; # coordinated circle
#    traj_nb = 7; # stop stop X quad

    build_opt1 = [];
#    build_opt1 = ["Q="];
    build_opt1 += ["PROPAGATE_LOW_PASS_RATES=1"];
#    build_opt1 = ["GRAVITY_UPDATE_COORDINATED_TURN=1"];
    build_opt1 += ["GRAVITY_UPDATE_NORM_HEURISTIC=0"];
#    build_opt1 = ["MAG_UPDATE_YAW_ONLY=1"];
    ahrs_type1 = "FCQ";
#    ahrs_type1 = "FCR2";
#    ahrs_type1 = "FLQ";
#    ahrs_type1 = "ICQ";
    sim_res1 = ahrs_utils.run_simulation(ahrs_type1, build_opt1, traj_nb)
#    import code; code.interact(local=locals())

    build_opt2 = [];
#    build_opt2 = ["GRAVITY_UPDATE_COORDINATED_TURN=1"];
    build_opt2 += ["GRAVITY_UPDATE_NORM_HEURISTIC=1"];
#    build_opt2 = ["MAG_UPDATE_YAW_ONLY=0"];
    build_opt2 += ["PROPAGATE_LOW_PASS_RATES=1"];
#    build_opt2 = build_opt1;
#    ahrs_type2 = "FLQ";
    ahrs_type2 = "FCQ";
#    ahrs_type2 = "ICQ";
    ahrs_type2 = ahrs_type1;
    sim_res2 = ahrs_utils.run_simulation(ahrs_type2, build_opt2, traj_nb)

    ahrs_utils.plot_simulation_results(False, 'b', sim_res1)
    ahrs_utils.plot_simulation_results(True,  'g', sim_res2)
    ahrs_utils.show_plot()