Open anthonygardner opened 11 months ago
I want to use a common datatype for every actor in a simulation, similar to Vector3f but with more entries:
Vector3f
enum AltType { HeightAboveGeoid, HeightAboveEllipsoid, MeanSeaLevel }; enum ReferenceFrame { EarthCenteredInertial, EarthCenteredEarthFixed, EastNorthUp, NorthEastDown, Body }; typedef struct { float lat; float lon; float alt; AltType alt_type; } LatLonAlt; typedef struct { float x; float y; float z; ReferenceFrame rf; } CartPos; typedef struct { float vx; float vy; float vz; ReferenceFrame rf; } CartVel; typedef struct { float ax; float ay; float az; ReferenceFrame rf; } CartAcc; typedef struct { float roll; float pitch; float yaw; } AttRpy; typedef struct { float w; float x; float y; float z; } AttQuat; typedef struct { CartPos p; CartVel v; CartAcc a; LatLonAlt lla; AttRpy rpy; AttQuat q; } State;
I want to use a common datatype for every actor in a simulation, similar to
Vector3f
but with more entries: