massprop_birdwing {AvInertia} | R Documentation |
Calculate the center of gravity and moment of inertia for a halfspan wing.
Description
Function that reads in anatomical data and returns the moment of inertia tensor and center of gravity of a wing one side of the bird.
Usage
massprop_birdwing(
dat_wingID_curr,
dat_bird_curr,
dat_bone_curr,
dat_feat_curr,
dat_mat_curr,
clean_pts,
feather_inertia,
plot_var
)
Arguments
dat_wingID_curr |
Dataframe related to the current bird wing ID info that must include the following columns:
|
dat_bird_curr |
Dataframe related to the current bird wing that must include the following columns:
|
dat_bone_curr |
Dataframe (6 row x 5 column) related to the current bird wing bones that must include the following columns:
|
dat_feat_curr |
Dataframe related to the current bird wing feathers input as a dataframe with the following structure:
NOTE: Alula feathers will be treated as point mass so only the mass of the feathers is required. Other columns can be left blank. |
dat_mat_curr |
Dataframe related to the current species input as a dataframe with the following structure:
|
clean_pts |
A data frame of the key positions of the bird as follows:
|
feather_inertia |
A list with one entry per flight feather. Each primary feather includes the following variables:
Each secondary feather includes the following variables:
|
plot_var |
A string that defines the x-axis and y-axis of the output plot. Can either equal "yx" or "yz". |
Value
Function returns a dataframe that includes the moment of inertia and center of gravity of one wing about the VRP in the VRP frame and that of each major anatomical group i.e. skin, feathers, bones, muscles.
CAUTION
All points must all have the vehicle reference point (VRP) as their origin and the vehicle major axes as their frame of reference. This is normally selected so that the VRP is in line with the body center of gravity. Ensure the axes used represent a right-handed axis system.
Author(s)
Christina Harvey
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)