user2824393
user2824393

Reputation: 649

Matlab simulate quadcopter

I want to simulate a quadcopter flight (x,y,z,roll,pitch,yaw). I need a simplest option to simulate/visualization - maybe 'X' / cross sign. like this video: in 2:00 : https://www.youtube.com/watch?v=dvNzxVqqgnw

given (x,y,z,roll,pitch,yaw) , how can I simulate/visualization using the simplest way ?

I know how to plot 3d point with 'X' sign (using plot3)- but this thing doesn't control angles (roll,pitch,yaw) - is there a similar function that takes (x,y,z,roll,pitch,yaw) ??

Thanks

Upvotes: 0

Views: 3109

Answers (1)

Mauvai
Mauvai

Reputation: 469

I am going to assume that you have the flight data ((x,y,z,roll,pitch,yaw) and simply want to display it.

Plot3 plots a single 3d point, which in itself cannot have pitch, roll, or yaw. It sounds like you will need to design a shape that can represent your quadcopter (a triangle of 3 points would do - anything with more than 1 dimension will. A square would probably be easiest), and then write a function that can compute the 3d coords of each point, given the coords of one of one of the points, and the pitch roll yaw data. Then use the plot3 to plot each point individually (and maybe add lines between them or something)

I realize this may not be helpful, but your question is extremely broad.

Upvotes: 1

Related Questions