Пример #1
0
    
    # find thrust
    thrust_status = find_thrust(base_acc)
    if thrust_status:
        logger.log_thrust()

    # find orientation using yaw
    orientation = find_orientation_by_yaw()
    if (orientation != base_orientation_yaw):
        logger.log_orientation(orientation)
        base_orientation_yaw = orientation

    # find orientation using roll
    orientation = find_orientation_by_roll()
    if (orientation != base_orientation_roll):
        logger.log_orientation(orientation)
        base_orientation_roll = orientation
        
    # find compass
    compass = find_compass()
    logger.log_compass(compass)

    # show a trick question, facts or fun
    text.show_text()

    # if more than 10 minutes since last acceleration baseline
    if datetime.now() > (last_baseline + time_between):
        # get baseline for acceleration
        base_acc = baseline_acceleration()
        last_baseline = datetime.now()
Пример #2
0
    # find thrust, orientations, compass and log to datalogg

    # find thrust
    thrust_status = find_thrust(base_acc)
    if thrust_status:
        datalogger.log_thrust()

    # find orientation using yaw
    orientation = find_orientation_by_yaw()
    if (orientation != base_orientation_yaw):
        datalogger.log_orientation(orientation)
        base_orientation_yaw = orientation

    # find orientation using roll
    orientation = find_orientation_by_roll()
    if (orientation != base_orientation_roll):
        datalogger.log_orientation(orientation)
        base_orientation_roll = orientation

    # find compass
    compass = find_compass()
    datalogger.log_compass(compass)

    # show a random animation
    animation.show_animation()

    # do new baseline of humidity if more than 10 minutes since last
    if datetime.now() > (last_baseline + time_between):
        baseline = baseline_humidity()
        last_baseline = datetime.now()