Add timestep function
This commit is contained in:
parent
8904c223cb
commit
c0f37a5166
5 changed files with 118 additions and 1 deletions
|
|
@ -17,4 +17,12 @@ struct ThrustAndMoment {
|
|||
|
||||
struct ThrustAndMoment thrust(struct Quat attitude, struct Propeller *p);
|
||||
|
||||
static inline struct Vec3 drag(double drag_coefficient, struct Vec3 velocity) {
|
||||
return (struct Vec3){
|
||||
-velocity.x * drag_coefficient,
|
||||
-velocity.y * drag_coefficient,
|
||||
-velocity.z * drag_coefficient,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue