# Simulation of small satellite dynamics in software

Tags:
1. Apr 18, 2015

### Datri

Hello,
First time poster in this forum. I am tasked with simulating small satellite dynamics in software this summer. I am new to this and am wondering how such a simulation is carried out. More specifically I am supposed to output the vector [ x y z xdot ydot zdot q1 q2 q3 q4 w1dot w2dot w3dot] to typical force/torque input, where x,y,z are position components, q is the quaternion for the attitude of the satellite, wdot is the angular velocity derivative of the satellite.
I am specifically unclear about where to start. I am guessing the geometry of the satellite is important in this. The satellite is powered by batteries and small CO2 thrusters. I am guessing the thruster positions are also important....How does one put it all together for simulating a typical small satellite, I am talking about something of the order of a cubesat, only in my case the shape is an octagon......

Thanks,
Datri

2. Apr 23, 2015

### bigfooted

When I was a student, I wrote a matlab program to compute the satellite position and attitude/orientation for a small satellite. I recommend doing it in matlab, and start with a small program that computes the position of a spherical mass rotating around the earth, then adding more detail in steps. First understand how the Cartesian equations of motion work and implement them (this approach is more intuitive and simpler and works as long as your angles are well-defined), then try to do the same thing using quaternions.