massprop_restbody {AvInertia}R Documentation

Calculate the center of gravity and moment of inertia for the head, neck, torso and tail.

Description

Function that reads in anatomical data and returns the moment of inertia tensor and center of gravity for the head, neck, tail and torso.

Usage

massprop_restbody(dat_wingID_curr, dat_bird_curr)

Arguments

dat_wingID_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:

  • extend_neckLogical input defining whether the neck should be modeled as extended or not.

  • head_lengthLength of the head from base to tip (m).

  • head_massMass of the head (kg).

  • head_heightHeight of the head at the base (m).

  • neck_massMass of the neck (kg).

  • neck_widthOPTIONAL - Average width of the stretched neck (m).

  • neck_lengthOPTIONAL - Length of the stretched neck (m).

  • torsotail_lengthLength from the beginning of the torso to the tip of the tail (m).

  • torsotail_massMass of the torso and tail (kg).

  • tail_lengthLength of the tail (m).

  • tail_massMass of the tail (kg).

  • tail_widthAverage width of the furled tail (m).

  • right_leg_massMass of the right leg (kg).

  • left_leg_massMass of the left leg (kg).

  • body_width_maxMaximum width of the torso (m).

  • body_width_at_leg_insertWidth of the body at the point where the legs are inserted (m).

  • x_loc_of_body_maxx coordinate from the VRP in the full bird frame of reference of the maximum body width (m).

  • x_loc_leg_insertionx coordinate from the VRP in the full bird frame of reference of the leg insertion location (m).

  • x_loc_TorsotailCoGx coordinate from the VRP in the full bird frame of reference of the center of gravity of the torso and tail (m).

  • z_loc_TorsotailCoGx coordinate from the VRP in the full bird frame of reference of the the center of gravity of the torso and tail (m).

Value

Function returns a dataframe that includes the moment of inertia and center of gravity of head, neck, torso and tail.

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.2 Index]