plot_CGloc {AvInertia}R Documentation

Plot the center of gravity of each component

Description

Plot the center of gravity of each component

Usage

plot_CGloc(
  clean_pts,
  mass_properties,
  mass_properties_skin,
  mass_properties_bone,
  mass_properties_feathers,
  mass_properties_muscle,
  prop_tertiary1,
  prop_tertiary2,
  plot_var
)

Arguments

clean_pts

Dataframe of the key positions of the bird as follows:

  • pt1x, pt1y, pt1zPoint on the shoulder joint

  • pt2x, pt1y, pt2zPoint on the elbow joint

  • pt3x, pt3y, pt3zPoint on the wrist joint

  • pt4x, pt4y, pt4zPoint on the end of carpometacarpus

  • pt6x, pt6y, pt6zPoint on the leading edge of the wing in front of the wrist joint

  • pt8x, pt8y, pt8zPoint on tip of most distal primary

  • pt9x, pt9y, pt9zPoint that defines the end of carpometacarpus

  • pt10x, pt10y, pt10zPoint on tip of last primary to model as if on the end of the carpometacarpus

  • pt11x, pt11y, pt11zPoint on tip of most proximal feather (wing root trailing edge)

  • pt12x, pt12y, pt12zPoint on exterior shoulder position (wing root leading edge)

mass_properties

Dataframe containing the center of gravity and moment of inertia components of the full wing.

mass_properties_skin

Dataframe containing the center of gravity and moment of inertia components of the skin. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value".

mass_properties_bone

Dataframe containing the center of gravity and moment of inertia components of the wing bones. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value".

mass_properties_feathers

Dataframe containing the center of gravity and moment of inertia components of the feathers. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value".

mass_properties_muscle

Dataframe containing the center of gravity and moment of inertia components of the muscles Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value".

prop_tertiary1

Dataframe containing the center of gravity and moment of inertia components of the first tertiary group. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value".

prop_tertiary2

Dataframe containing the center of gravity and moment of inertia components of the second tertiary group. Formatted with the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value".

plot_var

Character of either "yx" or "yz". Defines the output axes of the plot.

Value

A plot of the request axes

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]