Skip to content

Commit a92da48

Browse files
committed
Add types back to struct
1 parent f6a905e commit a92da48

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

examples/ram_air_kite.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using ControlPlots
22
using VortexStepMethod
33
using LinearAlgebra
44

5-
PLOT = true
5+
PLOT = false
66
USE_TEX = false
77
DEFORM = false
88
LINEARIZE = true
@@ -81,6 +81,7 @@ PLOT && plot_geometry(
8181
)
8282

8383
# Solving and plotting distributions
84+
println("Solve")
8485
results = VortexStepMethod.solve(vsm_solver, body_aero; log=true)
8586
@time results = solve(vsm_solver, body_aero; log=true)
8687

src/kite_geometry.jl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -372,16 +372,18 @@ Represents a curved wing that inherits from Wing with additional geometric prope
372372
- `spanwise_distribution`::PanelDistribution: see: [PanelDistribution](@ref)
373373
- `spanwise_direction::MVec3`: Wing span direction vector
374374
- `sections::Vector{Section}`: List of wing sections, see: [Section](@ref)
375-
- refined_sections::Vector{Section}
375+
- `refined_sections::Vector{Section}`
376376
- `remove_nan::Bool`: Wether to remove the NaNs from interpolations or not
377377
- Additional fields:
378-
- `circle_center_z`: Center of circle coordinates
379-
- gamma_tip::Float64: Angle between the body frame z axis and the vector going from the kite circular shape center to the wing tip.
380-
- `inertia_tensor`::Matrix{Float64}: see: [`calculate_inertia_tensor`](@ref)
381-
- radius::Float64: Radius of curvature
382-
- le_interp::NTuple{3, Extrapolation}: see: [Extrapolation](https://juliamath.github.io/Interpolations.jl/stable/extrapolation/)
383-
- te_interp::NTuple{3, Extrapolation}
384-
- area_interp::Extrapolation
378+
- `circle_center_z::MVec3`: Center of circle coordinates
379+
- `gamma_tip::Float64`: Angle between the body frame z axis and the vector going from the kite circular shape center to the wing tip.
380+
- `inertia_tensor::Matrix{Float64}`: see: [`calculate_inertia_tensor`](@ref)
381+
- `radius::Float64`: Radius of curvature
382+
- `le_interp::NTuple{3, Extrapolation}`: see: [Extrapolation](https://juliamath.github.io/Interpolations.jl/stable/extrapolation/)
383+
- `te_interp::NTuple{3, Extrapolation}`
384+
- `area_interp::Extrapolation`
385+
- `theta_dist::Vector{Float64}`
386+
- `delta_dist::Vector{Float64}`
385387
386388
"""
387389
mutable struct RamAirWing <: AbstractWing
@@ -398,13 +400,13 @@ mutable struct RamAirWing <: AbstractWing
398400
mass::Float64
399401
gamma_tip::Float64
400402
inertia_tensor::Matrix{Float64}
401-
center_of_mass
403+
center_of_mass::MVec3
402404
radius::Float64
403405
le_interp::NTuple{3, Extrapolation}
404406
te_interp::NTuple{3, Extrapolation}
405407
area_interp::Extrapolation
406-
theta_dist
407-
delta_dist
408+
theta_dist::Vector{Float64}
409+
delta_dist::Vector{Float64}
408410
end
409411

410412
"""

src/solver.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,8 @@ function linearize(solver::Solver, body_aero::BodyAerodynamics, wing::RamAirWing
631631
kwargs...)
632632

633633
init_va = copy(body_aero.va)
634+
init_alpha_beta = copy(y[alpha_idxs])
635+
634636
# Function to compute forces for given control inputs
635637
function calc_results!(results, y)
636638
if !isnothing(alpha_idxs) && isnothing(delta_idxs)

0 commit comments

Comments
 (0)