vizInterface¶
This module provides an interface to package up Basilisk messages and pass them onto the Vizard application.
- 
struct MsgCurrStatus¶
- 
struct ThrClusterMap¶
- 
struct PointLine¶
- 
struct KeepOutInCone¶
- Public Members - 
bool isKeepIn¶
- True -> keep in cone created, False -> keep out cone created. 
 - 
double position_B[3]¶
- [m] cone start relative to from body coordinate frame 
 - 
double normalVector_B[3]¶
- [-] cone normal direction vector 
 - 
double incidenceAngle¶
- [deg] cone incidence angle 
 - 
double coneHeight¶
- [m] sets height of visible cone (asthetic only, does not impact function) 
 - 
std::string fromBodyName¶
- name of body to attach cone onto 
 - 
std::string toBodyName¶
- [-] detect changes if this body has impingement on cone 
 - 
int coneColor[4]¶
- [-] desired RGBA as values between 0 and 255 
 - 
std::string coneName¶
- [-] cone name, if unspecified, viz will autogenerate name 
 
- 
bool 
- 
struct StdCameraSettings¶
- Public Members - 
std::string spacecraftName¶
- name of spacecraft onto which to place a camera 
 - 
int setMode¶
- 0 -> body targeting, 1 -> pointing vector (default) 
 - 
double fieldOfView¶
- rad, field of view setting, -1 -> use default, values between 0.0001 and 179.9999 deg valid 
 - 
std::string bodyTarget¶
- Name of body camera should point to (default to first celestial body in messages). This is a setting for body targeting mode. 
 - 
int setView¶
- 0 -> Nadir, 1 -> Orbit Normal, 2 -> Along Track (default to nadir). This is a setting for body targeting mode. 
 - 
double pointingVector_B[3]¶
- (default to 1, 0, 0). This is a setting for pointing vector mode. 
 
- 
std::string 
- 
struct ActuatorGuiSettings¶
- 
struct CustomModel¶
- Public Members - 
std::string modelPath¶
- Path to model obj -OR- “CUBE”, “CYLINDER”, or “SPHERE” to use a primitive shape. 
 - 
std::vector<std::string> simBodiesToModify¶
- Which bodies in scene to replace with this model, use “ALL_SPACECRAFT” to apply custom model to all spacecraft in simulation. 
 - 
double offset[3]¶
- [m] offset to use to draw the model 
 - 
double rotation[3]¶
- [rad] 3-2-1 Euler angles to rotate CAD about z, y, x axes 
 - 
double scale[3]¶
- [] desired model scale in x, y, z in spacecraft CS 
 - 
std::string customTexturePath¶
- (Optional) Path to texture to apply to model (note that a custom model’s .mtl will be automatically imported with its textures during custom model import) 
 - 
std::string normalMapPath¶
- (Optional) Path to the normal map for the customTexture 
 - 
int shader¶
- (Optional) Value of -1 to use viz default, 0 for Unity Specular Standard Shader, 1 for Unity Standard Shader 
 
- 
std::string 
- 
struct VizSettings¶
- Public Members - 
double ambient¶
- [-] Ambient background lighting. Should be a value between 0 and 8. A value of -1 means it is not set. 
 - 
int32_t orbitLinesOn¶
 - 
int32_t spacecraftCSon¶
- toogle for showing orbit lines (-1, 0, 1) 
 - 
int32_t planetCSon¶
- toogle for showing spacecraft CS (-1, 0, 1) 
 - 
std::vector<KeepOutInCone> coneList¶
- vector of powerLine structures 
 - 
std::vector<StdCameraSettings> stdCameraList¶
- vector of keep in/out cones 
 - 
std::vector<CustomModel> customModelList¶
- vector of spacecraft cameras 
 - 
std::vector<ActuatorGuiSettings> actuatorGuiSettingsList¶
- vector of custom object models 
 - 
std::string skyBox¶
- msg containing the flags on displaying the actuator GUI elements 
 - 
bool dataFresh¶
- string containing the star field options, ‘’ provides default NASA SVS Starmap, “ESO” use ESO Milky Way skybox, “black” provides a black background, or provide a filepath to custom background - [-] flag indicating if the settings have been transmitted, 
 
- 
double 
- 
class VizInterface: public SysModel¶
- Public Functions - 
VizInterface()¶
- VizInterface Constructor 
 - 
~VizInterface()¶
- VizInterface Destructor 
 - 
void SelfInit()¶
- Initialization method for subscription to messages. This module does not output messages, but files containing the protobuffers for Vizard 
 - 
void CrossInit()¶
- Cross initialization. Module subscribes to other messages. In viz interface, many messages are subscribed to in order to extract information from the viz and give it to the visualization tool. 
 - 
void Reset(uint64_t CurrentSimNanos)¶
- A Reset method to put the module back into a clean state - Parameters
- CurrentSimNanos: The current sim time in nanoseconds
 
 
 - 
void UpdateState(uint64_t CurrentSimNanos)¶
- Update this module at the task rate - Parameters
- CurrentSimNanos: The current sim time
 
 
 - 
void ReadBSKMessages()¶
- A method in which the module reads the content of all available bsk messages 
 - 
void WriteProtobuffer(uint64_t CurrentSimNanos)¶
- The method in which the viz_interface writes a protobuffer with the infomration from the simulation. - Parameters
- CurrentSimNanos: The current sim time in nanoseconds
 
 
 - Public Members - 
std::string cssDataInMsgName¶
 - 
std::string cssConfInMsgName¶
- [-] Name of the incoming css data 
 - 
std::string cameraConfInMsgName¶
- [-] Name of the incoming css constellation data 
 - 
std::string scPlusInMsgName¶
- [-] Name of the incoming camera data 
 - 
std::vector<std::string> spiceInMsgName¶
- [-] Name of the incoming SCPlus data 
 - 
std::vector<std::string> rwInMsgName¶
- [-] Name of the incoming Spice data 
 - 
std::vector<ThrClusterMap> thrMsgData¶
- [-] Name of the incoming rw data 
 - 
std::string starTrackerInMsgName¶
- [-] Name of the incoming thruster data 
 - 
std::string spacecraftName¶
- [-] Name of the incoming Star Tracker data 
 - [-] Name of the spacecraft being simulated 
 - 
uint64_t numSensors¶
- The name of the Image output message*/. 
 - 
bool saveFile¶
- [int] Set non-zero positive value if Unity/Viz couple in direct communication. (1 - regular opNav, 2 - performance opNav) 
 - 
bool liveStream¶
- [Bool] Set True if Vizard should save a file of the data. 
 - 
void *bskImagePtr¶
- [Bool] Set True if Vizard should receive a live stream of BSK data. 
 - 
std::string vizOutMsgName¶
- [RUN] Permanent pointer for the image to be used in BSK without relying on ZMQ because ZMQ will free it (whenever, who knows) 
 - 
std::vector<std::string> planetNames¶
- Names of planets we want to track, read in from python 
 - 
uint64_t numOutputBuffers¶
 - 
int64_t FrameNumber¶
- [-] Number of buffers to request for the output messages 
 - 
std::string protoFilename¶
- Number of frames that have been updated for TimeStamp message. 
 - 
int numRW¶
- Filename for where to save the protobuff message. 
 - 
int numThr¶
- [-] Number of RW set in python 
 - 
VizSettings settings¶
- [-] Number of Thrusters set in python 
 - 
CameraConfigMsg cameraConfigMessage¶
- [-] container for the Viz settings that can be specified from BSK 
 - Private Members - 
void *context¶
 - 
void *requester_socket¶
 - 
std::vector<MsgCurrStatus> rwInMsgID¶
 - 
std::vector<MsgCurrStatus> thrMsgID¶
- [-] ID of the incoming rw data 
 - 
MsgCurrStatus starTrackerInMsgID¶
- [-] ID of the incoming thruster data 
 - 
MsgCurrStatus scPlusInMsgID¶
- [-] ID of the incoming Star Tracker data 
 - 
std::vector<MsgCurrStatus> spiceInMsgID¶
- [-] ID of the incoming SCPlus data 
 - 
MsgCurrStatus cssDataInMsgId¶
- [-] IDs of the incoming planets’ spice data 
 - 
MsgCurrStatus cssConfInMsgId¶
- [-] ID of the incoming css data 
 - 
MsgCurrStatus cameraConfMsgId¶
- [-] ID of the incoming css constellation data 
 - 
int32_t imageOutMsgID¶
- [-] ID of the incoming camera data 
 - 
int firstPass¶
- ID for the outgoing Image message */. 
 - 
std::vector<RWConfigLogSimMsg> rwInMessage¶
- Flag to intialize the viz at first timestep */. 
 - 
STSensorIntMsg STMessage¶
- [-] RW data message 
 - 
std::vector<THROutputSimMsg> thrOutputMessage¶
- [-] ST data message 
 - 
std::vector<SpicePlanetStateSimMsg> spiceMessage¶
- [-] Thr data message 
 - 
SCPlusStatesSimMsg scPlusMessage¶
- [-] Spice messages 
 - 
CSSConfigFswMsg cssConfigMessage¶
- [-] s/c plus message 
 - 
std::ofstream *outputStream¶
- [-] CSS config 
 - 
std::map<uint32_t, SpicePlanetStateSimMsg> planetData¶
- [-] Output file stream opened in reset - Internal vector of planets 
 
-