combine_inertialprop {AvInertia}R Documentation

Combine body and wing inertial components.

Description

Combines data exported from massprop_restbody and massprop_birdwing.

Usage

combine_inertialprop(
  curr_torsotail_data,
  left_wing_data,
  right_wing_data,
  dat_id_curr,
  dat_bird_curr,
  symmetric
)

Arguments

curr_torsotail_data

Output dataframe from massprop_restbody.

left_wing_data

Output dataframe from massprop_birdwing.

right_wing_data

Output dataframe from massprop_birdwing.

dat_id_curr

Dataframe related to the current bird wing ID info that must include the following columns:

  • speciesSpecies ID code as a string.

  • BirdIDBird ID code as a string.

  • TestIDTest ID code as a string.

  • frameIDVideo frame ID code as a string.

dat_bird_curr

Dataframe related to the current bird wing that must include the following columns:

  • total_bird_massMass of full bird for the current wing (kg).

symmetric

Logical indicating if the input wings are symmetric or not. If True than left_wing_data = right_wing_data.

Value

a dataframe containing all of the inertial properties for each wing component and the full bird about it's center of gravity and the vehicle reference point (VRP)

Examples

# refer to the vignette
library(AvInertia)

# load data
data(dat_id_curr, package = "AvInertia")
data(dat_bird_curr, package = "AvInertia")
data(dat_feat_curr, package = "AvInertia")
data(dat_bone_curr, package = "AvInertia")
data(dat_mat, package = "AvInertia")
data(clean_pts, package = "AvInertia")

# 1. Determine the center of gravity of the bird's torso (including the legs)
dat_torsotail_out = massprop_restbody(dat_id_curr, dat_bird_curr)
# 2. Calculate the inertia of the flight feathers about the tip of the calamus
feather_inertia <- compute_feat_inertia(dat_mat, dat_feat_curr, dat_bird_curr)
# 3. Determine the center of gravity of one of the bird's wings
dat_wing_out      = massprop_birdwing(dat_id_curr, dat_bird_curr,
dat_bone_curr, dat_feat_curr, dat_mat, clean_pts,
feather_inertia, plot_var = 0)
# Visualize the center of gravity of each wing component in the x and y axis
dat_wing_out      = massprop_birdwing(dat_id_curr, dat_bird_curr,
dat_bone_curr, dat_feat_curr, dat_mat, clean_pts,
feather_inertia, plot_var = "yx")
# or the y and z axis
dat_wing_out      = massprop_birdwing(dat_id_curr, dat_bird_curr,
dat_bone_curr, dat_feat_curr, dat_mat, clean_pts,
feather_inertia, plot_var = "yz")
# 4. Combine all data and obtain the center of gravity, moment of inertia
# and principal axes of the bird
curr_full_bird      = combine_inertialprop(dat_torsotail_out,dat_wing_out,
dat_wing_out, dat_id_curr, dat_bird_curr, symmetric=TRUE)


[Package AvInertia version 0.0.1 Index]