integration of a trajectory

1 view (last 30 days)
Abraham
Abraham on 30 Oct 2018
Edited: Star Strider on 30 Oct 2018
So I have this task: How do I go from here.
This is what I have done so far
function [rover] = simulate_rover( rover, planet,experiment,end_event, varargin)
% Purpose:
% This function integrates the trajectory of a rover according to the
% terrain ad initial conditions contained in the experiment1 file.
% It uses end_event to define the necessary and sufficient conditions to
% terminate the simulation.
% Ensure number of inputs is 4
if nargin~= 4 || isempty(varargin)==0
error('There must be 4 input arguments.')
elseif ~isstruct(rover) % rover input is struct
error ('rover input must be struct')
elseif ~isstruct(planet) % planet input is struct
error ('planet input must be struct')
elseif ~isstruct(experiment) %xperiment input is struct
error ('experiment input must be struct')
elseif ~isstruct(end_event) %end_event input is struct
error ('end_event input must be struct')
end
This is the experiment1.m file
alpha_dist: [0 100 200 300 400 500 600 700 800 900 1000]
alpha_deg: [11×1 double]
crr: 0.1000
initial_conditions: [2×1 double]
time_range: [0 20000]
a. I need help finding the trajectory b. I need help finding the best ODE solver for the problem? c. And provide the conditions to stop the simulation using the options structure to be fed into the ode solver: The "options structure" is already provided. The end of mission file is provided as well
Thank you

Answers (0)

Categories

Find more on General Physics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!