Title: | Calculate the Inertial Properties of a Flying Bird |
---|---|
Description: | Tools to compute the center of gravity and moment of inertia tensor of any flying bird. The tools function by modeling a bird as a composite structure of simple geometric objects. This requires detailed morphological measurements of bird specimens although those obtained for the associated paper have been included in the package for use. Refer to the vignettes and supplementary material for detailed information on the package function. |
Authors: | Christina Harvey [aut, cre] |
Maintainer: | Christina Harvey <[email protected]> |
License: | GPL-3 |
Version: | 0.0.2 |
Built: | 2025-02-05 05:26:39 UTC |
Source: | https://github.com/charvey23/avinertia |
All outputs are based on an origin at the centered point on the base Reference: https://apps.dtic.mil/sti/pdfs/AD0274936.pdf
calc_inertia_conesolid(r, h, m)
calc_inertia_conesolid(r, h, m)
r |
radius of the cone base (m) |
h |
height of the cone (m) |
m |
mass of the cone (kg) |
a 3x3 matrix representing the moment of inertia tensor of a solid circular cone about its center of gravity with z oriented through it's major axis.
Origin of the output tensor is NOT at the center of gravity but at the center of the base.
Christina Harvey
# 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)
# 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)
Reference:https://apps.dtic.mil/sti/pdfs/AD0274936.pdf
calc_inertia_cylhollow(r_out, r_in, h, m)
calc_inertia_cylhollow(r_out, r_in, h, m)
r_out |
outer radius of the cylinder (m) |
r_in |
inner radius of the cylinder (m) |
h |
height of the cylinder (m) |
m |
mass of the cylinder (kg) |
a 3x3 matrix representing the moment of inertia tensor of a hollow cylinder about its center of gravity with z oriented through it's major axis
Christina Harvey
# 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)
# 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)
Reference: https://apps.dtic.mil/sti/pdfs/AD0274936.pdf
calc_inertia_cylsolid(r, h, m)
calc_inertia_cylsolid(r, h, m)
r |
radius of the cylinder (m) |
h |
height of the cylinder (m) |
m |
mass of the cylinder (kg) |
a 3x3 matrix representing the moment of inertia tensor of a solid cylinder about its center of gravity with z oriented through it's major axis
Christina Harvey
# 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)
# 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)
Moment of inertia tensor of a solid elliptical cone - end of purple notebook derivation verified in green
calc_inertia_ellcone(A, B, l, m)
calc_inertia_ellcone(A, B, l, m)
A |
half height of the wide base (m) |
B |
half width of the wide base (m) |
l |
length of the cone (m) |
m |
mass of the cone (kg) |
a 3x3 matrix representing the moment of inertia tensor of a solid elliptical cone about the center of the wider base with z oriented towards the end.
Origin of the output tensor is NOT at the center of gravity but at the center of the base.
Christina Harvey
# 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)
# 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)
Moment of inertia tensor of a solid elliptical cylinder Reference: https://apps.dtic.mil/sti/pdfs/AD0274936.pdf
calc_inertia_ellcyl(a, b, l, m)
calc_inertia_ellcyl(a, b, l, m)
a |
half height of the base - oriented along the x axis in torso FOR (z axis in full bird FOR) (m) |
b |
half width of the base - oriented along the y axis in torso FOR (y axis in full bird FOR) (m) |
l |
length of the cylinder - oriented along the z axis in torso FOR (x axis in full bird FOR) (m) |
m |
mass of the cylinder (kg) |
a 3x3 matrix representing the moment of inertia tensor of a solid elliptical cylinder about it's center of gravity
Christina Harvey
# 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)
# 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)
Reference:https://apps.dtic.mil/sti/pdfs/AD0274936.pdf
calc_inertia_ellipse(a, b, c, m)
calc_inertia_ellipse(a, b, c, m)
a |
half the height along the x direction (m) |
b |
half the width along the y direction (m) |
c |
half the length along the z direction (m) |
m |
mass of the ellipse (kg) |
a 3x3 matrix representing the moment of inertia tensor of a solid ellipse about its center of gravity with the major axes aligned.
Origin is at the center of gravity for a full ellipse or at the center of the base if modeling a half ellipse.
Christina Harvey
# 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)
# 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)
Moment of inertia tensor of a flat rectangular plate - assumes thickness is approximately zero Reference: https://apps.dtic.mil/sti/pdfs/AD0274936.pdf
calc_inertia_platerect(w, h, m)
calc_inertia_platerect(w, h, m)
w |
full width of one side of the plate - short edge (m) |
h |
height of the plate - long edge (m) |
m |
mass of the plate (kg) |
a 3x3 matrix representing the moment of inertia tensor of a flat plate about its center of gravity with z oriented parallel with it's long edge (h) and y along its short edge (w)
Christina Harvey
# 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)
# 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)
Reference: https://apps.dtic.mil/dtic/tr/fulltext/u2/a183444.pdf page 4 equations 2.16-2.20
calc_inertia_platetri(pts, A, rho, t, desired_prop)
calc_inertia_platetri(pts, A, rho, t, desired_prop)
pts |
a matrix of the three 3D points that define a point on the triangular plate. Frame of reference: Muscle | Origin: VRP each point should be a different row as follows: pt1x, pt1y, pt1z pt2x, pt1y, pt2z pt3x, pt3y, pt3z |
A |
area of the triangular plate (m) |
rho |
density of the material (kg/m^3) |
t |
thickness of the plate (m) |
desired_prop |
a string containing either "I" or "CG" depending on the desired output |
a 3x3 matrix representing the moment of inertia tensor of a flat triangular plate about its center of gravity. Z axis defined as the normal to the input points.
The input points should be defined in a counterclockwise direction around the plate in the triangular plate frame of reference i.e. all z components should be equal
Christina Harvey
# 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)
# 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)
Moment of inertia tensor of a solid square pyramid Reference: https://apps.dtic.mil/sti/pdfs/AD0274936.pdf All outputs are based on an origin at the centered point on the base
calc_inertia_pyrasolid(w, h, m)
calc_inertia_pyrasolid(w, h, m)
w |
entire width of one side of the pyramid base (m) |
h |
entire height of the pyramid (m) |
m |
mass of the pyramid (kg) |
a 3x3 matrix representing the moment of inertia tensor of a solid square pyramid about its center of gravity with z oriented through it's major axis.
Origin is NOT at the center of gravity but at the center of the base.
Christina Harvey
# 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)
# 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)
A 3x3 rotation matrix constructed by projecting the new axes onto the original system. Likely results in rotation about all axes.
calc_rot(z_vector, x_vector)
calc_rot(z_vector, x_vector)
z_vector |
a 1x3 vector representing the direction for the desired z axis of the new frame of reference. Frame of reference: VRP |
x_vector |
a 1x3 vector representing the direction for the desired x axis of the new frame of reference. Frame of reference: VRP |
a 3x3 matrix representing the rotation matrix that transforms between VRP frame and object frame
Christina Harvey
library(AvInertia) z_vector = c(0,0,1) x_vector = c(-1,0,0) # should return matrix [[-1,0,0];[0,-1,0];[0,0,1]] calc_rot(z_vector, x_vector)
library(AvInertia) z_vector = c(0,0,1) x_vector = c(-1,0,0) # should return matrix [[-1,0,0];[0,-1,0];[0,0,1]] calc_rot(z_vector, x_vector)
Determine the unit vector of any input vector
calc_univec(vector)
calc_univec(vector)
vector |
any vector or array with only one dimension |
the unit vector in the size of the input vector
Christina Harvey
library(AvInertia) #any random input vector vector = c(1,2,3) output_vec = calc_univec(vector) # if unit vector the magnitude should = 1 pracma::Norm(output_vec)
library(AvInertia) #any random input vector vector = c(1,2,3) output_vec = calc_univec(vector) # if unit vector the magnitude should = 1 pracma::Norm(output_vec)
A dataset containing the identified peripheral and joint 3D positions for a pigeon BirdID = 20_0300, TestID = 20_03004, FrameID = 317
clean_pts
clean_pts
A matrix with 10 rows and 3 columns. Columns represent x, y, and z coordinate respectively:
Point on the shoulder joint (m).
Point on the elbow joint (m).
Point on the wrist joint (m).
Point on the end of carpometacarpus (m).
Point on the leading edge of the wing in front of the wrist joint (m).
Point on tip of most distal primary (m).
Point on the tip of the last primary to model as if it is on the end of the carpometacarpus (m).
Point on tip of last primary to model as if it was distributed along the carpometacarpus (m).
Point on tip of most proximal feather (m).
Point on exterior shoulder position (wing root leading edge) (m).
Combines data exported from massprop_restbody and massprop_birdwing.
combine_inertialprop( curr_torsotail_data, left_wing_data, right_wing_data, dat_id_curr, dat_bird_curr, symmetric )
combine_inertialprop( curr_torsotail_data, left_wing_data, right_wing_data, dat_id_curr, dat_bird_curr, symmetric )
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:
|
dat_bird_curr |
Dataframe related to the current bird wing that must include the following columns:
|
symmetric |
Logical indicating if the input wings are symmetric or not. If True than left_wing_data = right_wing_data. |
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)
# 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)
# 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)
Compute the inertia of the individual feathers
compute_feat_inertia(dat_mat, dat_feat_curr, dat_bird_curr)
compute_feat_inertia(dat_mat, dat_feat_curr, dat_bird_curr)
dat_mat |
Dataframe related to the current species input as a dataframe with the following structure:
|
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_bird_curr |
Dataframe related to the current bird wing that must include the following columns:
|
A list with one entry per flight feather. Each primary feather includes the following variables:
I_pria 3x3 matrix representing the moment of inertia about each feather calamus tip (kg-m^2).
CG_pria 1x3 vector (x,y,z) representing the center of gravity of the primary feather (m).
m_pria double representing the mass of the primary feather (kg).
Each secondary feather includes the following variables:
I_seca 3x3 matrix representing the moment of inertia about each feather calamus tip (kg-m^2).
CG_seca 1x3 vector (x,y,z) representing the center of gravity of the primary feather (m).
m_seca double representing the mass of the primary feather (kg).
# 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)
# 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)
A dataset containing the bird specific morphology data for a pigeon BirdID = 20_0300, TestID = 20_03004, FrameID = 317
dat_bird_curr
dat_bird_curr
A dataframe with 1 row and 125 variables. Only 29 required for proper operation:
Mass of full bird for the current wing (kg)
Mass of one wing, should be the current wing (kg)
Radius of feather barb for current species (m)
Distance between feather barbs for current species (m)
Mass of all muscles in the brachial region of the wing (kg)
Mass of all muscles in the antebrachial region of the wing (kg)
Mass of all muscles in the manus region of the wing (kg)
Mass of all skin and covert feathers (kg).
Mass of tertiary feathers (kg).
Logical input defining whether the neck should be modeled as extended or not
Length of the head from base to tip (m)
Mass of the head (kg)
Height of the head at the base (m)
Mass of the neck (kg)
OPTIONAL: Average width of the stretched neck (m)
OPTIONAL: Length of the stretched neck (m)
Length from the beginning of the torso to the tip of the tail (m)
Mass of the torso and tail (kg)
Length of the tail (m)
Mass of the tail (kg)
Average width of the furled tail (m)
Mass of the right leg (kg)
Mass of the left leg (kg)
Maximum width of the torso (m)
Width of the body at the point where the legs are inserted (m).
x coordinate from the VRP in the full bird frame of reference of the maximum body width (m).
x coordinate from the VRP in the full bird frame of reference of the leg insertion location (m).
x coordinate from the VRP in the full bird frame of reference of the center of gravity of the torso and tail (m).
x coordinate from the VRP in the full bird frame of reference of the the center of gravity of the torso and tail (m).
A dataset containing the wing bone specific data for a pigeon BirdID = 20_0300, TestID = 20_03004, FrameID = 317
dat_bone_curr
dat_bone_curr
A dataframe with 6 rows and 5 variables:
Bone ID code. Must include: "Humerus","Ulna","Radius","Carpometacarpus","Ulnare" and "Radiale".
Mass of bone in the same row as the appropriate bone ID code (kg)
Length of bone in the same row as the appropriate bone ID code (m)
Outer radius of bone in the same row as the appropriate bone ID code (m)
Inner radius of bone in the same row as the appropriate bone ID code (m)
A dataset containing the wing bone specific data for a pigeon BirdID = 20_0300, TestID = 20_03004, FrameID = 317
dat_feat_curr
dat_feat_curr
A dataframe with 20 rows and 15 variables. Only 8 variables required for proper functioning:
Feather ID code. Must be in standard format i.e. 1st primary is "P1", third secondary is "S3", etc. Alula feathers should be grouped and named "alula".
Mass of feather in the same row as the appropriate feather ID code (kg)
Length of calamus in the same row as the appropriate feather ID code (m)
Length of rachis/vane in the same row as the appropriate feather ID code (m)
Width (diameter) of calamus in the same row as the appropriate feather ID code (m)
Width of proximal vane (average value) in the same row as the appropriate feather ID code (m)
Width of distal vane (average value) in the same row as the appropriate feather ID code (m)
Interior angle between the rachis and calamus (degrees)
A dataset containing the identification data for a pigeon BirdID = 20_0300, TestID = 20_03004, FrameID = 317
dat_id_curr
dat_id_curr
A dataframe with 1 row and 4 required variables:
Species ID code as a string
Bird ID code as a string
Test ID code as a string
Video frame ID code as a string
A dataset containing the material properties for a pigeon BirdID = 20_0300, TestID = 20_03004, FrameID = 317.
dat_mat
dat_mat
A dataframe with 20 rows and 15 variables. Only 8 variables required for proper functioning:
Material information. Must include the following: "Bone","Skin","Muscle","Cortex", "Medullary"
Density of each material (kg/m^3)
Function that is used within an optimization routine to select the appropriate torso section density
density_optimizer(x, m_body, A, v_ell, CG_body_x, CG_ell, rho_avg)
density_optimizer(x, m_body, A, v_ell, CG_body_x, CG_ell, rho_avg)
x |
a scalar guess at the density of the torso hemi-ellipsoid section (kg/m^3) |
m_body |
a scalar representing the mass of the full torso |
A |
a 2x2 matrix representing the mass and volume calculations of the final two torso section |
v_ell |
a scalar representing the volume of the hemi-ellipsoid |
CG_body_x |
a scalar representing the position of the center of gravity of the full torso along the x axis with the origin at the VRP |
CG_ell |
a scalar representing the position of the center of gravity of the hemi-ellipsoid section along the x axis with the origin at the VRP |
rho_avg |
average density of the full torso |
the squared error between the three section densities and the average torso density
# 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)
# 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)
Kroneckerdelta function
kronecker_delta(i, j)
kronecker_delta(i, j)
i |
a scalar index (usually row of a matrix) |
j |
a scalar index (usually column of a matrix) |
a scalar value. Returns 1 if i and j are equal otherwise returns 0
Christina Harvey
library(AvInertia) # should return 1 kronecker_delta(1,1) # should return 0 kronecker_delta(0,1)
library(AvInertia) # should return 1 kronecker_delta(1,1) # should return 0 kronecker_delta(0,1)
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.
massprop_birdwing( dat_wingID_curr, dat_bird_curr, dat_bone_curr, dat_feat_curr, dat_mat_curr, clean_pts, feather_inertia, plot_var )
massprop_birdwing( dat_wingID_curr, dat_bird_curr, dat_bone_curr, dat_feat_curr, dat_mat_curr, clean_pts, feather_inertia, plot_var )
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". |
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.
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.
Christina Harvey
# 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)
# 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)
Calculate the moment of inertia of a bone modeled as a hollow cylinder with two solid end caps
massprop_bones(m, l, r_out, r_in, rho, start, end)
massprop_bones(m, l, r_out, r_in, rho, start, end)
m |
Mass of bone (kg) |
l |
Length of bone (kg) |
r_out |
Outer radius of bone (m) |
r_in |
Inner radius of bone (m) |
rho |
Density of the bone (kg/m^3) |
start |
a 1x3 vector (x,y,z) representing the 3D point where bone starts. Points from the VRP to the bone start. Frame of reference: VRP | Origin: VRP |
end |
a 1x3 vector (x,y,z) representing the 3D point where bone ends. Points from the VRP to the bone start. Frame of reference: VRP | Origin: VRP |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a bone modeled as a hollow cylinder with two solid end caps
CGa 1x3 vector representing the center of gravity position of a bone modeled as a hollow cylinder with two solid end caps
ma double that returns the input bone mass
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
# 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)
# 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)
Calculate the moment of inertia of the feathers within the feather frame of reference.
massprop_feathers( m_f, l_c, l_r_cor, w_cal, r_b, d_b, rho_cor, rho_med, w_vp, w_vd, angle )
massprop_feathers( m_f, l_c, l_r_cor, w_cal, r_b, d_b, rho_cor, rho_med, w_vp, w_vd, angle )
m_f |
Mass of the entire feather (kg) |
l_c |
Length of the calamus; start of vane to end of calamus(m) |
l_r_cor |
Length of rachis; tip to start of vane (m) |
w_cal |
Width (diameter) of the cortex part of the calamus (m) |
r_b |
Radius of feather barbs (m) |
d_b |
Distance between barbs (m) |
rho_cor |
Density of the cortex (kg/m^3) |
rho_med |
Density of the medullary (kg/m^3) |
w_vp |
Width of proximal (closest to body) vane (m) |
w_vd |
Width of distal (closest to wing tip) vane (m) |
angle |
Angle between calamus and the vane taken the supplement angle to the interior angle. Negative indicates the feather tip is rotated proximally relative to the start of the feather vane. |
a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a simplified feather with the origin at the feather calamus end and within the feather frame of reference
CGa 1x3 vector representing the center of gravity position of a simplified feather with the origin at the feather calamus end and within the feather frame of reference
ma double that returns the feather mass
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
CAUTION: While computing the variable components of the feather the x axis is the normal of the feather.
Christina Harvey
# 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)
# 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)
Calculate the moment of inertia of a head modeled as a solid cone
massprop_head(m, r, l, start, end)
massprop_head(m, r, l, start, end)
m |
Mass of head (kg) |
r |
Maximum head radius (m) |
l |
Maximum head length (m) |
start |
a 1x3 vector (x,y,z) representing the 3D point where head starts. Frame of reference: VRP | Origin: VRP |
end |
a 1x3 vector (x,y,z) representing the 3D point where head ends. Frame of reference: VRP | Origin: VRP |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a head modeled as a solid cone
CGa 1x3 vector representing the center of gravity position of a head modeled as a solid cone
ma double that returns the head mass
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Christina Harvey
Calculate the moment of inertia of a muscle modeled as a solid cylinder distributed along the bone length
massprop_muscles(m, rho, l, start, end)
massprop_muscles(m, rho, l, start, end)
m |
Mass of muscle (kg). |
rho |
Density of muscle (kg/m^3). |
l |
Length of the muscle group (m). |
start |
a 1x3 vector (x,y,z) representing the 3D point where bone starts. Frame of reference: VRP | Origin: VRP. |
end |
a 1x3 vector (x,y,z) representing the 3D point where bone ends. Frame of reference: VRP | Origin: VRP. |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a muscle modeled as a solid cylinder distributed along the bone length.
CGa 1x3 vector representing the center of gravity position of a muscle modeled as a solid cylinder distributed along the bone length.
ma double that returns the input muscle mass.
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Christina Harvey
# 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)
# 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)
Calculate the moment of inertia of a neck modeled as a solid cylinder
massprop_neck(m, r, l, start, end)
massprop_neck(m, r, l, start, end)
m |
Mass of muscle (kg). |
r |
Radius of the neck (m). |
l |
Length of the stretched neck (m). |
start |
a 1x3 vector (x,y,z) representing the 3D point where neck starts. Frame of reference: VRP | Origin: VRP. |
end |
a 1x3 vector (x,y,z) representing the 3D point where neck ends. Frame of reference: VRP | Origin: VRP. |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a neck modeled as a solid cylinder.
CGa 1x3 vector representing the center of gravity position of a neck modeled as a solid cylinder.
ma double that returns the neck mass.
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Christina Harvey
Calculate the moment of inertia of any point mass
massprop_pm(m, pt)
massprop_pm(m, pt)
m |
Mass of point mass (kg) |
pt |
a 1x3 vector (x,y,z) representing the location of the point mass. Frame of reference: VRP | Origin: VRP |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a point mass
CGa 1x3 vector representing the center of gravity position of a point mass
ma double that returns the input mass
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Christina Harvey
# 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)
# 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)
Function that reads in anatomical data and returns the moment of inertia tensor and center of gravity for the head, neck, tail and torso.
massprop_restbody(dat_wingID_curr, dat_bird_curr)
massprop_restbody(dat_wingID_curr, dat_bird_curr)
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:
|
Function returns a dataframe that includes the moment of inertia and center of gravity of head, neck, torso and tail.
# 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)
# 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)
Calculate the moment of inertia of skin or tertiaries modeled as a flat triangular plate
massprop_skin(m, rho, pts)
massprop_skin(m, rho, pts)
m |
Mass of skin (kg) |
rho |
Density of skin (kg/m^3) |
pts |
a 3x3 matrix that represent three points that define the vertices of the triangle. Frame of reference: VRP | Origin: VRP Must be numbered in a counterclockwise direction for positive area, otherwise signs will be reversed. each point should be a different of the matrix as follows:
|
This function returns a list that includes: point mass
Ia 3x3 matrix representing the moment of inertia tensor of skin modeled as a flat triangular plate
CGa 1x3 vector representing the center of gravity position of skin modeled as a flat triangular plate
ma double that returns the input skin mass
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Caution: The skin frame of reference assumes that the z axis is normal to the incoming points.
Christina Harvey
# 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)
# 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)
Calculate the moment of inertia of a tail modeled as a solid cone
massprop_tail(m, l, w, start, end)
massprop_tail(m, l, w, start, end)
m |
Mass of muscle (kg) |
l |
Length of the tail (m) |
w |
Width of the tail (m) |
start |
a 1x3 vector (x,y,z) representing the 3D point where head starts. Frame of reference: VRP | Origin: VRP |
end |
a 1x3 vector (x,y,z) representing the 3D point where head ends. Frame of reference: VRP | Origin: VRP |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a head modeled as a solid cone
CGa 1x3 vector representing the center of gravity position of a head modeled as a solid cone
ma double that returns the head mass
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Christina Harvey
# 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)
# 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)
Calculate the moment of inertia of a head modeled as a solid cone
massprop_torso( m_true, m_legs, w_max, h_max, l_bmax, w_leg, l_leg, l_tot, CG_true_x, CG_true_z, start, end )
massprop_torso( m_true, m_legs, w_max, h_max, l_bmax, w_leg, l_leg, l_tot, CG_true_x, CG_true_z, start, end )
m_true |
Mass of the torso and legs - no tail (kg) |
m_legs |
Mass of the legs only (kg) |
w_max |
Maximum width of the body (m) |
h_max |
Maximum height of the body (m) |
l_bmax |
x location of the maximum width of the body (m) |
w_leg |
width of the body at leg insertion (m) |
l_leg |
x location of the leg insertion point (m) |
l_tot |
length of body from clavicle to beginning of the tail (m) |
CG_true_x |
x location of the CG for the torso and legs, origin is at the VRP, measured positive if aft of the VRP (m) |
CG_true_z |
z location of the CG for the torso and legs, origin is at the VRP (m) |
start |
a 1x3 vector (x,y,z) representing the 3D point where torso starts. Frame of reference: VRP | Origin: VRP |
end |
a 1x3 vector (x,y,z) representing the 3D point where tail ends. Frame of reference: VRP | Origin: VRP |
This function returns a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of the torso and leg composite body
CGa 1x3 vector representing the center of gravity position of the torso and leg composite body
ma double that returns the mass of the torso and leg composite body
Parallel axis theorem does not apply between two arbitrary points. One point must be the object's center of gravity.
Christina Harvey
# 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)
# 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)
Code that returns the orientation of each primary and secondary feather on the wing.
orient_feather(no_pri, no_sec, Pt1, Pt2, Pt3, Pt4, Pt8, Pt9, Pt10, Pt11, Pt12)
orient_feather(no_pri, no_sec, Pt1, Pt2, Pt3, Pt4, Pt8, Pt9, Pt10, Pt11, Pt12)
no_pri |
a scalar representing the amount of primary feathers. |
no_sec |
a scalar representing the amount of secondary feathers. |
Pt1 |
a 1x3 vector (x,y,z) representing the point on the shoulder joint (m). |
Pt2 |
a 1x3 vector (x,y,z) representing the point on the elbow joint (m). |
Pt3 |
a 1x3 vector (x,y,z) representing the point on the wrist joint (m). |
Pt4 |
a 1x3 vector (x,y,z) representing the point on the end of carpometacarpus (m). |
Pt8 |
a 1x3 vector (x,y,z) representing the point on tip of most distal primary (m). |
Pt9 |
a 1x3 vector (x,y,z) representing the point on the tip of the last primary to model as if it is on the end of the carpometacarpus (m). |
Pt10 |
1x3 vector (x,y,z) representing the point on tip of last primary to model as if it was distributed along the carpometacarpus (m). Usually the first secondary feather tip. |
Pt11 |
1x3 vector (x,y,z) representing the point on tip of most proximal secondary feather (m). |
Pt12 |
1x3 vector (x,y,z) representing the point on exterior shoulder position (wing root leading edge) (m). |
a list called "feather". This contains three matrices.
"loc_start" a matrix defining the 3D point where each feather starts. Rows are the different feathers and columns are x, y, z coordinates respectively.
"loc_end" a matrix defining the 3D point where each feather end. Rows are the different feathers and columns are x, y, z coordinates respectively.
"normal" a matrix that gives the vector that defines the normal to each feather plane. Rows are the different feathers and columns are x, y, z vector directions respectively.
Christina Harvey
# 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)
# 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)
Reads in an initial tensor and an offset to compute the transformed tensor. Will be in the same frame of reference as the input tensor.
parallelaxis(I, offset_vec, m, cg_a)
parallelaxis(I, offset_vec, m, cg_a)
I |
a 3x3 matrix representing the moment of inertia tensor about the center of gravity of the object (kg-m^2). |
offset_vec |
a 1x3 vector representing the distance (x,y,z) between the objects CG and the arbitrary pt A (m). Vector should always point from the CG to the arbitrary point A. |
m |
Mass of the object (kg). |
cg_a |
If input I is about the CG enter "CG" or if I is about an arbitrary axis enter "A". |
a 3x3 matrix representing the transformed moment of inertia tensor after a solid body translation defined by the offset vector.
Christina Harvey
# 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)
# 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)
Plot the center of gravity of each component
plot_CGloc( clean_pts, mass_properties, mass_properties_skin, mass_properties_bone, mass_properties_feathers, mass_properties_muscle, prop_tertiary1, prop_tertiary2, plot_var )
plot_CGloc( clean_pts, mass_properties, mass_properties_skin, mass_properties_bone, mass_properties_feathers, mass_properties_muscle, prop_tertiary1, prop_tertiary2, plot_var )
clean_pts |
Dataframe of the key positions of the bird as follows:
|
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. |
A plot of the request axes
# 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)
# 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)
A 3x3 rotation matrix allowing rotation about the x-axis. Constructed using a cosine rotation matrix where the rotation angle in degrees is measured counterclockwise allowing positive rotation under the right hand rule.
rotx(angle)
rotx(angle)
angle |
a scalar representing the angle to rotate (degrees) |
a 3x3 matrix representing the rotation about the x-axis by the given angle
Christina Harvey
library(AvInertia) angle = 90 # should return matrix [[1,0,0];[0,0,1];[0,1,0]] rotx(angle)
library(AvInertia) angle = 90 # should return matrix [[1,0,0];[0,0,1];[0,1,0]] rotx(angle)
Function to store moment of inertia tensor and center of gravity vector components in long format
store_data(dat_wingID_curr, dat_mass, mass_properties, name)
store_data(dat_wingID_curr, dat_mass, mass_properties, name)
dat_wingID_curr |
Dataframe related to the current bird wing ID info that must include the following columns:
|
dat_mass |
Dataframe containing the new MOI and CG data to add to mass_properties as new rows. Must include:
|
mass_properties |
Dataframe containing any previously saved data. Must have the following columns: "species","BirdID","TestID","FrameID", "prop_type","component","value". |
name |
Name of the component for which the moment of inertia and center of gravity were computed. |
This function returns mass_properties as an updated dataframe with a new row corresponding to the dat_mass information
# 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)
# 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)
Transform feather specific inertial properties to current position
structural2VRP_feat(m_f, I_fCG, CG_start, start, end, normal)
structural2VRP_feat(m_f, I_fCG, CG_start, start, end, normal)
m_f |
a scalar representing the mass of the feather (kg) |
I_fCG |
a 3x3 matrix representing the moment of inertia tensor with the origin at the feather calamus end and within the feather frame of reference |
CG_start |
a 1x3 vector representing the center of gravity of the feather with the origin at the feather calamus end and within the feather frame of reference |
start |
a 1x3 vector representing the location of the feather calamus end with the origin at the VRP and within the full bird frame of reference |
end |
a 1x3 vector representing the location of the feather tip with the origin at the VRP and within the full bird frame of reference |
normal |
a 1x3 vector representing the normal to the plane of the feather vanes within the full bird frame of reference |
a list that includes:
Ia 3x3 matrix representing the moment of inertia tensor of a simplified feather with the origin at the VRP and within the full bird frame of reference
CGa 1x3 vector representing the center of gravity position of a simplified feather with the origin at the VRP and within the full bird frame of reference
ma double that returns the feather mass
# 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)
# 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)