![]() |
WarpTwin
Documentation for WarpTwin models and classes.
|
Class to propagate CR3BP dynamics in characteristic units. More...
Namespaces | |
| namespace | ms_py_writer |
Classes | |
| class | ConfigurationWriter |
| Write out script from UX to execute using set toolchain. Base class for override. More... | |
| struct | Connection |
| Hold all information related to a connection point in the ImGUI UX. More... | |
| class | EventLogger |
| Class to handle event and debug logging. More... | |
| struct | ImNode |
| Hold all data related to a visual node in the ImGUI UX. More... | |
| class | NodeBuilder |
| Generate a list of mapped nodes and connections from json. More... | |
| class | WarpTwinPyConfigWriter |
| Write out WarpTwin Python file from node information. More... | |
| class | CR3BPDynamics |
| class | Body |
| Class to define a body as a frame with mass and inertia. More... | |
| class | Frame |
| Frame class definition. More... | |
| class | FrameDynamics |
| class | Joint |
| Joint class defining relationship between frames. More... | |
| class | Node |
| Node class to apply forces and moments to frames. More... | |
| class | CsvLogger |
| Class for logging to CSV. More... | |
| class | Hdf5Logger |
| Class for logging to HDF5. More... | |
| class | LogManager |
| Class to manage logs. More... | |
| class | SpicePlanet |
| High fidelity planet model using the JPL cspice framework under the hood for ultra accurate states. More... | |
| struct | _accel_output_struct |
| Accelerometer Model. More... | |
| struct | _gps_output_struct |
| GPS Model. More... | |
| class | GroundStationSensor |
| Wrapper for ground station model which perturbs range and range rate for navigation purposes. More... | |
| struct | _gyro_output_struct |
| Gyro Model. More... | |
| struct | _magnetometer_output_struct |
| Configurable magnetometer model which takes input from simplified or high fidelity magnetic field models. More... | |
| struct | _pressure_output_struct |
| Pressure Sensor Model. More... | |
| struct | _sunsensor_output_struct |
| Model of sun sensor which produces look vector to the sun. More... | |
| class | ExternalInterfaceModel |
| Manage all external interfaces to and from warptwin. More... | |
| struct | Inputs |
| struct | Outputs |
| class | SixDOFDynamicsModel |
| Model to implement 6-DOF dynamics. More... | |
| class | ArgParser |
| Class to parse arguments from the command line in any language. More... | |
| struct | Dispersion |
| Struct to store all data associated with dispersion. More... | |
| struct | UniformDispersion |
| Struct to store all data associated with uniform dispersion. More... | |
| struct | NormalDispersion |
| Struct to store all data associated with normal dispersion. More... | |
| class | DispersionEngine |
| Class to generate input dispersions for the simulation. More... | |
| class | Model |
| Base model class for derived implementation. More... | |
| class | NormalRandom |
| Class to generate random numbers according to normal distribution. More... | |
| class | SimScheduler |
| Simple implementation of the scheduler class. More... | |
| class | SimTimeManager |
| Class to manage time for the simulation object. More... | |
| class | SimulationExecutive |
| Implementation of the executive class for simulation. More... | |
| class | UniformRandom |
| Class to generate random numbers according to uniform distribution. More... | |
| class | VisualsModel |
| Class for managing WarpTwin visuals. More... | |
| class | AutoDoc |
| Class to document from code. More... | |
| class | DataIOShmemRelay |
| Relay DataIO data over a shared memory. More... | |
| class | DataIOSocketRelay |
| Relay DataIO data over a socket. More... | |
| class | Interpolate2D |
| A class for performing simple x-y linear interpolation. More... | |
| class | InterpolateBilinear |
| A class for performing simple x-y-z bilinear interpolation. More... | |
| class | InterpolateTrilinear |
| A class for performing simple a-b-c-d trilinear interpolation. More... | |
| class | LatencyUtil |
| Latency model. More... | |
| class | SpiceManager |
| The Spice Manager is a single class instance to manage spice frames and return SPICE states. More... | |
Enumerations | |
| enum | connection_type_e { PARAM = -1 , INPUT = -2 , LOG = -3 , ALL_INPUT = -4 , OUTPUT = 1 } |
| Hold acceptable values for connection type. More... | |
| enum | gui_data_types_e { NUMERIC = 0 , STRING = 1 , POINTER = 2 , VECTOR3 = 3 , QUATERNION = 4 , FRAME_PTR = 5 , UNDEFINED = 6 , MATRIX = 7 , ARRAY = 8 , TIME = 9 , STD_VECTOR = 10 } |
| Type definition for valid connections in the warptwin GUI. More... | |
| enum | node_types_e { STANDARD = 0 , MODEL = 1 , SIM_EXEC = 2 , TEXT_NODE = 3 , FRAME = 4 , LOGGER = 5 , VIZKIT = 6 , CESIUM_VIZ = 7 } |
| Node type definition to allow config writer to identify custom nodes. More... | |
| enum | joint_type_e { NOT_SET , MIXED , FULLY_FREE , FULLY_LOCKED } |
| enum | cmds_e { OFF = 0 , ON } |
| enum | power_load_mode_e { OFF = 0 , IDLE = 1 , ACTIVE = 2 } |
| enum | integrator_type_e { FORWARD_EULER = 1 , RK4 = 4 } |
| enum | nav_time_sources_e { NAV_SRC_SYSTEM , NAV_SRC_GPS , NAV_SRC_UTC , NAV_SRC_TDB } |
| enum | simulation_steps_e : int16 { NOT_SCHEDULED =-2 , STARTUP_ONLY =-1 , ALL =0 , START_STEP =1 , DERIVATIVE =2 , END_STEP =3 } |
Functions | |
| template<typename T> | |
| int | mean (T *array, unsigned int size, T &result) |
| template<typename T> | |
| int | variance (T *array, unsigned int size, T &result) |
| template<typename T> | |
| int | stdev (T *array, unsigned int size, T &result) |
| template<typename T> | |
| int | max (T *array, unsigned int size, T &result) |
| template<typename T> | |
| int | min (T *array, unsigned int size, T &result) |
| double | muStar (double m1, double m2) |
| Function to return the characteristic mass for CR3BP. | |
| double | lStar (double r) |
| Function to return the characteristic length for CR3BP. | |
| double | tStar (double r, double mu) |
| Function to return the characteristic time for the CR3BP. | |
| clockwerk::CartesianVector< 3 > | convertPosDim2Nd (clockwerk::CartesianVector< 3 > pos_d, double l_star) |
| Function to convert position from dimensional to characteristic units. | |
| clockwerk::CartesianVector< 3 > | convertVelDim2Nd (clockwerk::CartesianVector< 3 > vel_d, double l_star, double t_star) |
| Function to convert velocity from dimensional to characteristic units. | |
| clockwerk::CartesianVector< 3 > | convertPosNd2Dim (clockwerk::CartesianVector< 3 > pos_nd, double l_star) |
| Function to convert position from characteristic to dimensional units. | |
| clockwerk::CartesianVector< 3 > | convertVelNd2Dim (clockwerk::CartesianVector< 3 > vel_nd, double l_star, double t_star) |
| Function to convert velocity from characteristic to dimensional units. | |
| int16 | start () override |
| Class to execute logging. | |
| int16 | execute () override |
| Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in derived class. | |
| int | getFrameRelativeDCM (Frame &f1, Frame &f2, clockwerk::DCM &dcm_f1_f2) |
| A function to get the DCM represnting the relationship [f1/f2]. | |
| int | frameRotate (const clockwerk::CartesianVector< 3 > &vec__f1, Frame &f1, Frame &f2, clockwerk::CartesianVector< 3 > &vec__f2) |
| A function to rotate vector vec__f1 from frame f1 into frame f2. | |
| int | framePositionTransform (const clockwerk::CartesianVector< 3 > &vec_f1__f1, Frame &f1, Frame &f2, clockwerk::CartesianVector< 3 > &vec_f2__f2) |
| A function to transform a position vector relative to the origin of f1 to a vector relative to the origin of f2. | |
| int | frameVelocityTransform (const clockwerk::CartesianVector< 3 > &vel_f1__f1, const clockwerk::CartesianVector< 3 > &pos_f1__f1, Frame &f1, Frame &f2, clockwerk::CartesianVector< 3 > &vel_f2__f2) |
| A function to transform a velocity vector represented in frame f1 to a vector represented in f2. | |
| clockwerk::DCM | getCompositeRotation (clockwerk::DCM &dcm_f1_f2, clockwerk::DCM &dcm_f2_f3) |
| A function to get the composite rotation generated by subsequent rotations. | |
| clockwerk::Quaternion | getCompositeRotationQuat (clockwerk::Quaternion &quat_f1_f2, clockwerk::Quaternion &quat_f2_f3) |
| A function to get the composite rotation generated by subsequent rotations. | |
| void | simpleEncrypt (char *unencrypted, char *encrypted, char size, const std::string &key) |
| Function to perform a simple encryption of a buffer of data. | |
| void | simpleDecrypt (char *encrypted, char *unencrypted, char size, const std::string &key) |
| Function to decrypt a buffer of data – companion to simpleEncrypt. | |
| void | writeFileBinarySize (char *buffer, char buffer_size, const std::string &filename) |
| Function to write a buffer of bytes to a file, along with their size. | |
| void | readFileBinarySize (char buffer[MAX_SIZE_CHAR], char *size_actual, const std::string &filename) |
| Function to read a buffer of bytes from a file. | |
| int | checkVerifyLicense (const std::string &license_file, const std::string &license_server) |
| Function to check and verify that user has license for the simulation. | |
| void | parseLicenseString (std::string str, std::string &licensee, int &year, int &month, int &day) |
| Function to parse license string for relevant data. | |
| MODEL(Servo) public int16 | deactivate () override |
| Model to simulate a servo's motion. | |
| MODEL (TimedImpulsiveBurnModel) public | |
| Model which applies a fixed impulse to a vehicle at a set sim or UTC time. | |
| warptwin::ImpulseModel * | impulseModel () |
| Function to get a handle to the impulse model contained within this model. | |
| MODEL(Spacecraft) public int | initializePositionVelocity (CartesianVector3 position_sc_frame__frame, CartesianVector3 velocity_sc_frame__frame, const std::string &frame_name) |
| Spacecraft Model. | |
| int | initializeFromOrbitalElements (double a, double e, double i, double RAAN, double w, double f) |
| Function to initialize the spacecraftrelative to planet from orbital elements. | |
| int | initializeAttitude (clockwerk::Quaternion quat_sc_frame__frame, CartesianVector3 ang_vel_sc_frame__sc, Frame *frame_ptr=nullptr) |
| Initialize attitude and angular velocity of the spacecraft body frame. | |
| int | initializeAttitude (clockwerk::Quaternion quat_sc_frame__frame, CartesianVector3 ang_vel_sc_frame__sc, const std::string &frame_name) |
| Initialize attitude and angular velocity of the spacecraft body frame. | |
| warptwin::TimedImpulsiveBurnModel * | programManeuver (CartesianVector3 delta_v__f, std::string time_string, Frame *force_frame_ptr) |
| Function to program a timed impulsive burn into the spacecraft. | |
| warptwin::TimedImpulsiveBurnModel * | programManeuver (CartesianVector3 delta_v__f, double sim_time, Frame *force_frame_ptr) |
| Function to program a timed impulsive burn into the spacecraft. | |
| int | addPowerLoad (clockwerk::DataIO< double > *power_load_ptr) |
| Add a power load to the spacecraft. | |
| void | clearPowerLoads () |
| Clear the list of power loads. | |
| int | addPowerSource (clockwerk::DataIO< double > *power_source_ptr) |
| Add a power source to the spacecraft. | |
| void | clearPowerSources () |
| Clear the list of power sources. | |
| warptwin::FrameStateSensorModel * | planetInertialStateSensor () |
| Function to get a handle to the frame state sensor relative to the planet inertial frame. | |
| warptwin::FrameStateSensorModel * | planetRotatingStateSensor () |
| Function to get a handle to the frame state sensor relative to the planet rotating frame. | |
| warptwin::LvlhFrameManagerModel * | lvlhFrameManager () |
| Function to get a handle to the LVLH frame manager contained within this model. | |
| warptwin::AsphericalGravityModel * | asphericalGravityModel () |
| Function to get a handle to the aspherical gravity model contained within this model. | |
| warptwin::SphericalHarmonicsGravityModel * | sphericalHarmGravityModel () |
| Function to get a handle to the spherical harmonics gravity model contained within this model. | |
| warptwin::PlanetRelativeStatesModel * | planetRelativeModel () |
| Function to get a handle to the planet relative state model contained within this model. | |
| warptwin::GravityGradientModel * | gravityGradientModel () |
| Function to get a handle to the gravity gradient model contained within this model. | |
| warptwin::MSISAtmosphereModel * | msisModel () |
| Function to get a handle to the MSIS atmosphere model contained within this model. | |
| warptwin::FlatPlateDragModel * | atmosDrag () |
| Function to get a handle to the flat plate drag model contained within this model. | |
| int | _configureFromPlanet () |
| Configure the spacecraft class to map to planet. | |
| void | _mapInternal () |
| Function to internally map relationships between sensors. | |
| void | _calculatePowerAccumulation () |
| Sum the power loads and sources to calculate power accumulation. | |
| SIGNAL (_mu, double, warpos::earth_wgs84.mu) | |
| SIGNAL (_eq_radius, double, warpos::earth_wgs84.eq_radius) | |
| SIGNAL (_flattening, double, warpos::earth_wgs84.flattening) | |
| SIGNAL (_J2, double, warpos::earth_wgs84.J2) | |
| SIGNAL (_J3, double, warpos::earth_wgs84.J3) | |
| double | _computeFreeSpacePathLoss (double range, double frequency) const |
| Function to compute the free space path loss. | |
| void | _configureInternal () |
| Function to configure sensor – runs in all constructors. | |
| MODEL (MSISAtmosphereModel) public | |
| High fidelity atmosphere model utilizing the NRL MSIS implementation. | |
| int | _msisCheckInputs () |
| Function to check range of input values. | |
| MODEL(Accelerometer) public warptwin::MarkovUncertaintyModel * | getNoiseModel () |
| Accessor for the internal noise model. | |
| warptwin::RateMonitor * | rateMonitor () |
| Accessor for the internal rate monitor model. | |
| int16 | activate () override |
| MODEL (IMU) public | |
| Model of IMU on vehicle which accounts for noise, bias, and drift. | |
| warptwin::Gyroscope * | Gyroscope () |
| Function to access the internal gyro model. | |
| MODEL(Magnetometer) public warptwin::MarkovUncertaintyModel * | biasNoiseModel () |
| Accessor for the internal bias and noise model. | |
| MODEL (PressureSensor) public | |
| Accessor for the internal noise model. | |
| warptwin::OccultationModel * | occultationModel () |
| Accessor for the internal occultation model. | |
| MODEL(GroundStationModel) public warptwin::FrameStateSensorModel * | frameStateSensorEnu () |
| Simple ground station model. | |
| warptwin::RangeAzElSensorModel * | rangeAzElSensor () |
| int | _updateStates () |
| MODEL(DirectionalAdaptiveGuidance) public CartesianVector3 | _calcForceRswFromAlphaBeta (double alpha, double beta) |
| Weighted Directional Adaptive Guidance for Low Thrust Maneuvering. | |
| MODEL(MarkovUncertaintyModel) public double | getBias () |
| Markov Uncertainty Model. | |
| virtual int16 | registerApp (warpos::App &app, int16 slot) |
| Function to register apps with the table scheduler. | |
| int16 | _executeScheduleStep (const clockwerk::Time &step_time) |
| Execute schedule step given current step time. | |
| bool | contains (const std::string &parent_str, const std::string &substr) |
| Function to return whether substr is in parent_str. | |
| std::string | trim (const std::string &str, const std::string &whitespace=" \t") |
| Function to trim leading and trailing whitespace from string. | |
| int | frameRelativeInit (Frame &target, Frame &reference, const CartesianVector3 &pos_tgt_ref__ref, const CartesianVector3 &vel_tgt_ref__ref) |
| Function to initialize frame target relative to freame reference inertially. | |
| int | orbitInit (Frame &target, Frame &planet, double mu, double a, double e, double i, double RAAN, double w, double f) |
| Function to initialize a body's position and velocity from an orbit. | |
| template<typename T, long unsigned int N> | |
| std::string | printArray (const std::array< T, N > &val) |
| Debug function to print an array. | |
| bool | fileExist (const std::string &name) |
| Function to quickly check and verify whether a file exists. | |
| int | readTxtFile (const std::string &filename, std::vector< std::vector< double > > &data, const std::string &header_end_mark="!", const std::string &delimeter=" ", unsigned int num_cols=10) |
| Reads a text file and populates a 2D vector with column-based numerical data. | |
| template<typename T> | |
| int | satlin (T input, T &output, T limit=1.0) |
| This function is a saturated linear function that behaves like a linear function in the range of [0, limit], everywhere else the function is 0th order and piecewise continuous. | |
| template<typename T> | |
| int | satlins (T input, T &output, T limit=1.0) |
| This function is a symmetric saturated linear function that behaves like a linear function in the range of [-limit, limit], everywhere else the function is 0th order and piecewise continuous. | |
| template<typename T> | |
| int | poslin (T input, T &output) |
| This function is a positive linear transfer function that behaves like a linear function only when x > 0, otherwise the function returns zero. | |
| template<typename T> | |
| int | Heaviside (T input, T &output, T center=0.0) |
| This function is the Heaviside step function (or more colloquially the unit step function). This returns zero for all values less than center and return one for all values greater of equal than the center. | |
| template<typename T> | |
| int | signum (T input, T &output) |
| This function is the signum function (typically denoted sgn). Described simply, it outputs the sign (e.g. negative one, positive one, or zero) or the input. | |
| template<typename T> | |
| int | deadzoneTrimmed (T input, T bounds, T &output) |
| This function will supress all inputs within (±) the specified bounds. The trimmed deadzone function is piecewise continuous, so it will shift the inputs in the linear regions. | |
| template<typename T> | |
| int | deadzone (T input, T bounds, T &output) |
| This function will supress all inputs within (±) the specified bounds. The deadzone function is NOT piecewise continuous, so it will have discontinuities at the bounds. | |
| template<typename T> | |
| int | clamp (T input, T min_val, T max_val, T &output) |
| This function will force a value to be between the defined minimum and maximum values. If input is less than the minimum, then the output will be the minimum. If the output is larger than, then the output will be the maximum. Otherwize the output is the input. | |
| template<typename T> | |
| int | factorial (int n, T &output) |
| Computes the factorial of a non-negative integer. Currently the gamma function is not supported. | |
| template<typename T> | |
| T | factorial (int n) |
| Wrapper for factorial function with no error code return, only use if confident on valid inputs. | |
| std::string | writeTrajectory (const std::vector< double > &lat, const std::vector< double > &lon, const std::vector< double > &alt, bool project_to_ground=true, const std::string &color="7f00ffff") |
| Function to write a trajectory into a KML file. | |
| void | writeKmlFile (const std::string &file, const std::vector< std::vector< double > > &lat, const std::vector< std::vector< double > > &lon, const std::vector< std::vector< double > > &alt, const std::vector< std::string > &colors, bool project_to_ground=true) |
| Function to write a full KML file from trajectory data. | |
| int | twoBodyPropagate (double time, double mu, clockwerk::CartesianVector< 3 > pos_initial, clockwerk::CartesianVector< 3 > vel_initial, clockwerk::CartesianVector< 3 > &pos_final, clockwerk::CartesianVector< 3 > &vel_final) |
| Function to propagate a body between two points in time using a keplerian orbit. | |
| int | mean2eccentric (double mean_anomaly, double eccentricity, double &eccentric_anomaly, double tol, int max_iter) |
| Function to convert mean anomaly to eccentric anomaly. | |
| int | eccentric2true (double eccentric_anomaly, double eccentricity, double &true_anomaly) |
| Function to convert eccentric anomaly to true anomaly. | |
| int | true2eccentric (double true_anomaly, double eccentricity, double &eccentric_anomaly) |
| Function to convert true anomaly to eccentric anomaly. | |
| int | eccentric2mean (double eccentric_anomaly, double eccentricity, double &mean_anomaly) |
| Function to convert eccentric anomaly to mean anomaly. | |
| int | readWMMCoefficientsFile (const std::string &filename, double g[NUMBER_OF_READ_COEFFICIENTS], double h[NUMBER_OF_READ_COEFFICIENTS], double gdot[NUMBER_OF_READ_COEFFICIENTS], double hdot[NUMBER_OF_READ_COEFFICIENTS], double &epoch) |
| Reads magnetic field coefficients for WMM from a file and stores them in provided matrices. | |
| double | muWMM (double input) |
| Unary functional input to the associated Legendre function specific to the WMM model. This is typically denoted as mu or t in literature such as Winch et al. 2005 or Heiskanen and Moritz 1967, respectively. | |
| double | dmuWMM (double input) |
| Unary functional input to the associated Legendre function specific to the WMM modelm, derivative w.r.t. the functional's input. This is typically denoted as mu or t in literature such as Winch et al. 2005 or Heiskanen and Moritz 1967, respectively. | |
| int | schmidtSemiNormLegendreWMM (int N, double x, double *Pcup, double *dPcup) |
| Computes the Schmidt Semi-Normalized Legendre function outputs provided the maximum degree (N) as a positive integer. The formula's require that N > 0, and abs(input) <= 1.0. | |
| int | schmidtSemiNormLegendreSingularityWMM (int N, double x, double *PcupS) |
| Computes the Schmidt Semi-Normalized Legendre function outputs provided the maximum degree (N) as a positive integer when the position is at a singularity. The formula's require that N > 0, and abs(input) <= 1.0. | |
| int | rv2coe (const CartesianVector3 &pos, const CartesianVector3 &vel, double mu, CartesianVector6 &elements) |
| Function to convert cartesian xyz pos/vel to orbital elements. | |
| int | coe2rv (CartesianVector6 &elements, double mu, CartesianVector3 &pos, CartesianVector3 &vel) |
| Function to convert orbital elements to cartesian xyz. | |
| DCM | dcmPqr2Xyz (double i, double W, double w) |
| Function to generate a 3-1-3 DCM to rotate from PQR to XYZ coordinates. | |
| int | lvlhFrame (const CartesianVector3 &pos, const CartesianVector3 &vel, clockwerk::DCM &lvlh_frame, CartesianVector3 &lvlh_ang_vel__lvlh) |
| Function to generate an LVLH frame attitude DCM from position and velocity. | |
| double | true2eccentric (double true_anomaly) |
| Convert true anomaly to eccentric anomaly. | |
| std::vector< std::vector< double > > | pcr2lla (const std::vector< double > &pcr_x, const std::vector< double > &pcr_y, const std::vector< double > &pcr_z, double a=6378137.0, double flattening=(1.0/298.257223563)) |
| Wrapper around pcrDeticToLLA for bulk conversion of x, y, z coordinates. | |
| int | heikkinenLla (const clockwerk::CartesianVector< 3 > &pos__pcr, double r_planet_equatorial, double flattening, double &lat_rad, double &lon_rad, double &alt) |
| Function to calculate detic LLA from PCR state using the Heikkinen algorithm. | |
| int | readGravityCoefficientsFile (const std::string &filename, double cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], long int &n, long int &m) |
| Reads gravitational coefficients from a file and stores them in provided matrices. | |
| void | neumannNormalization (double cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double c[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double s[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1]) |
| Applies Neumann normalization to spherical harmonic coefficients. | |
| int | sphericalHarmonics (long N, long M, double r, double phi, double theta, double Re, double K, double C[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double S[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], clockwerk::CartesianVector< 3 > &grad_v) |
| Computes the gradient of the gravitational potential using spherical harmonics. | |
| int | legendre (long N, long M, double x, double P[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sd_p[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1]) |
| Calculates the associated Legendre functions and their derivatives. | |
| double | fact (long n) |
| Computes the factorial of a non-negative integer. | |
| double | oddfact (long n) |
| Computes the double factorial of an odd integer. | |
| void | loadKernel (std::string kernel) |
| A function to load in a sinle spice kernel. | |
| std::string | toUpper (const std::string &input) |
| Function to convert a string to all upper case. | |
| std::string | toLower (const std::string &input) |
| Function to convert a string to all lower case. | |
| bool | caseInsensitiveEqual (const std::string &in_a, const std::string &in_b) |
| Function to compare two strings independent of case. | |
| std::string | strip (const std::string &input) |
| Removes leading and trailing whitespace characters from a string. | |
| std::string | stringReplace (const std::string &source, const std::string &orig_str, const std::string &new_str) |
| Replace the first element of a source string with a new element. | |
| bool | isValidNumber (const std::string &s) |
| Checks if the given string is a valid numeric representation. | |
| int | splitString (const std::string &text, const std::string &delimiter, std::vector< std::string > &tokens) |
| Splits a string into a vector of substrings based on a specified string delimiter. | |
| template<typename T, long unsigned int N> | |
| int | setArrayFromString (const std::string &s, std::array< T, N > &retval) |
| Set a std::array from a string. | |
| template<typename T> | |
| int | setVectorFromString (const std::string &s, std::vector< T > &retval) |
| Set a std::array from a string. | |
Name of the model type | |
List all default options for the specified model type
This function returns all of the pre-configured default json configurations for the model as stored in data/defaults/<Model type name> | |
| std::vector< std::string > | listDefaultConfigsByModelName (std::string name) |
| int | parseDefaultConfigFromJson (const std::string &class_type, const std::string &default_name, nlohmann::json &j) |
| Parse the default configuration from a JSON file into a PBR JSON object. | |
Variables | |
| const std::vector< std::pair< connection_type_e, std::string > > | INPUT_CONN_TYPES |
| Hold all connection type enum values to loop through. | |
| const unsigned int | DEFAULT_MAX_MSG = 280 |
| Define some standard messages for writing to file. | |
| const std::vector< std::string > | NODE_CATEGORIES |
| const int | MAX_ITER = 5 |
| const unsigned int | NUM_CR3BP_STATES = 6 |
| clockwerk::SimLogger * | _logger = nullptr |
| Handle to our logger object. | |
| constexpr uint32 | FRAME_MAXIMUM_NUM_CHILDREN = 100 |
| const int | MAX_SIZE_CHAR = 0xFF |
| const std::string | KEY = "kodasandymoosebuddy" |
| const int | NO_ERROR = 0 |
| const int | ERROR_LICENSE = 300 |
| double | _mu_star |
| double | _l_star |
| double | _t_star |
| clockwerk::CartesianVector< 3 > | _internal_pos |
| clockwerk::CartesianVector< 3 > | _internal_vel |
| std::array< double, 6 > | _input_states |
| std::array< double, 6 > | _rates |
| CR3BPDynamics | _dynamics |
| clockwerk::CartesianVector< 3 > | _tmp |
| BiasNoiseModel | _torque_bias_noise |
| The bias and noise model for torque output. | |
| Node | _wheel_node |
| The reaction wheel node. | |
| Matrix3 | _mom_inertia_tensor |
| Matrix to hold the moment of inertia tensor of the wheel. | |
| double | _torque_perturbation = 0.0 |
| Value to hold perturbation to torque. | |
| double | _total_torque = 0.0 |
| Value to hold total torque calculation. | |
| double | _rps_to_rpm = 60.0/(2*M_PI) |
| Conversion between radians per second and revolutions per minute. | |
| bool | _prev_com = false |
| Boolean to store the previous operational state. | |
| BiasNoiseModel | _noise_model |
| The bias and noise model for servo angle output. | |
| LatencyUtil< double > | _latency_model |
| The latency model for servo angle output. | |
| double | _servo_angle_actual |
| Temporary value that has perturbations acted upon it. | |
| double | _latency_return |
| Temporary value for the return of the latency value. | |
| double | _turn_direction |
| The turn direction of the servo for this time step. | |
| double | _max_turn_amount |
| The maximum amount that the servo can spin in the time of a single simulation step. | |
| const double | ON_STATE = 1e-15 |
| BiasNoiseModel | _thruster_bias_noise |
| The bias and noise model for thrust output. | |
| Node | _thruster_node |
| The node at which thrust is applied. | |
| double | _nominal_thrust = 0.0 |
| Our nominal thrust calculation from Isp and the like. | |
| double | _thrust_perturbation = 0.0 |
| Value to hold perturbation to thrust. | |
| double | _total_thrust = 0.0 |
| Value to hold total thrust calculation. | |
| int | _cmd_state = OFF |
| Value to hold last thrust command. | |
| int | _prev_cmd = OFF |
| TimeTriggerMonitor | _time_trigger |
| ImpulseModel | _impulse |
| Node | _force_node |
| bool | _triggered = false |
| BiasNoiseModel | _current_bias_noise |
| The bias and noise model for current. | |
| Node | _coil_node |
| The torque coil node. | |
| double | _perturbation = 0.0 |
| Value to hold perturbation to current command. | |
| CartesianVector3 | _torque_vec |
| Value to hold total torque calculation. | |
| CartesianVector3 | _z_axis |
| Vector to hold temporary axes during orientation calculation. | |
| clockwerk::DCM | _DCM_Body_Mag |
| Temporary DCM for quaternion calculation. | |
| double | _misalignment_x = 0.0 |
| Misalignment angle. | |
| double | _misalignment_y = 0.0 |
| double | _misalignment_z = 0.0 |
| clockwerk::Quaternion | _tempQuat |
| Temporary quaternion for misalignment calculation. | |
| double | _theta = 0.0 |
| Misalignment angle magnitude and unit vector. | |
| CartesianVector3 | _evec |
| CartesianVector3 | _mag_field_vec_body |
| Temporary DCM for magnetic field transformation. | |
| MODEL(CustomPlanet) public Frame | _planet_inertial = Frame("planet_inertial_frame") |
| Custom planet consisting of inertial and rotating frame which can be configured with custom rotation rate. | |
| Frame | _planet_rotating = Frame("planet_rotating_frame") |
| clockwerk::DataIO< Body * > | body = clockwerk::DataIO<Body*>(this, "body", &_body) |
| clockwerk::DataIO< Body * > | lvlh = clockwerk::DataIO<Body*>(this, "lvlh", nullptr) |
| Body | _body |
| Node | _gravity_node |
| Node | _drag_node |
| FrameStateSensorModel | _planet_inertial_state_sensor |
| FrameStateSensorModel | _planet_rotating_state_sensor |
| LvlhFrameManagerModel | _lvlh_frame_manager |
| GravityGradientModel | _gravity_gradient |
| PlanetRelativeStatesModel | _planet_relative |
| FlatPlateDragModel | _atmos_drag |
| AsphericalGravityModel * | _asp_ptr = nullptr |
| SphericalHarmonicsGravityModel * | _sph_ptr = nullptr |
| MSISAtmosphereModel * | _msis_ptr = nullptr |
| std::string | _planet_name = "earth" |
| std::vector< TimedImpulsiveBurnModel * > | _planned_burn_ptrs |
| std::vector< clockwerk::DataIO< double > * > | _power_load_ptrs |
| std::vector< clockwerk::DataIO< double > * > | _power_source_ptrs |
| SimpleComAnalysisModel | _tx_com_analysis_model |
| SimpleComAnalysisModel | _rx_com_analysis_model |
| FrameStateSensorModel | _fss |
| double | _power_TX_dBm |
| Power leaving the transmitter in decibel-milliWats. | |
| double | _power_reflected_W |
| Power reflected back into the system in Watts. | |
| const double | PC_15_2 = 0.5*15.0 |
| const double | PC_3_2 = 0.5*3.0 |
| const double | PC_35_2 = 0.5*35 |
| double | r |
| double | precalc_j2 |
| double | precalc_j3 |
| CartesianVector3 | grav_force__planet |
| CartesianVector3 | _mean_wind__comp |
| Internal variables for rotated vectors. | |
| CartesianVector3 | _dist_wind__comp |
| CartesianVector3 | _gust_wind__comp |
| clockwerk::DCM | _DCM_directMeanWindFrame_to_meanWindFrame |
| Internal variable for the rotation from the direct mean wind frame to the mean wind vector representation frame. | |
| double | _mean_wind_rot_angle |
| Internal variable for the mean wind frame rotation angle. | |
| int | _err |
| CartesianVector3 | _mag_dipole__PCR |
| CartesianVector3 | _mag_field__PCR |
| double | _scaling_factor |
| MODEL(GravityGradientModel) public CartesianVector3 | _pos_body_pci__body |
| Gravity Gradient Model. | |
| double | _r |
| Point mass gravity model. | |
| double | _multiplier |
| CartesianVector3 | _ggTorque |
| nrlmsise_flags | _flags |
| nrlmsise_input | _input |
| nrlmsise_output | _output |
| unsigned int | _step_counter = 0 |
| unsigned int | _start_run = 0 |
| MODEL(OccultationModel) public double | _a_i |
| Occultation model using spherical representations of objects. | |
| double | _d |
| double | _d_1 |
| double | _d_2 |
| double | _d_e |
| double | _d_i |
| double | _d_o |
| double | _tmp1 |
| double | _tmp2 |
| double | _tmp3 |
| double | _tmp4 |
| double | _tmp5 |
| CartesianVector3 | _s_ob_vec |
| CartesianVector3 | _tmpvec |
| CartesianVector3 | _grav_force__planet |
| const std::vector< double > | ALTITUDE_INTERPOLATE = {2000.0, 11000.0, 44000.0, 200000.0} |
| const std::vector< double > | TURBULENCE_INTERPOLATE = { 10.0, 10.0, 4.0, 4.0} |
| const double | NEGATIVE_FIVE_OVER_SIX = -5.0/6.0 |
| const double | NEGATIVE_ELEVEN_OVER_SIX = -11.0/6.0 |
| const double | NUM_1P339 = 1.339 |
| const double | NUM_2P678 = 2.678 |
| const double | NUM_0P00823 = 0.00823 |
| const double | NUM_0P177 = 0.177 |
| double | _turb_intensity_u |
| double | _turb_intensity_v |
| double | _turb_intensity_w |
| double | _scale_length_u |
| double | _scale_length_v |
| double | _scale_length_w |
| double | _altitude_feet |
| double | _wind_u_feet |
| double | _wind_v_feet |
| double | _wind_w_feet |
| NormalRandom< double > * | _normal_random |
| Interpolate2D | _interpolate2D_model |
| const int | NUMBER_OF_SET_POINTS = 16 |
| const std::vector< double > | PREIMAGE_SET = {0.0, 1000.0, 2000.0, 3000.0, 4000.0, 5000.0, 6000.0, 7000.0, 8000.0, 9000.0, 10000.0, 20000.0, 30000.0, 40000.0, 50000.0, 100000.0} |
| std::vector< double > | _image_set |
| double | _altitude_true |
| double | _azimuth |
| double | _magnitude |
| UniformRandom< double > | _uniform_random |
| CartesianVector3 | _unitpos_body_sun_f |
| double | _K |
| double | _c [NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] |
| double | _s [NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] |
| CartesianVector3 | _accel_grav__spherical |
| double | _lat |
| double | _lon |
| double | _alt |
| double | _r_pos |
| double | _colatitude |
| double | _sth |
| double | _cth |
| double | _sph |
| double | _cph |
| CartesianVector3 | _fe |
| double | _alt_km |
| double | _min_altitude_km |
| double | _max_altitude_km |
| std::vector< std::vector< double > > | _atmos_table |
| Interpolate2D | _interp_pressure |
| Interpolate2D | _interp_temperature |
| Interpolate2D | _interp_density |
| bool | _min_warned = false |
| bool | _max_warned = false |
| const double | WMM_EARTH_RADIUS = 6371200.0 |
| double | _g [NUMBER_OF_READ_COEFFICIENTS] |
| Implicit returns form the read coefficients function in magneticFieldUtils.h. | |
| double | _h [NUMBER_OF_READ_COEFFICIENTS] |
| double | _gdot [NUMBER_OF_READ_COEFFICIENTS] |
| double | _hdot [NUMBER_OF_READ_COEFFICIENTS] |
| double | _epoch |
| double | _lat_centric |
| double | _lat_detic |
| double | _dummy |
| Dummy variables for ignoring unneeded function implicit returns. | |
| double | _rad |
| double | _Xprime |
| double | _Yprime |
| double | _Zprime |
| double | dt |
| bool | _WARN_BAD_FILE_EPOCH |
| double | _g_n_m |
| double | _h_n_m |
| int | _index |
| double | _P_n_m |
| int | _N |
| bool | _WARN_CANT_CHANGE_N |
| double * | _P |
| double * | _dP |
| double * | _PcupS |
| bool | _at_singularity |
| double | _pow_a_by_r |
| double | _cos_m_lon |
| double | _sin_m_lon |
| clockwerk::DCM | _temp_NED_ECEF |
| double | _total_system_capacity |
| double | _peak_system_voltage |
| double | _system_shutoff_capacity |
| double | _current_capacity |
| Interpolate2D | _voltage_interp_table |
| OccultationModel | _oc |
| FrameStateSensorModel | _fss_sc_s |
| EffectiveSolarAreaModel | _esa |
| SolarPanelPowerModel | _spp |
| Frame | _sensor_frame |
| The sensor frame in which all measurements will be taken. | |
| MarkovUncertaintyModel | _sensor_noise_model |
| The bias and noise model for sensor output. | |
| RateMonitor | _rate_monitor |
| Rate monitor to control the rate at which the sensor runs. | |
| CartesianVector3 | _previous_bias |
| Temporary variable to hold the bias vector at last function call. | |
| CartesianVector3 | _perturbed_accel |
| Temporary variable to hold the perturbed acceleration with and without gravity. | |
| CartesianVector3 | _perturbed_accel_no_grav |
| clockwerk::DCM | _dcm_sf_root |
| A DCM relating our sensor frame to root. | |
| CartesianVector3 | _gravity__sensor |
| The gravity vector as represented in the sensor frame. | |
| clockwerk::CartesianVector< 3 > | _in_deadzone |
| Temporary variable for checking if sensor is in deadzone. Each element of vector corresponds to an axis. | |
| _accel_output_struct | _last_output |
| Temporary variable for the latest recorded output added to latency model and dummy output for stepping though latency. | |
| GroundStationModel | _gs |
| bool | _seen_last_step |
| FrameStateSensorModel | _state_GPS_PCR |
| Frame state sensor model of the GPS frame relative to the PCR frame. | |
| double | _truth_altitude |
| Truth altitude used for dead-zone determination. | |
| double | _truth_speed |
| Truth speed used for dead-zone determination. | |
| double | _output_lon |
| Internal variables for function implicit returns. | |
| double | _output_lat |
| double | _output_alt |
| CartesianVector3 | _previous_pos_bias |
| Internal variables for the previous bias of the position and velocity measurements. | |
| CartesianVector3 | _previous_vel_bias |
| CartesianVector3 | _perturbed_pos |
| Internal variables for the perturbed position and velocity. | |
| CartesianVector3 | _perturbed_vel |
| CartesianVector3 | _total_error |
| Temporary variable to hold total error for gyro. | |
| CartesianVector3 | _perturbed_ang_vel |
| Temporary variable to hold the perturbed ang vel. | |
| warptwin::Accelerometer | _accelerometer |
| The IMU accelerometer model. | |
| warptwin::Gyroscope | _gyro |
| The IMU gyro model. | |
| CartesianVector3 | _truth_mag_field__mag |
| Temporary variable to hold the truth magnetic field vector in the sensor frame. | |
| CartesianVector3 | _perturbed_mag |
| Temporary variable to hold the perturbed acceleration with and without gravity. | |
| double | _meas_pres |
| Temporary variable to hold the measured pressure before bound checks and reolution quantinization. | |
| BiasNoiseModel | _sensor_bias_noise |
| The bias and noise model for sensor output. | |
| clockwerk::DCM | _tmp_dcm |
| CartesianVector3 | _pos_tgt_mount__mount |
| OccultationModel | _occult |
| Occultation model. | |
| FrameStateSensorModel | _sun_relative_state |
| Model to compute the position of the sun relative to the sun sensor frame. | |
| FrameStateSensorModel | _primary_orbiter_relative_state |
| Model to compute the position of the primary orbiter relative to the sun sensor frame. | |
| UniformRandom< double > * | _uniform_random_model = nullptr |
| Interal model for generating a uniform random number. | |
| CartesianVector3 | _pos_ss_ss__ss = CartesianVector3({0.0, 0.0, 0.0}) |
| Internal variable for the position of the sun sensor with respect to the sun sensor represented in sun sensor frame coordinates. Zero vector always. | |
| CartesianVector3 | _pos_PCI_ss__ss |
| Internal variable for the position of the primary orbiter with respect to the sun sensor represented in sun sensor frame coordinates. | |
| CartesianVector3 | _pos_SCI_ss__ss |
| Internal variable for the position of the Sun with respect to the sun sensor represented in sun sensor frame coordinates. | |
| CartesianVector3 | _pos_SCI_ss__ss_unit |
| CartesianVector3 | _w |
| Temporary vector used for random rotations. | |
| clockwerk::Quaternion | _q |
| Temporary quaternion used for random rotations. | |
| CartesianVector3 | _v_obj__aero |
| CartesianVector3 | _v_wind__aero |
| double | _safesqrtresult |
| clockwerk::DCM | _dcm_tmp |
| CartesianVector3 | _tmp_tgt |
| Frame | _enu_frame |
| The ENU frame created for the GS by this model. | |
| FrameStateSensorModel | _fss_enu |
| The frame state sensor for relative states to the ENU frame. | |
| RangeAzElSensorModel | _range_az_el_sensor |
| The range az el sensor for our actual ground station. | |
| FrameStateSensorModel | _fss_gs_pci |
| The frame state sensor for GS state in the PCI frame. | |
| MODEL(LlaDeticStateInit) public int | _error |
| Model to produce position/velocity vector from a set of detic latitude, longitude, altitude coordinates. | |
| CartesianVector3 | _pos__pcr |
| MODEL(OrbitalElementsSensorModel) public CartesianVector6 | _orbital_elements |
| Model for sensing the instantaneous orbital elements of a vehicle given its position and velocity. | |
| CartesianVector3 | _pos |
| CartesianVector3 | _vel |
| double | _radius |
| The radius set by the enum centric_by. | |
| double | _polar_radius |
| clockwerk::Quaternion | _sc_quat_tmp_root |
| CartesianVector3 | _sc_pos_tmp__root |
| CartesianVector3 | _sc_vel_tmp__root |
| CartesianVector3 | _sc_pos_tmp__sc |
| CartesianVector3 | _sc_vel_tmp__sc |
| NormalRandom< double > * | _rng = nullptr |
| RNG to produce our distribution. | |
| MODEL(EffectiveSolarAreaModel) public CartesianVector3 | _face_normal_vector__body |
| Effective Solar Area model. | |
| CartesianVector3 | _face_normal_vector__sun |
| Temporary variable to hold the vector that is normal to the surface after converting to the solar frame. | |
| double | _dot_product_normal_solar |
| Temporary variable to hold the result of the dot product between the normal vector and solar vector. | |
| Frame | _lvlh_frame = Frame("lvlh_frame") |
| This is the actual LVLH frame. | |
| clockwerk::DCM | _lvlh_attitude__r |
| Temporary variable to hold lvlh attitude. | |
| CartesianVector3 | _lvlh_ang_vel__lvlh |
| Temporary variable to hold LVLH angular velociyt in lvlh frame. | |
| double | _bias |
| Internal variable for holding the bias and its deviations from the initial value. | |
| double | _bias_drift |
| double | _scale_factor |
| Internal variables for the different noise sources. | |
| double | _noise |
| double | _sqrt_time_step |
| Internal variable for 1/sqrt(Hz). | |
| MODEL(SimTableScheduleModel) public Params | params = Params(this, "params") |
| Model of simulated table schedule for flight software emulation. | |
| Inputs | inputs = Inputs(this, "inputs") |
| Outputs | outputs = Outputs(this, "outputs") |
| std::vector< std::pair< warpos::App *, int16 > > | _registries |
| warpos::TableScheduler< 10 > * | _ts_10 = nullptr |
| warpos::TableScheduler< 50 > * | _ts_50 = nullptr |
| warpos::TableScheduler< 100 > * | _ts_100 = nullptr |
| warpos::TableScheduler< 200 > * | _ts_200 = nullptr |
| warpos::TableScheduler< 1000 > * | _ts_1000 = nullptr |
| clockwerk::Time | _time_per_slot |
| clockwerk::Time | _step_end_sys_time |
| clockwerk::Time | _next_step_start |
| int | _total_slots = 0 |
| std::vector< std::vector< double > > | _timing_values_micros |
| The number of microseconds per app to run. | |
| std::vector< int > | _schedule_mapping |
| Map schedule indices to timing vector. | |
| std::vector< warpos::App * > | _app_record |
| Record of mapped apps. | |
| std::vector< std::string > | _names |
| int16 | _last_sch_step = 0 |
| bool | _first_run = true |
| std::chrono::time_point< std::chrono::high_resolution_clock > | _start_time |
| std::chrono::time_point< std::chrono::high_resolution_clock > | _end_time |
| std::vector< std::vector< double > > | _thrust_table |
| Interpolate2D | _interp_thrust |
| double | _min_time_s |
| double | _max_time_s |
| bool | _out_of_range |
| MODEL(ProximityMonitor) public CartesianVector3 | _rel_position |
| const std::string | ARG_INDICATOR = "--" |
| const int | HASH_MULTIPLIER = 37 |
| const int | HASH_ADDER = 3 |
| const int | DAYS_BEFORE_MONTH [12] |
| const std::map< std::string, int > | MONTH_MAP |
| const std::string | DEFAULT_SIMULATION_TIME = "2023 September 26, 12:00:00 MDT" |
| This is the default simulation time. | |
| const double | GPS_TO_J2000_ET_OFFSET = 630763200.0 |
| This is the offset between the GPS and J2000 epochs for calculation of GPS time The GPS epoch is January 6, 1980. | |
| const std::string | VISUALS_FILE_LOC_NAME = warptwinDir() + slash() + "CesiumViz" + slash() + "tmp-data" + slash() + "ms-visuals.czml" |
| const std::string | VISUALS_APP_ADDR = warptwinDir() + slash() + "CesiumViz" + slash() + "runVisualsApp.py" |
| const std::string | CZML_FILE_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "template.txt" |
| const std::string | SOCKET_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "template_socket_update.txt" |
| const std::string | CZML_SATELLITE_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "satellite.txt" |
| const std::string | CZML_FACILITY_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "facility.txt" |
| const std::string | CZML_FACILITY_LINK_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "facilitylink.txt" |
| const std::string | CZML_LINK_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "link.txt" |
| const std::string | CZML_SPACECRAFT_LINK_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "spacecraftlink.txt" |
| const std::string | CZML_START_INTERVAL = "<<START_INTERVAL>>" |
| const std::string | CZML_END_INTERVAL = "<<END_INTERVAL>>" |
| const std::string | CZML_SATELLITE_STRINGS = "<<SAT_STRINGS>>" |
| const std::string | CZML_GS_STRINGS = "<<GS_STRINGS>>" |
| const std::string | CZML_LINK_STRINGS = "<<LINK_STRINGS>>" |
| const std::string | CZML_SPACECRAFT_LINK_STRINGS = "<<SPACECRAFT_LINK_STRINGS>>" |
| const std::string | CZML_SPACECRAFT_NAME = "<<SPACECRAFT_NAME>>" |
| const std::string | CZML_MODEL_START = "<<MODEL_START>>" |
| const std::string | CZML_MODEL_END = "<<MODEL_END>>" |
| const std::string | CZML_MODEL_FILE_NAME = "<<MODEL_FILE_NAME>>" |
| const std::string | CZML_FACILITY_NAME = "<<FACILITY_NAME>>" |
| const std::string | CZML_PRIMARY_SPACECRAFT_NAME = "<<PRIMARY_SPACECRAFT_NAME>>" |
| const std::string | CZML_SECONDARY_SPACECRAFT_NAME = "<<SECONDARY_SPACECRAFT_NAME>>" |
| const std::string | CZML_DESCRIPTION = "<<DESCRIPTION>>" |
| const std::string | CZML_LEAD_TIME = "<<LEAD_TIME>>" |
| const std::string | CZML_TRAIL_TIME = "<<TRAIL_TIME>>" |
| const std::string | CZML_SPACECRAFT_POSITION = "<<SPACECRAFT_POSITION>>" |
| const std::string | CZML_SPACECRAFT_ATTITUDE = "<<SPACECRAFT_ATTITUDE>>" |
| const std::string | CZML_LINK_INTERVALS = "<<LINK_INTERVALS>>" |
| const std::string | CZML_IS_CONNECTED = "<<IS_CONNECTED>>" |
| const std::string | CZML_VISIBLE_INTERVALS = "<<VISIBLE_INTERVALS>>" |
| const std::string | TITLE = "= " |
| const std::string | AUTHOR_EMAIL_START = " <" |
| const std::string | AUTHOR_EMAIL_END = "> " |
| const std::string | HEADER_ONE = "== " |
| const std::string | HEADER_TWO = "=== " |
| const std::string | CODE_LITERAL = "```" |
| const std::string | TABLE_HEADER_START = "[\%header,cols=" |
| const std::string | TABLE_HEADER_END = "*]\n" |
| const std::string | TABLE_MARKER = "|===\n" |
| const std::string | TABLE_LINE_START = "|" |
| const std::string | IMAGE_START = "image::" |
| const std::string | ALIAS_START = "[" |
| const std::string | ALIAS_END = "]" |
| const std::string | LINK_START = "link:++" |
| const std::string | LINK_END = "++" |
| const std::string | DOC_REF_START = "xref:" |
| const int | SHMEM_STRING_ALLOC_SIZE = 1000 |
| Amount of space reserved for strings in shmem. | |
| const int | DATASOCK_IO_BUFFER_SIZE = 1000 |
| const std::map< int, double > | FACTORIAL_CACHE |
| const int | MAX_HARMONIC_COEFFICIENTS = 12 |
| const int | NUMBER_OF_READ_COEFFICIENTS = (MAX_HARMONIC_COEFFICIENTS*(MAX_HARMONIC_COEFFICIENTS+1))/2 + MAX_HARMONIC_COEFFICIENTS |
| const double | ORBIT_DOUBLE_TOL = 1e-12 |
| const int | NMAX_SPHERICAL_HARMONICS = 18 |
| const int | MAX_SPICE_NAME_LENGTH = 33 |
Class to propagate CR3BP dynamics in characteristic units.
File: Conversions.h
This file contains analysis utilities to convert units in the circular restricted three body problem (cr3bp).
All conversions are per Dr. Pernicka of Missouri S&T and the following online utilities: https://orbital-mechanics.space/the-n-body-problem/circular-restricted-three-body-problem.html
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech
This class is used to propagate circular restricted 3 body problem dynamics in characteristic units. It sets internal parameters on the basis of the setters for mu and l, which are used in the propagation.
| enum warptwin::cmds_e |
Node type definition to allow config writer to identify custom nodes.
| Enumerator | |
|---|---|
| STANDARD | |
| MODEL | Simplified dynamics model representing motion in the circular restricted 3 body problem. Tabular thrust model This model reads and returns thrust on the basis of simulation time based on a predetermined thrust table provided for specific vehicles. Bias and noise model. Simple spacecraft-to-spacecraft link model. Model for determining the latitude, longitude, altitude state of a vehicle relative to an oblate planet. Model to produce position/velocity vector from orbital elements. Model for sensing the relative state between two frames in WarpTwin. Aerodynamics State Model. Accessor for the internal bias and noise model. Model of spacecraft star tracker. Simple Camera Model. Accessor for the internal noise model. Accessor for the internal rate monitor model. Simple Earth Observation Model. Solar panel model. Simplified model of vehicle battery system which estimates battery capacity considering power input, draw. Model of a power load. Tabular atmosphere model. Spherical Harmonics Model. Solar Radiation Pressure Model. Simple mean wind model. Simple disturbance wind model. Point mass gravity model. Simplified magnetic field model which treats Earth as a dipole magnet. Composite wind model. Aspherical gravity model with J2 and J3 effects. Model of spacecraft radio including losses and gains with comm links and power draw. Torque Coil Model. Reaction Wheel Model. This model calculates the expected acceleration experienced by a body acting under three-body dynamics using the circular restricted three body assumptions. Note the synodic frame definition is consistent with the definitions in this same directory, which is as follows:
Key assumptions:
This is a model of a reaction wheel which applies a torque to a reaction wheel and thus the spacecraft in the opposite direction. The momentum stored in the reaction wheel and the wheel speed are both recorded. A positive torque is applied about the z axis of the reaction wheel which is the orthoganal vector to the reaction wheel. Note that the torque applied to the sc body will be negative of the commmanded torque. Noise is applied as a gaussian noise about the commanded torque. This is a model of a torque coil which applies a torque using the magnetic field generated by an electromagnet (with no ferromagnetic core) interacting with the Earth's magnetic field. A positive torque is applied about the torque vector when a positive current is applied. Note that this direction is the orthogonal vector (Area Vector) of the wire coil. Noise is applied as a gaussian noise about the commanded current. This model is used to calculate the communications link and power draw of a radio system. It is meant to be configured in pairs. All the parameters are referring to the characteristics of this radio. First, define all of the attributes of this radio model and pass in another radio model with its own configuration as a parameter. The the output of this model uses simple communication analysis to calculate the comms data based on the relationship between the two radios. For example, you could have one radio model attached to a ground station and another representing a spacecraft. You assign the transmit and receive characteristics in each radio model and then set the other_radio parameter to point to the other model. The model will then output information about the link in both the receive and transmit direction from the point of view of this radio. The output from each radio will be identical except from the perspective of the radio. This means to analyze the full link between the two, you only need the output of one of the models. This model also calculates the power draw of the radio based on whether it is transmitting or receiving. If the radio is transmitting,the power draw output will be the power_draw_TX parameter, and if it is receiving, the power draw output will be the power_draw_RX parameter. IMPORTANT: Though loss is generally expressed as a negative gain, this model assumes that loses are positive and will subtract accordingly. For example, suppose your receiver system has poor circuitry and you expect the power received to decrease by half. This would be a gain of -3 dB, however this model expects the user to input a loss of positive 3 dB. In general, loss = -gain. Author: Alex Jackson alex..nosp@m.jack.nosp@m.son@a.nosp@m.ttx..nosp@m.tech The transmitter carrier frequency in hertz (Hz) (MUST MATCH OTHER RADIO). Default is the amateur radio satellite communication frequency of 437 MHz. The bandwidth of transmission (Hz) 50 kHz is common for UHF (MUST MATCH OTHER RADIO) The bit rate in bits per second (bps) 9600bps is a common value for UHF (MUST MATCH OTHER RADIO) The transmit power in Watts (W). Transmit power is usually around 1 Watt for cubesats Return loss of this radio when transmitting, this value describes ratio of power that is reflected back into the system. Should be input as positive but is normally negative. Default is a representative value of 14 dB The transmit antenna gain in decibels relative to isotropic (dBi) Default is 2.15 representative of a dipole The total transmit system loss in decibels (dB). This is the accumulation of transmitter pointing loss, and transmitter circuit loss. Inputting zero assumes that there is no return loss (despite this actually being 100% return loss). 5 db is a conservative estimate for typical satellite systems The receive antenna gain in decibels relative to isotropic (dBi). Usually the same as the transmit antenna gain unless there is a separate receive antenna. The noise temperature in Kelvin (K). This value is realted to the system noise density by Boltzmann*noise_temp and system noise power by the equation band_width*noise_density. Generic input of 307.5 should be replaced by data sheet value(MUST MATCH OTHER RADIO) The total receive system loss in decibels (dB). This is the accumulation of receiver side loss such as pointing loss, radome loss, polarization loss, and atmospheric loss. 4 db is a conservative estimate for typical satellite systems The cross polarization loss in decibels (dB). General rule of thumb, if both RX and TX have same-hand circular or linear (0dB), if there is a circular to linear match (3dB), but a right vs left circular mismatch can result in 20 to 30 dB loss. (MUST MATCH OTHER RADIO) The energy per bit to noise ratio required in dB. Based on various modulation schemes for a desired bit error rate. For BPSK an Eb/N0 required of about 11 allows for a bit error rate around 1e-6. (MUST MATCH OTHER RADIO) The power draw of the radio when transmitting in Watts (W) Note that this is different from the transmit power. Default is no power draw The power draw of the radio when receiving in Watts (W). Default is no power draw A pointer to the other radio model to which this radio is communicating The frame that the radio is attached to. Used to calculate range This is the mask flag for the ground station. True for masked, False for visible An int to indicate if the radio is transmitting. The power draw is set to the TX power draw if greater than 0 and RX power draw if equal to 0. If this is less than zero it is set to the opposite of the masked flag (constantly transmitting when in view) The free space path loss in decibels (FSPL) (dB). This is the same in both directions The effective isotropic radiated power (EIRP) in decibel-milliWatts (dBm) The receive power in decibel-milliWatts (dBm) The system noise figure (NF) in decibel-milliWatts/Hz (dBm/Hz) The signal-to-noise density ratio (SNR) in decibel (dB) The energy per bit to noise ratio in in decibels (dB) The link margin in decibels (dB) The effective isotropic radiated power (EIRP) in decibel-milliWatts (dBm) The receive power in decibel-milliWatts (dBm) The system noise figure (NF) in decibel-milliWatts/Hz (dBm/Hz) The signal-to-noise density ratio (SNR) in decibel (dB) The energy per bit to noise ratio in in decibels (dB) The link margin in decibels (dB) The power draw of the radio in Watts (W) This model calculates gravity for a planetary body, accounting for effects due to the J2 and J3 perturbations. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter in m^3/s^2 for ease of use This is the J2 parameter of our parent planet. Defaults to Earth's J2 parameter for ease of use This is the J3 parameter of our parent planet. Defaults to Earth's J3 parameter for ease of use This is the radius of our parent planet. Defaults to Earth's radius, in meters for ease of use This is the mass of the body, which will be multiplied by our force to get the force calculation The position of the object body in the reference frame f This is the total acceleration due to gravity calculated in the same reference frame as pos_body__f This is the total force due to gravity calculated in the same reference frame as pos_body__f This is the acceleration due to point mass gravity calculated in the same reference frame as pos_body__f This is the acceleration due to J2 calculated in the same reference frame as pos_body__f This is the acceleration due to J3 calculated in the same reference frame as pos_body__f This model takes in the three major components to a high fidelity wind model: 1). Mean wind: the average steady-state wind velocity vector 2). Gust wind: the stochastic and time dependent busts of intense wind 3). Disturbance wind: the stochastic and time dependent random fluctuations in the wind The model takes the three components and their respective frames and outputs the composite wind (sum of all components) in the desired output frame. Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The frame of the mean wind input vector. The frame of the gust wind input vector. The frame of the disturbance wind input vector. If left as nullptr, the model assumes the disturbance frame is the direct mean wind frame: X : In the direction of the mean wind Y : Cross-wind, perpendicular to the direction of mean wind but in local surface horizontal plane (Z cross X = Y) Z : Aligned with the mean wind frame. Perpendicular to surface. The frame of the composite wind output vector. Mean wind vector expressed in the frame specified by the params. Velocity must be relative to a planet rotating frame. (meters/second) Gust wind vector expressed in the frame specified by the params. Velocity must be relative to a planet rotating frame. (meters/second) Disturbance wind vector expressed in the frame specified by the params. Velocity must be relative to a planet rotating frame. (meters/second) The composite wind vector expressed in the frame specifiec by the params. The velocity is expressed relative to the planet rotating frame. (meters/second) This model calculates the magnetic field vector represented in the PCI frame and object frame using a simple dipole model. The equations and parameters used for this model come from "Fundamentals of Spacecraft Attitude Determination and Control" by Markley and Crassidis, chapter 11 section 1.1, equation 11.5 Note: Crassidis defines the equations from the magnetic south pole, I define my equations from the magnetic north pole. Author: James Tabony Email: james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The colatitude of the IGRF magnetic north pole as referenced in the global latitude/longitude map. Defaults to global north pole (radians) The longitude of the IGRF magnetic north pole as referenced in the global latitude/longitude map. Defaults to globak north pole (radians) Planet magnetic field magnitude at planet equitorial distance. Defaults to Earth. (nT ~ nanoTesla) Planet equitorial distance, specific to the magnetic field model. Defaults to Earth. (meters) Planet rotating frame pointer. Position of the object frame with respect to the planet rotating frame, resolved/expressed in the planet rotating frame coordinates. (meters) The magnetic field vector local to the object, represented in the planet centered rotating frame, PCR. (nT ~ nanoTesla) This model generates forces acting on a body under the influence of a simple point mass gravity field. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use This is the mass of the body, which will be multiplied by our force to get the force calculation... TODO to replace this with accel methods The position of the object body in the reference frame f This is the acceleration due to gravity calculated in the same reference frame as pos_body__f This model generates an objects experienced mean wind through a pseudo-deterministic process. The mean wind magnitude is based an a power function sclaled by a reference wind spead at a given altitude. $$ V(h) = V_{ref} * \left( \frac{h}{h_{ref}} \right)^\alpha $$ The wind direction perturbed around a provided value (wind direction at reference altitude) in a continuous (not smooth) manner. By a function f(h) with uniformly distributed outputs for select altitudes between the values of [-1, 1]. This relationship is: $$ \theta(h) = \theta_0 + \Delta \theta \cdot f(h) \qquad f:h \in \mathbb{R} \mapsto [-1, 1] \, \, \text{and} \, f(0) := 0 $$ Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech Wind speed at 20 feet altitude from surface NOT WGS84 ellipsoid. Defaults to 30 knots which corresponds to moderate turbulence. (meters/second) Altitude of the surface relative to the WGS84 model. (meters) Value to seed the internal RNG for this model. Altitude of the object as relative to the WGS84 model. (meters) The disturbance wind vector of the object expressed in the mean wind frame (meters/second), defined as: X : In the direction of the mean wind Y : Cross-wind, perpendicular to the direction of mean wind but in local surface horizontal plane (Z cross X = Y) Z : Aligned with the mean wind frame. Perpendicular to surface. The velocity is expressed relative to a planet rotating frame. This model generates an objects experienced mean wind through a pseudo-deterministic process. The mean wind magnitude is based an a power function sclaled by a reference wind spead at a given altitude. $$ V(h) = V_{ref} * \left( \frac{h}{h_{ref}} \right)^\alpha $$ The wind direction perturbed around a provided value (wind direction at reference altitude) in a continuous (not smooth) manner. By a function f(h) with uniformly distributed outputs for select altitudes between the values of [-1, 1]. This relationship is: $$ \theta(h) = \theta_0 + \Delta \theta \cdot f(h) \qquad f:h \in \mathbb{R} \mapsto [-1, 1] \, \, \text{and} \, f(0) := 0 $$ Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The average wind speed measured at the reference altitude. (meters/second) The average wind azimuth angle (angle of the wind vector measured off of local north towards east) at the reference altitude. Make sure to set before exc.startup. (radians) Reference altitude, typically close to the surface. This altitude is measured from surface NOT WGS84 ellipsoid. (meters) Altitude of the surface relative to the WGS84 model. (meters) Wind shear factor. Used to describe the change in mean wind magnitude with respect to altitude. This parameter is dependent on the terrain underneath the flight operation. Open sea ~ 0.1, Suburban ~ 0.25, Forest/Mountains ~ 0.4. Maximum direction shift of mean wind. You can effectively turn off the wind vector shear by setting this value to zero. (radians) Value to seed the internal RNG for this model. Altitude of the object as relative to the WGS84 model. (meters) The mean wind vector of the object expressed in the local NED frame of the reference position. The velocity is expressed relative to the planet rotating frame. (meters/second) This model calculates the solar radiation pressure perturbation that acts on a body in orbit. The methods and calculations in this model come from https://freeflyer.com/_help_Files/spherical_srp.htm Author: Sam Matez Email: sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h The solar flux , defaults to the mean solar flux at one astronomical unit (W/m^2) The body coefficient of reflectivity () The area of the body subject to solar radiation (the mean area that faces the sun). Defaults to 1 m^2 The body position wrt the Sun in any generic frame. Defaults to 1 AU in meters with sun in X direction The current solar intensity on a scale of 0 to 1 where 0 is eclipse and 1 is direct sunlight The force acting on the body due to solar radiation pressure (N) in the smae generic frame as the input Implements spherical harmonic gravity up to an 18x18 field based on the implementation in the 42 simulation: https://github.com/ericstoneking/42/blob/4be580d8defc968da97d937ce09ef107c07860cb/Kit/Source/envkit.c#L82 Author: Sam Matez Email: sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h The filename for the file that contains the coefficients for spherical harmonic calculation. These coefficients should be un-normalized, as the model applies a Neumann normalization to the loaded coefficients. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use This is the radius of our parent planet. Defaults to Earth's radius, in meters for ease of use The coefficient n which represents the variations in gravitational field in the latitudinal direction The coefficient m which represents the variations in gravitational field in the longitudinal direction. must be less than or equal to n This is the mass of the body, which will be multiplied by our force to get the force calculation... TODO to replace this with accel methods The body position wrt the planet in a planet-centered, planet fixed frame (m) This is the acceleration due to gravity calculated in the same reference frame as pos_body__f This is the force due to gravity calculated in the same reference frame as pos_body__f This model reads and returns atmospheric parameters pressure, temperature, and density on the basis of altitude in meters above ground level. The model reads from files in the format defined in data/atmosphere, which is a txt format input. This is a highly simplified implementation – for ultra high fidelity propagation consider using a different model. For values above the tabulated range, the model returns the values at the end of the table for temperature and zero for pressure and density. For values below the end of the table the model returns the lowest altitude value in the table. Speed of sound calculation based on Introduction to Flight by Anderson, p. 177 eq 4.54 Text file must be in the format H(km) T(K) p(Pa) ρ(kg/m^3) Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m.engin.nosp@m.eeri.nosp@m.ng.co.nosp@m.m The atmosphere data file which should be loaded. Default is 1976 std atmosphere. Our ideal gas constant for speed of sound calculation. Default is for air The specific heat ratio for air – used in calculation of the speed of sound The reference altitude in meters above sea level The temperature of the atmosphere in degrees kelvin The pressure of the atmosphere in Pascals (N/m^2) The density of the atmosphere in kg/m^3 The speed of sound in meters per second Implements the World Magnetic Model (WMM) References: [1] The US/UK World Magnetic Model for 2020-2025 by Arnaud Chulliat et al. (NOAA) and William Brown et al. (British Geological Survey Geomagnitsm Team) [2] Pysical Geodesy by Heiskanen and Moritz 1967 [3] Geomagnetism and Schmidt quasi-normalization by Winch et al. 2005
Author: James Tabony Email: james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The filename for the file that contains the Gauss coefficients for spherical harmonic calculation. NOAA releases a new set of coefficients every 5 years on years that are divisible by 5 (e.g. 2015, 2020, 2025, ...) that are most valid from the year they are realseed until the next coefficient set release. The coefficient n which represents the variations in gravitational field in the latitudinal direction. Also the harmonic function order. This value must be chosen before executive startup. (1 <= N <= 12) The body position wrt the planet in a planet-centered rotating frame (meters) The local magnetic field vector expressed in body's local North East Down frame. (nanoTesla) The local magnetic field vector expressed in ECEF frame. (nanoTesla) The power load model is a simple model of a power load meant to represent the power draw of components that are otherwise unmodeled (such as heaters or scientific instruments). The model accounts for power draw in three modes: active, idle, and off (no power draw). Power draw while in ACTIVE mode, in Watts Power draw while in IDLE mode, in Watts Power draw while in OFF mode, in Watts The current mode of the power load: 0 = off, 1 = idle, 2 = active Instantaneous power draw of the power load, in Watts Author: Alex Reynolds alex@.nosp@m.attx.nosp@m..tech The peak voltage provided by a single battery (summed to make full pack) The capacity, in W*hr, provided by a single spacecraft battery The % of charge at which power shuts off. Default is 0.0 (no shutoff until capacity is empty) Should be a percent. value in the range 0-->1 indicating the initial charge state of the system The number of batteries configured in series. Determines the system voltage and shutoff The number of batteries configured in parallel. Used with series to determine system capacity The capacity-voltage curve defined by percent capacity against pct max voltage. Default is lithium ion The amount of power generated by the system in the given step, in W The amount of power drawn from the system in the given step, in W The net change in power in the system for the step, in W The depth of discharge, a percentage value denoting the depletion of the battery system. (%) The current voltage of the power system The current draw of the system, in Amps Boolean indicating whether power is available (true) or not (false) from the system This model defines a solar panel model that accounts for eclipse, pointing, size, and efficiency. This is a combination of the Solar Panel Power, Occultation, and Effective Solar Area moddels to aide in ease of use. Author: Alex Jackson Email: alex..nosp@m.jack.nosp@m.son@a.nosp@m.ttx..nosp@m.tech The mass of the solar panel in kg. Default is massless The solar irradiance at the location of interest in power per area (the default is in W/m^2) The solar panel efficiency on a scale of 0 to 1 where 0 is 0 percent efficiency and 1 is 100 percent efficiency The area of the solar panel. The solar panel normal vector in the body frame. This is used to describe the orientation of the solar panel wrt to the body frame (default is the x axis ) The inertial Sun frame Sun radius in m The parent frame which the body frame is orbiting Planet radius in m (default is Earth radius) Body frame of the spacecraft Whether the solar panel should remain body fixed and perform effective area calculations (true/default), or should assume effective solar area is always 100% of panel size for a simpler calculation (false) The power generated by the panel in watts Fraction of two spherical representations of objects that are visible from the point of view of the observer. 0 is fully occulted, 1 is not occulted, 0-1 is visible fraction of observed object. This model defines a simple Earth Observation configuration with revisit counts, range, and observation times. The maximum angle off nadir the spacecraft is allowed to look for a valid pass, in radians The frame of the spacecraft object that the ground station will sense The planet rotating frame to which the ground station is attached. Note that the planet rotating frame must be a child of the associated planet inertial frame, which is also used in this model. This is the detic latitude of the target site, in radians The longitude of the target site, in radians The total amount of time, in seconds, that the site has been observable The total number of visits by the spacecraft to the site This is the range of the spacecraft to the target This is the range rate of the spacecraft wrt the target This is the look angle of the spacecraft wrt the target site, in radians This flag indicates whether the targeted ground site is visible or not. 1 = visible The initial bias in position measurement output described as a three-element vector in meters. Default is no bias. Must be set before model startup. The initial bias in velocity measurement output described as a three-element vector in meters/second. Default is no bias. Must be set before model startup. The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. The frame in which the GPS measurements are given relative to. This is the primary planets rotating frame (e.g. ECEF). For now, this must be Earth's rotating frame. Maximum altitude above the WGS84 ellipsoid that the GPS will work. Defaults to 18,000 meters, the maximum altitude set by CoCom for civilian GPS devices. (meters) Minimum altitude above the WGS84 ellipsoid that the GPS will work. (meters) Maximum speed with respect to the rotating primary that the GPS will work. Defaults to 1900 km/hr, the maximum speed set by CoCom for civilian GPS devices. (meters/second) Latency of the gps sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the GPS. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the GPS. (kg) The one-sigma Gaussian noise in position measurement output described as a three-element vector in meters. Default is no noise. The one-sigma Gaussian noise in velocity measurement output described as a three-element vector in meters/second. Default is no noise. The one-sigma Gaussian noise in the position bias drift described as a three-element vector in meters/sqrt(second). Default is no walking-bias drift. The one-sigma Gaussian noise in the velocity bias drift described as a three-element vector in meters/second/sqrt(second). Default is no walking-bias drift. Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output position of the GPS sensor frame with respect to the PCR frame. This is not the position of the body but instead the position of the GPS sensor. This value includes noise, bias, and blackout-zones. The "perfect" output position of the GPS sensor with respect to the PCR frame. This is not the position of the body but instead the position of the GPS sensor. This value does not include noise, bias, or blackout-zones. This is an informational parameter and is not subject to latency. The measured output velocity of the GPS sensor frame with respect to the PCR frame. This is not the velocity of the body but instead the velocity of the GPS sensor. This value includes noise, bias, and blackout-zones. The "perfect" output velocity of the GPS sensor frame with respect to the PCR frame. This is not the velocity of the body but instead the velocity of the GPS sensor. This value does not include noise, bias, or blackout-zones. This is an informational parameter and is not subject to latency. The detic longitude of the GPS sensor frame. Does include sensor noise, bias, and blackout-zones. (rad) The detic latitude of the GPS sensor frame. Does include sensor noise, bias, and blackout-zones. (rad) The detic altitude of the GPS sensor frame. Does include sensor noise, bias, and blackout-zones. (meters) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
The initial bias in gyroscope measurement output described as a three-element vector in radians/second. Default is no bias. Must be set before model startup. The minimum angular velocity that the sensor can record in each axis. Default is -540 degrees/second (radians/second) The maximum angular velocity that the sensor can record in each axis. Default is 540 degrees/second (radians/second) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the gyroscope relative to the mount frame The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantinization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (radians/second) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. Latency of the pressure sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the gyroscope. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the gyroscope. (kg) The one-sigma Gaussian noise in gyroscope measurement output described as a three-element vector in radians/second. Default is no noise. The one-sigma Gaussian noise in the gyroscope bias drift described as a three-element vector in radians/second/sqrt(second). Default is no walking-bias drift. The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output angular velocity produced by the gyro describing the angular velocity of the sensor frame relative to the simulation root frame appropriate bias, noise, latency, and rate limiting. (radians/second) The "perfect" output angular velocity produced by the gyro describing the angular velocity of the sensor frame (incl. misalignment) relative to the simulation root frame without bias and noise. This is an informational parameter and thus is not subject to latency. (radians/second) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) Current bias of the gyroscope. (rad/s)
This model simulates a simplified camera which produces line of sight (alpha and beta) angles relative to a target Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The frame of the object being sensed by the simple camera model. The bias in the alpha angle measurement output described as a single scalar, with angle in RADIANS. This parameter may account for a number of factors, including misalignment, measurement bias, etc. Default is no bias. The bias in the beta angle measurement output described as a single scalar, with angle in RADIANS. This parameter may account for a number of factors, including misalignment, measurement bias, etc. Default is no bias. The one-sigma gaussian noise in alpha measurement output described as a scalar, with angle in RADIANS. Default is no noise. The one-sigma gaussian noise in beta measurement output described as a scalar, with angle in RADIANS. Default is no noise. The vehicle frame relative to which the camera is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the camera in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the camera relative to the mount frame The rate at which the camera generates an output, in hertz. Setting this value to 0 forces the camera to output at the simulation rate. Value to seed the internal RNG for this model. Power draw of the camera. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the camera. (kg) The alpha angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame plus appropriate bias, noise, and rate limiting. The beta angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame plus appropriate bias, noise, and rate limiting. The alpha angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame without noise or error. This parameter is informational. The beta angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame without noise or error. This parameter is informational. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) Accessor for the internal bias and noise model
This model represents a simple star tracker which may be parameterized with a given bias, noise, and rate. It measures the attitude of the star tracker frame, which is internally configured, relative to an externally assigned reference frame. The mount frame is defined as: Centered in the center of the reference image X is "up" in the image Y is "right" in the image Z is "into" the image completing the right hand frame |-------------------—| | x^ | | |-->y | | | |-------------------—| Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The bias in measurement output described as a 3-2-1 Euler angle sequence, with angles in RADIANS. This parameter may account for a number of factors, including misalignment, measurement bias, etc. Default is no bias. The cross axis accuracy of the star tracker in radians. Default is perfect accuracy The twist axis accuracy of the star tracker in radians. The default is perfect accuracy The field of view of the star tracker defined as the full cone angle in Radians. Default is pi/6 radians. The mass of the star tracker in kg. Default is massless The vehicle frame relative to which the star tracker is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the star tracker in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the star tracker relative to the mount frame The radiation tolerance of the star tracker in krad. Default is no radiation tolerance The reference frame relative to which all star tracker measurements will be returned. If a reference frame is not set, all star tracker measurements will be returned relative to the simulation root frame. The rate at which the star tracker generates an output, in hertz. Setting this value to 0 forces the star tracker to output at the simulation rate. Value to seed the internal RNG for this model. Power draw of the star tracker. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measurement output quaternion produced by the star tracker describing the orientation of the star tracker "sensor frame" relative to the reference frame plus appropriate bias, noise, and rate limiting. The "perfect" output quaternion produced by the star tracker describing the orientation of the star tracker "sensor frame" relative to the reference frame. This parameter is informational and free from error. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) Accessor for the internal bias and noise model
The fixed bias of the sun sensor. This could be a mixture of a misalignment error and/or measurement noise offset. The field of view respective to the horizontal of the focal plane. This is defined as full FOV NOT the half angle measured from boresight. (degrees) The field of view respective to the vertical of the focal plane. This is defined as full FOV NOT the half angle measured from boresight. (degrees) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor relative to the mount frame and resolved in the mount frame. (meters) The alignment of the sun sensor relative to the mount frame. Rotation from mount frame to sensor frame. The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. The inertial frame of the sun. The inertial frame of the spacecraft's primary orbiter (e.g. Earth). This is used for occultation. Radius of the primary orbiter, occultation assumes circular cross-sections. Defaults to Earth. (m) Latency of the sun sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the sun sensor. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the sun sensor. (kg) The one-sigma Gaussian noise in sun sensor measurement output described as the error in angle between true sun-vector and expected sun-vector. This value is provided by most data sheets and is the same between fine and coarse sun sensors. (radians) Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The "noisy" unit vector representing the direction of the sun relative to the sun sensor frame in sun sensor frame coordinates. This value is subject to noise, bias, dead-zoning, occultation, sensor rate, and latency. The "truth" unit vector representing the direction of the sun relative to the sun sensor frame in sun sensor frame coordinates. This value is NOT subject to noise, bias, dead-zoning, occultation, or latency; but is subject to sensor rate. Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. This value is subject to latency and will line-up with a measurement value. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
This model calculates the common "vehicle relative" wind effects alpha, beta, mach, v_infinity, and airspeed on the vehicle in the vehicle "aerodynamics frame" which is defined for the purpose of this model as follows:
Such that the vehicle generally moves with positive velocity in x. The body frame state of the vehicle being analyzed The frame in which the input vehicle velocity is measured The frame in which the wind velocity is measured The velocity of the object as measured in the velo frame – for instance, velocity in ECEF The velocity vector of the wind as measured in the wind frame – for instance, wind in NED The speed of sound from the atmospheric model. Default value is 343.0 meters per second The velocity of the aerodynamics frame relative to the oncoming wind, in aero frame coords The relative wind experienced by the aerodynamics frame in aerodynamics coordinates. Opposite of v_aero__aero Angle between velocity vector and body x-axis in x–z plane Angle between velocity vector and body x–z plane Magnitude of air-relative velocity The ratio of the object's speed in relation to the speed of sound. The frame state sensor model senses the relative state between two frames and outputs that state difference as represented in a third, output frame. It applies basic kinematics using base functions developed in the clockwerk module to generate a step-by-step difference between two frames. The results output by this model can be described as "the state of target_frame relative to reference_frame as output in output_frame coordinates" The target_frame is the frame state we are sensing – we want to know where target_frame is The reference_frame is the frame relative to which we are sensing. Results are output relative to the reference frame, in either reference frame or output frame coordinates. The output_frame is the frame in which the output results are represented. If it is set to nullptr, reference_frame is used. Not used for attitude. This is the position of the target frame origin wrt the reference frame origin, output in output frame coordinates This is the velocity of our target frame origin as represented IN the reference frame. It is NOT simply the difference in the velocities of their origins, which is different. This value accounts for reference frame rotation. Output is in output coordinates This is the inertial velocity of our target frame origin relative to our reference frame origin, represented in output frame coordinates. It is an inertial differencing of the origins represented in reference, and does not account for reference rotation. This is the attitude of the target frame relative to the reference frame This is the angular velocity of the target frame wrt the reference frame, output in output frame coordinates This model produces the xyz cartesian state of a spacecraft from orbital elements for state initialization. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use The semimajor axis of the spacecraft orbit, in meters. Default is arbitrary 500 km alt orbit at Earth The orbit eccentricity. Default is arbitrary nearly circular orbit. The orbit inclination, in radians. Default is arbitrary 45 degree inclination The orbit RAAN, in radians The orbit argument of periapsis The true anomaly, in radians The position of the spacecraft in a generic inertial frame The velocity of the spacecraft in a generic inertial frame This model is a one-stop-shop for useful states of a vehicle relative to a celestial body. It uses the FrameStateSensor and planetrelutils from clockwerk internally then returns results every step. It is primarily a configuration wrapper model – that is, it does the large majority of its work in startup, and adds little to no functionality at runtime, and instead runs the innter frame state sensor and planetrelutils, which do the heavy lifting. This is a simple model of a spacecraft to spacecraft link. It performs calculations and determines the relative states of two spacecraft and, if link conditions on range, range rate, occultation, and look angle are met, calculates the link between them. This model assumes the boresight vector for the spacecraft-to-spacecraft link is the spacecraft frame +Y vector, in keeping with the convention maintained by the RangeAzElSensorModel and ground station sensor. See that model for more details on azimuth and elevation definition. The frame of the first spacecraft in the spacecraft to spacecraft link. This is the spacecraft which receives az/el masking and, when configured, must point at the target spacecraft (sc2). The frame of the second spacecraft in the spacecraft to spacecraft link The planet rotating or inertial frame which is used in the internal link occultation model. Planet radius in m (default is Earth radius) The maximum range at which link can be achieved. Default is an arbitrarily large distance, indicating no range restriction. The maximum range rate at which link can be achieved. Default is an arbitrarily large relative velocity, indicating no range rate restriction. The maximum azimuth look angle between spacecraft 1's boresight vector and the other spacecraft for link to be achieved. In RADIANS. The default is arbitrarily large angle with no look angle requirement. The maximum elevation look angle between spacecraft 1's boresight vector and the other spacecraft for link to be achieved. In RADIANS. The default is arbitrarily large angle with no look angle requirement. This is the range between the two spacecraft. Will be zero if not visible. This is the range rate between the two spacecraft. Will be zero if not visible. This is the azimuth look angle between sc1's boresight and sc2. Will be zero if not visible. This is the elevation look angle between sc1's boresight and sc2. Will be zero if not visible. This is the link indicator flag for the two spaecraft. True for visible, False for not visible. This model perturbs a single output according to a bias and noise value configured at start time. Distribution is gaussian. This model creates and maintains the LVLH reference frame according to the NASA definition here: https://ntrs.nasa.gov/api/citations/19780010162/downloads/19780010162.pdf It creates a frame as a child of the parent frame parameterized by parent. It locks position to the parent frame, leaves attitude free, then updates attitude at every derivative step according to the LVLH frame definition. Definition: +Z axis directed toward the center of the Earth +Y axis perpendicular to the orbit plane with direction opposite angular momentum +X axis completes the right hand frame in the direction of orbit travel Important: This is a position-only frame. Angular velocity is not updated The inertial parent frame which the target frame is orbiting The reference target frame to which the LVLH frame should attach This is the orbital position of the object for which we're calculating LVLH This is the orbital velocity of the object for which we're calculating LVLH The LVLH frame produced by this model The model reads from files in the format defined in cpp/test/thrust_text.txt, which is a txt format input. For values below and above the tabulated time range, the model returns a thrust value of zero to account for time before launch and after engine cutoff. Text file must be in the format t(s) T(N) Author: Sam Matez sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h The thrust data file which should be loaded. Default is TBD. The thrust data file which should be loaded. Default is 0N for prelaunch and touchdown purposes. The reference time in seconds since sim start The thrust generated by the engine |
| SIM_EXEC | |
| TEXT_NODE | |
| FRAME | |
| LOGGER | |
| VIZKIT | |
| CESIUM_VIZ | |
| enum warptwin::simulation_steps_e : int16 |
| clockwerk::CartesianVector< 3 > warptwin::DirectionalAdaptiveGuidance::_calcForceRswFromAlphaBeta | ( | double | alpha, |
| double | beta ) |
Weighted Directional Adaptive Guidance for Low Thrust Maneuvering.
This task calculates the pointing vector for a low thrust orbit control of orbital elements in the two body problem. It is based on an excellent NASA paper on low thrust control laws, found here: https://ntrs.nasa.gov/api/citations/20140011269/downloads/20140011269.pdf
Original source here: https://electricrocket.org/IEPC/IEPC-2011-102.pdf
It uses the weighting parameters Wx to weight the algorithm, and calculates control on the basis of difference in orbital parameters.
The output is a unit vector pointed in the direction of the desired acceleration.
Algorithm is capable of controlling semimajor axis, eccentricity, inclination, and RAAN. Can be extended to control argument of periapsis (which is in the original source) as needed. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use The weight applied to semimajor axis control The weight applied to eccentricity control The weight applied to inclination control The weight applied to RAAN control Total thrust force produced by the system. Default is in N The desired semimajor axis for the spacecraft orbit. Default is in m. The desired eccentricity for the spacecraft orbit The desired orbit inclination, in radians The desired orbit RAAN, in radians The body axis vector which will be pointed to desired_primary The desired primary vector expressed in an arbitrary frame The desired acceleration thrusting direction in the planet centered inertial frame
Calculate force vector from alpha and beta parameters
| alpha | The in-plane (pitch) angle |
| beta | The out of plane (yaw) angle |
|
protected |
Sum the power loads and sources to calculate power accumulation.
|
protected |
Function to compute the free space path loss.
| range | Distance between TX and RX in meters |
| frequency | Frequency of the comminucation in Hz |
|
protected |
Configure the spacecraft class to map to planet.
| void warptwin::_configureInternal | ( | ) |
Function to configure sensor – runs in all constructors.
|
protected |
Execute schedule step given current step time.
| step_time | The current step time to execute |
|
protected |
Function to internally map relationships between sensors.
|
protected |
Function to check range of input values.
| int warptwin::PlanetRelativeStatesModel::_updateStates | ( | ) |
|
override |
| int warptwin::Spacecraft::addPowerLoad | ( | clockwerk::DataIO< double > * | power_load_ptr | ) |
Add a power load to the spacecraft.
| power_load_ptr | Pointer to the power load (Watts) to add |
| int warptwin::Spacecraft::addPowerSource | ( | clockwerk::DataIO< double > * | power_source_ptr | ) |
Add a power source to the spacecraft.
| power_source_ptr | Pointer to the power source (Watts) to add |
| warptwin::AsphericalGravityModel * warptwin::asphericalGravityModel | ( | ) |
Function to get a handle to the aspherical gravity model contained within this model.
| warptwin::FlatPlateDragModel * warptwin::atmosDrag | ( | ) |
Function to get a handle to the flat plate drag model contained within this model.
| MODEL(Magnetometer) public warptwin::MarkovUncertaintyModel * warptwin::biasNoiseModel | ( | ) |
Accessor for the internal bias and noise model.
Model of spacecraft star tracker.
Simple Camera Model.
The initial bias in magnetometer measurement output described as a three-element vector in meters/second^2. Default is no bias. Must be set before model startup. The minimum magnetic field strength that the sensor can record in each axis. Default is -800 µT assuming input unit is in nanoTesla. (same unit as input) The maximum magnetic field strength that the sensor can record in each axis. Default is 800 µT assuming input unit is in nanoTesla. (same unit as input) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the magnetometer relative to the mount frame. Rotation from sensor frame to mount frame The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (same unit as input) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. External magnetic field model output frame, see inputs for further explanation. Latency of the magnetometer, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the magnetometer. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the magnetometer. (kg) The one-sigma Gaussian noise in magnetometer measurement output described as a three-element vector in same unit as input. Default is no noise. The one-sigma Gaussian noise in the magnetometer bias drift described as a three-element vector in (input unit)/sqrt(second) e.g. nT/sqrt(sec). Default is no walking-bias drift. The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. The local magnetic field of the sensor gathered from an external magnetic field model (e.g. dipole, IGRF, WMM), expressed in the model output frame. (input unit) Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output magnetic field produced by the magnetometer describing the local magnetic vector of the sensor frame expressed in sensor frame coordinates with appropriate bias, noise, latency, and rate limiting. (Same unit as input) The "perfect" output magnetic field produced by the magnetometer describing the local magnetic field of the sensor frame expressed in sensor frame coordinates without bias and noise. This is an informational parameter. This value is not effected by latency. (Same unit as input) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactivated. Allows the user to create duty cycles and power budgets. (Watts)
This model simulates a simplified camera which produces line of sight (alpha and beta) angles relative to a target
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The frame of the object being sensed by the simple camera model. The bias in the alpha angle measurement output described as a single scalar, with angle in RADIANS. This parameter may account for a number of factors, including misalignment, measurement bias, etc. Default is no bias. The bias in the beta angle measurement output described as a single scalar, with angle in RADIANS. This parameter may account for a number of factors, including misalignment, measurement bias, etc. Default is no bias. The one-sigma gaussian noise in alpha measurement output described as a scalar, with angle in RADIANS. Default is no noise. The one-sigma gaussian noise in beta measurement output described as a scalar, with angle in RADIANS. Default is no noise. The vehicle frame relative to which the camera is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the camera in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the camera relative to the mount frame The rate at which the camera generates an output, in hertz. Setting this value to 0 forces the camera to output at the simulation rate. Value to seed the internal RNG for this model. Power draw of the camera. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the camera. (kg) The alpha angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame plus appropriate bias, noise, and rate limiting. The beta angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame plus appropriate bias, noise, and rate limiting. The alpha angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame without noise or error. This parameter is informational. The beta angle measurement output produced from the camera describing the location of the target object frame relative to the reference frame without noise or error. This parameter is informational. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
Accessor for the internal bias and noise model
This model represents a simple star tracker which may be parameterized with a given bias, noise, and rate. It measures the attitude of the star tracker frame, which is internally configured, relative to an externally assigned reference frame.
The mount frame is defined as: Centered in the center of the reference image X is "up" in the image Y is "right" in the image Z is "into" the image completing the right hand frame
|-------------------—| | x^ | | |-->y | | | |-------------------—|
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The bias in measurement output described as a 3-2-1 Euler angle sequence, with angles in RADIANS. This parameter may account for a number of factors, including misalignment, measurement bias, etc. Default is no bias. The cross axis accuracy of the star tracker in radians. Default is perfect accuracy The twist axis accuracy of the star tracker in radians. The default is perfect accuracy The field of view of the star tracker defined as the full cone angle in Radians. Default is pi/6 radians. The mass of the star tracker in kg. Default is massless The vehicle frame relative to which the star tracker is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the star tracker in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the star tracker relative to the mount frame The radiation tolerance of the star tracker in krad. Default is no radiation tolerance The reference frame relative to which all star tracker measurements will be returned. If a reference frame is not set, all star tracker measurements will be returned relative to the simulation root frame. The rate at which the star tracker generates an output, in hertz. Setting this value to 0 forces the star tracker to output at the simulation rate. Value to seed the internal RNG for this model. Power draw of the star tracker. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measurement output quaternion produced by the star tracker describing the orientation of the star tracker "sensor frame" relative to the reference frame plus appropriate bias, noise, and rate limiting. The "perfect" output quaternion produced by the star tracker describing the orientation of the star tracker "sensor frame" relative to the reference frame. This parameter is informational and free from error. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
Accessor for the internal bias and noise model
The fixed bias of the sun sensor. This could be a mixture of a misalignment error and/or measurement noise offset. The field of view respective to the horizontal of the focal plane. This is defined as full FOV NOT the half angle measured from boresight. (degrees) The field of view respective to the vertical of the focal plane. This is defined as full FOV NOT the half angle measured from boresight. (degrees) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor relative to the mount frame and resolved in the mount frame. (meters) The alignment of the sun sensor relative to the mount frame. Rotation from mount frame to sensor frame. The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. The inertial frame of the sun. The inertial frame of the spacecraft's primary orbiter (e.g. Earth). This is used for occultation. Radius of the primary orbiter, occultation assumes circular cross-sections. Defaults to Earth. (m) Latency of the sun sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the sun sensor. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the sun sensor. (kg) The one-sigma Gaussian noise in sun sensor measurement output described as the error in angle between true sun-vector and expected sun-vector. This value is provided by most data sheets and is the same between fine and coarse sun sensors. (radians) Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The "noisy" unit vector representing the direction of the sun relative to the sun sensor frame in sun sensor frame coordinates. This value is subject to noise, bias, dead-zoning, occultation, sensor rate, and latency. The "truth" unit vector representing the direction of the sun relative to the sun sensor frame in sun sensor frame coordinates. This value is NOT subject to noise, bias, dead-zoning, occultation, or latency; but is subject to sensor rate. Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. This value is subject to latency and will line-up with a measurement value. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
| bool warptwin::caseInsensitiveEqual | ( | const std::string & | in_a, |
| const std::string & | in_b ) |
Function to compare two strings independent of case.
| in_a | The first string to compare |
| in_b | The second string to compare |
| int warptwin::checkVerifyLicense | ( | const std::string & | license_file, |
| const std::string & | license_server ) |
Function to check and verify that user has license for the simulation.
| license_file | The license file containing the user's data, if it exists |
| license_server | The license server which may be used to locate another file |
| int warptwin::clamp | ( | T | input, |
| T | min_val, | ||
| T | max_val, | ||
| T & | output ) |
This function will force a value to be between the defined minimum and maximum values. If input is less than the minimum, then the output will be the minimum. If the output is larger than, then the output will be the maximum. Otherwize the output is the input.
min <= clamp(x) <= max
| input | Input to the unary function |
| min_val | Minimum output value |
| max_val | Maximum output value |
| output | Implicit return of the output |
| void warptwin::clearPowerLoads | ( | ) |
Clear the list of power loads.
| void warptwin::clearPowerSources | ( | ) |
Clear the list of power sources.
| int warptwin::coe2rv | ( | CartesianVector6 & | elements, |
| double | mu, | ||
| CartesianVector3 & | pos, | ||
| CartesianVector3 & | vel ) |
Function to convert orbital elements to cartesian xyz.
| elements | The orbital elements as {a, e, i, W, w, f} – angles in radians |
| mu | The gravitational parameter of the reference planet |
| pos | Return of the x, y, z position of the reference object |
| vel | Return of the x, y, z velocity of the reference object |
| bool warptwin::contains | ( | const std::string & | parent_str, |
| const std::string & | substr ) |
Function to return whether substr is in parent_str.
| parent_str | The string to search |
| substr | The string to search for |
| clockwerk::CartesianVector< 3 > warptwin::convertPosDim2Nd | ( | clockwerk::CartesianVector< 3 > | pos_d, |
| double | l_star ) |
Function to convert position from dimensional to characteristic units.
| pos_d | The position of the body in dimensional units |
| l_star | The characteristic length of the system |
| clockwerk::CartesianVector< 3 > warptwin::convertPosNd2Dim | ( | clockwerk::CartesianVector< 3 > | pos_nd, |
| double | l_star ) |
Function to convert position from characteristic to dimensional units.
| pos_nd | The position of the body in non-dimensional units |
| l_star | The characteristic length of the system |
| clockwerk::CartesianVector< 3 > warptwin::convertVelDim2Nd | ( | clockwerk::CartesianVector< 3 > | vel_d, |
| double | l_star, | ||
| double | t_star ) |
Function to convert velocity from dimensional to characteristic units.
| vel_d | The velocity of the body in dimensional units |
| l_star | The characteristic length of the system |
| t_star | The characteristic time of the system |
| clockwerk::CartesianVector< 3 > warptwin::convertVelNd2Dim | ( | clockwerk::CartesianVector< 3 > | vel_nd, |
| double | l_star, | ||
| double | t_star ) |
Function to convert velocity from characteristic to dimensional units.
| vel_nd | The velocity of the body in non-dimensional units |
| l_star | The characteristic length of the system |
| t_star | The characteristic time of the system |
| clockwerk::DCM warptwin::dcmPqr2Xyz | ( | double | i, |
| double | W, | ||
| double | w ) |
Function to generate a 3-1-3 DCM to rotate from PQR to XYZ coordinates.
| i | Orbit inclination, in radians |
| W | RAAN, in radians |
| w | Argument of periapsis, in radians |
|
override |
Model to simulate a servo's motion.
Model of a power load.
Spherical Harmonics Model.
Torque Coil Model.
This model simulates the behavior of a servo. The servo accounts for the following properties: Command noise - Represented as Gaussian additive noise, present due to physical imperfections Servo turn bounds - most servos cannot spin indefinitely in either direction, this model lets one set those bounds Servo speed - Servos cannot instantly transition between command states, they must move at some maximum speed Latency - Commands sent to the servo must traverse over physical wires, this will introduce delay
This is a model of a torque coil which applies a torque using the magnetic field generated by an electromagnet (with no ferromagnetic core) interacting with the Earth's magnetic field. A positive torque is applied about the torque vector when a positive current is applied. Note that this direction is the orthogonal vector (Area Vector) of the wire coil.
Noise is applied as a gaussian noise about the commanded current.
Implements the World Magnetic Model (WMM)
References: [1] The US/UK World Magnetic Model for 2020-2025 by Arnaud Chulliat et al. (NOAA) and William Brown et al. (British Geological Survey Geomagnitsm Team) [2] Pysical Geodesy by Heiskanen and Moritz 1967 [3] Geomagnetism and Schmidt quasi-normalization by Winch et al. 2005
Author: James Tabony Email: james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The filename for the file that contains the Gauss coefficients for spherical harmonic calculation. NOAA releases a new set of coefficients every 5 years on years that are divisible by 5 (e.g. 2015, 2020, 2025, ...) that are most valid from the year they are realseed until the next coefficient set release. The coefficient n which represents the variations in gravitational field in the latitudinal direction. Also the harmonic function order. This value must be chosen before executive startup. (1 <= N <= 12) The body position wrt the planet in a planet-centered rotating frame (meters) The local magnetic field vector expressed in body's local North East Down frame. (nanoTesla) The local magnetic field vector expressed in ECEF frame. (nanoTesla)
The power load model is a simple model of a power load meant to represent the power draw of components that are otherwise unmodeled (such as heaters or scientific instruments). The model accounts for power draw in three modes: active, idle, and off (no power draw). Power draw while in ACTIVE mode, in Watts Power draw while in IDLE mode, in Watts Power draw while in OFF mode, in Watts The current mode of the power load: 0 = off, 1 = idle, 2 = active Instantaneous power draw of the power load, in Watts
| int warptwin::deadzone | ( | T | input, |
| T | bounds, | ||
| T & | output ) |
This function will supress all inputs within (±) the specified bounds. The deadzone function is NOT piecewise continuous, so it will have discontinuities at the bounds.
if abs(x) <= dx :: deadzoneTrimmed(x) = 0 if abs(x) > dx :: deadzoneTrimmed(x) = x
| input | Input to eht unary function |
| bounds | Deadzone bounds (must be positive) |
| output | Implicit return of the output |
| int warptwin::deadzoneTrimmed | ( | T | input, |
| T | bounds, | ||
| T & | output ) |
This function will supress all inputs within (±) the specified bounds. The trimmed deadzone function is piecewise continuous, so it will shift the inputs in the linear regions.
if abs(x) <= dx :: deadzoneTrimmed(x) = 0 if abs(x) > dx :: deadzoneTrimmed(x) = x - signum(x)*dx
| input | Input to the unary function |
| bounds | Deadzone bounds (must be positive) |
| output | Implicit return of the output |
| double warptwin::dmuWMM | ( | double | input | ) |
Unary functional input to the associated Legendre function specific to the WMM modelm, derivative w.r.t. the functional's input. This is typically denoted as mu or t in literature such as Winch et al. 2005 or Heiskanen and Moritz 1967, respectively.
For the WMM model, this is defined as:
dμ/dφ' = cos(φ')
Where φ' is the geocentric latitude
| [in] | input | Input to the unary function |
| int warptwin::eccentric2mean | ( | double | eccentric_anomaly, |
| double | eccentricity, | ||
| double & | mean_anomaly ) |
Function to convert eccentric anomaly to mean anomaly.
| eccentric_anomaly | |
| eccentricity | The orbit eccentricity |
| mean_anomaly |
| int warptwin::eccentric2true | ( | double | eccentric_anomaly, |
| double | eccentricity, | ||
| double & | true_anomaly ) |
Function to convert eccentric anomaly to true anomaly.
| eccentric_anomaly | |
| eccentricity | The orbit eccentricity |
| true_anomaly |
|
overrideprotected |
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in derived class.
Function to check our current (base) time against our rate conditions.
Tabular thrust model This model reads and returns thrust on the basis of simulation time based on a predetermined thrust table provided for specific vehicles.
Bias and noise model.
Simple spacecraft-to-spacecraft link model.
Model for determining the latitude, longitude, altitude state of a vehicle relative to an oblate planet.
Model for sensing the relative state between two frames in WarpTwin.
Aerodynamics State Model.
Simple Earth Observation Model.
Solar panel model.
Simplified model of vehicle battery system which estimates battery capacity considering power input, draw.
Tabular atmosphere model.
Spherical Harmonics Model.
Simple mean wind model.
Simple disturbance wind model.
Simplified magnetic field model which treats Earth as a dipole magnet.
Composite wind model.
Aspherical gravity model with J2 and J3 effects.
Model of spacecraft radio including losses and gains with comm links and power draw.
Reaction Wheel Model.
Simplified dynamics model representing motion in the circular restricted 3 body problem.
This model calculates the expected acceleration experienced by a body acting under three-body dynamics using the circular restricted three body assumptions.
Note the synodic frame definition is consistent with the definitions in this same directory, which is as follows:
Key assumptions:
This is a model of a reaction wheel which applies a torque to a reaction wheel and thus the spacecraft in the opposite direction. The momentum stored in the reaction wheel and the wheel speed are both recorded. A positive torque is applied about the z axis of the reaction wheel which is the orthoganal vector to the reaction wheel.
Note that the torque applied to the sc body will be negative of the commmanded torque. Noise is applied as a gaussian noise about the commanded torque.
This model is used to calculate the communications link and power draw of a radio system. It is meant to be configured in pairs. All the parameters are referring to the characteristics of this radio. First, define all of the attributes of this radio model and pass in another radio model with its own configuration as a parameter. The the output of this model uses simple communication analysis to calculate the comms data based on the relationship between the two radios. For example, you could have one radio model attached to a ground station and another representing a spacecraft. You assign the transmit and receive characteristics in each radio model and then set the other_radio parameter to point to the other model. The model will then output information about the link in both the receive and transmit direction from the point of view of this radio. The output from each radio will be identical except from the perspective of the radio. This means to analyze the full link between the two, you only need the output of one of the models.
This model also calculates the power draw of the radio based on whether it is transmitting or receiving. If the radio is transmitting,the power draw output will be the power_draw_TX parameter, and if it is receiving, the power draw output will be the power_draw_RX parameter.
IMPORTANT: Though loss is generally expressed as a negative gain, this model assumes that loses are positive and will subtract accordingly. For example, suppose your receiver system has poor circuitry and you expect the power received to decrease by half. This would be a gain of -3 dB, however this model expects the user to input a loss of positive 3 dB. In general, loss = -gain.
Author: Alex Jackson alex..nosp@m.jack.nosp@m.son@a.nosp@m.ttx..nosp@m.tech The transmitter carrier frequency in hertz (Hz) (MUST MATCH OTHER RADIO). Default is the amateur radio satellite communication frequency of 437 MHz. The bandwidth of transmission (Hz) 50 kHz is common for UHF (MUST MATCH OTHER RADIO) The bit rate in bits per second (bps) 9600bps is a common value for UHF (MUST MATCH OTHER RADIO) The transmit power in Watts (W). Transmit power is usually around 1 Watt for cubesats Return loss of this radio when transmitting, this value describes ratio of power that is reflected back into the system. Should be input as positive but is normally negative. Default is a representative value of 14 dB The transmit antenna gain in decibels relative to isotropic (dBi) Default is 2.15 representative of a dipole The total transmit system loss in decibels (dB). This is the accumulation of transmitter pointing loss, and transmitter circuit loss. Inputting zero assumes that there is no return loss (despite this actually being 100% return loss). 5 db is a conservative estimate for typical satellite systems The receive antenna gain in decibels relative to isotropic (dBi). Usually the same as the transmit antenna gain unless there is a separate receive antenna. The noise temperature in Kelvin (K). This value is realted to the system noise density by Boltzmann*noise_temp and system noise power by the equation band_width*noise_density. Generic input of 307.5 should be replaced by data sheet value(MUST MATCH OTHER RADIO) The total receive system loss in decibels (dB). This is the accumulation of receiver side loss such as pointing loss, radome loss, polarization loss, and atmospheric loss. 4 db is a conservative estimate for typical satellite systems The cross polarization loss in decibels (dB). General rule of thumb, if both RX and TX have same-hand circular or linear (0dB), if there is a circular to linear match (3dB), but a right vs left circular mismatch can result in 20 to 30 dB loss. (MUST MATCH OTHER RADIO) The energy per bit to noise ratio required in dB. Based on various modulation schemes for a desired bit error rate. For BPSK an Eb/N0 required of about 11 allows for a bit error rate around 1e-6. (MUST MATCH OTHER RADIO) The power draw of the radio when transmitting in Watts (W) Note that this is different from the transmit power. Default is no power draw The power draw of the radio when receiving in Watts (W). Default is no power draw A pointer to the other radio model to which this radio is communicating The frame that the radio is attached to. Used to calculate range This is the mask flag for the ground station. True for masked, False for visible An int to indicate if the radio is transmitting. The power draw is set to the TX power draw if greater than 0 and RX power draw if equal to 0. If this is less than zero it is set to the opposite of the masked flag (constantly transmitting when in view) The free space path loss in decibels (FSPL) (dB). This is the same in both directions The effective isotropic radiated power (EIRP) in decibel-milliWatts (dBm) The receive power in decibel-milliWatts (dBm) The system noise figure (NF) in decibel-milliWatts/Hz (dBm/Hz) The signal-to-noise density ratio (SNR) in decibel (dB) The energy per bit to noise ratio in in decibels (dB) The link margin in decibels (dB) The effective isotropic radiated power (EIRP) in decibel-milliWatts (dBm) The receive power in decibel-milliWatts (dBm) The system noise figure (NF) in decibel-milliWatts/Hz (dBm/Hz) The signal-to-noise density ratio (SNR) in decibel (dB) The energy per bit to noise ratio in in decibels (dB) The link margin in decibels (dB) The power draw of the radio in Watts (W)
This model calculates gravity for a planetary body, accounting for effects due to the J2 and J3 perturbations. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter in m^3/s^2 for ease of use This is the J2 parameter of our parent planet. Defaults to Earth's J2 parameter for ease of use This is the J3 parameter of our parent planet. Defaults to Earth's J3 parameter for ease of use This is the radius of our parent planet. Defaults to Earth's radius, in meters for ease of use This is the mass of the body, which will be multiplied by our force to get the force calculation The position of the object body in the reference frame f This is the total acceleration due to gravity calculated in the same reference frame as pos_body__f This is the total force due to gravity calculated in the same reference frame as pos_body__f This is the acceleration due to point mass gravity calculated in the same reference frame as pos_body__f This is the acceleration due to J2 calculated in the same reference frame as pos_body__f This is the acceleration due to J3 calculated in the same reference frame as pos_body__f
This model takes in the three major components to a high fidelity wind model: 1). Mean wind: the average steady-state wind velocity vector 2). Gust wind: the stochastic and time dependent busts of intense wind 3). Disturbance wind: the stochastic and time dependent random fluctuations in the wind
The model takes the three components and their respective frames and outputs the composite wind (sum of all components) in the desired output frame.
Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The frame of the mean wind input vector. The frame of the gust wind input vector. The frame of the disturbance wind input vector. If left as nullptr, the model assumes the disturbance frame is the direct mean wind frame: X : In the direction of the mean wind Y : Cross-wind, perpendicular to the direction of mean wind but in local surface horizontal plane (Z cross X = Y) Z : Aligned with the mean wind frame. Perpendicular to surface. The frame of the composite wind output vector. Mean wind vector expressed in the frame specified by the params. Velocity must be relative to a planet rotating frame. (meters/second) Gust wind vector expressed in the frame specified by the params. Velocity must be relative to a planet rotating frame. (meters/second) Disturbance wind vector expressed in the frame specified by the params. Velocity must be relative to a planet rotating frame. (meters/second) The composite wind vector expressed in the frame specifiec by the params. The velocity is expressed relative to the planet rotating frame. (meters/second)
This model calculates the magnetic field vector represented in the PCI frame and object frame using a simple dipole model. The equations and parameters used for this model come from "Fundamentals of Spacecraft Attitude Determination and Control" by Markley and Crassidis, chapter 11 section 1.1, equation 11.5
Note: Crassidis defines the equations from the magnetic south pole, I define my equations from the magnetic north pole.
Author: James Tabony Email: james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The colatitude of the IGRF magnetic north pole as referenced in the global latitude/longitude map. Defaults to global north pole (radians) The longitude of the IGRF magnetic north pole as referenced in the global latitude/longitude map. Defaults to globak north pole (radians) Planet magnetic field magnitude at planet equitorial distance. Defaults to Earth. (nT ~ nanoTesla) Planet equitorial distance, specific to the magnetic field model. Defaults to Earth. (meters) Planet rotating frame pointer. Position of the object frame with respect to the planet rotating frame, resolved/expressed in the planet rotating frame coordinates. (meters) The magnetic field vector local to the object, represented in the planet centered rotating frame, PCR. (nT ~ nanoTesla)
This model generates an objects experienced mean wind through a pseudo-deterministic process. The mean wind magnitude is based an a power function sclaled by a reference wind spead at a given altitude.
$$ V(h) = V_{ref} * \left( \frac{h}{h_{ref}} \right)^\alpha $$
The wind direction perturbed around a provided value (wind direction at reference altitude) in a continuous (not smooth) manner. By a function f(h) with uniformly distributed outputs for select altitudes between the values of [-1, 1]. This relationship is:
$$ \theta(h) = \theta_0 + \Delta \theta \cdot f(h) \qquad f:h \in \mathbb{R} \mapsto [-1, 1] \, \, \text{and} \, f(0) := 0 $$
Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech Wind speed at 20 feet altitude from surface NOT WGS84 ellipsoid. Defaults to 30 knots which corresponds to moderate turbulence. (meters/second) Altitude of the surface relative to the WGS84 model. (meters) Value to seed the internal RNG for this model. Altitude of the object as relative to the WGS84 model. (meters) The disturbance wind vector of the object expressed in the mean wind frame (meters/second), defined as: X : In the direction of the mean wind Y : Cross-wind, perpendicular to the direction of mean wind but in local surface horizontal plane (Z cross X = Y) Z : Aligned with the mean wind frame. Perpendicular to surface. The velocity is expressed relative to a planet rotating frame.
This model generates an objects experienced mean wind through a pseudo-deterministic process. The mean wind magnitude is based an a power function sclaled by a reference wind spead at a given altitude.
$$ V(h) = V_{ref} * \left( \frac{h}{h_{ref}} \right)^\alpha $$
The wind direction perturbed around a provided value (wind direction at reference altitude) in a continuous (not smooth) manner. By a function f(h) with uniformly distributed outputs for select altitudes between the values of [-1, 1]. This relationship is:
$$ \theta(h) = \theta_0 + \Delta \theta \cdot f(h) \qquad f:h \in \mathbb{R} \mapsto [-1, 1] \, \, \text{and} \, f(0) := 0 $$
Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The average wind speed measured at the reference altitude. (meters/second) The average wind azimuth angle (angle of the wind vector measured off of local north towards east) at the reference altitude. Make sure to set before exc.startup. (radians) Reference altitude, typically close to the surface. This altitude is measured from surface NOT WGS84 ellipsoid. (meters) Altitude of the surface relative to the WGS84 model. (meters) Wind shear factor. Used to describe the change in mean wind magnitude with respect to altitude. This parameter is dependent on the terrain underneath the flight operation. Open sea ~ 0.1, Suburban ~ 0.25, Forest/Mountains ~ 0.4. Maximum direction shift of mean wind. You can effectively turn off the wind vector shear by setting this value to zero. (radians) Value to seed the internal RNG for this model. Altitude of the object as relative to the WGS84 model. (meters) The mean wind vector of the object expressed in the local NED frame of the reference position. The velocity is expressed relative to the planet rotating frame. (meters/second)
Implements spherical harmonic gravity up to an 18x18 field based on the implementation in the 42 simulation: https://github.com/ericstoneking/42/blob/4be580d8defc968da97d937ce09ef107c07860cb/Kit/Source/envkit.c#L82
Author: Sam Matez Email: sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h The filename for the file that contains the coefficients for spherical harmonic calculation. These coefficients should be un-normalized, as the model applies a Neumann normalization to the loaded coefficients. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use This is the radius of our parent planet. Defaults to Earth's radius, in meters for ease of use The coefficient n which represents the variations in gravitational field in the latitudinal direction The coefficient m which represents the variations in gravitational field in the longitudinal direction. must be less than or equal to n This is the mass of the body, which will be multiplied by our force to get the force calculation... TODO to replace this with accel methods The body position wrt the planet in a planet-centered, planet fixed frame (m) This is the acceleration due to gravity calculated in the same reference frame as pos_body__f This is the force due to gravity calculated in the same reference frame as pos_body__f
This model reads and returns atmospheric parameters pressure, temperature, and density on the basis of altitude in meters above ground level.
The model reads from files in the format defined in data/atmosphere, which is a txt format input.
This is a highly simplified implementation – for ultra high fidelity propagation consider using a different model.
For values above the tabulated range, the model returns the values at the end of the table for temperature and zero for pressure and density. For values below the end of the table the model returns the lowest altitude value in the table.
Speed of sound calculation based on Introduction to Flight by Anderson, p. 177 eq 4.54
Text file must be in the format H(km) T(K) p(Pa) ρ(kg/m^3)
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m.engin.nosp@m.eeri.nosp@m.ng.co.nosp@m.m The atmosphere data file which should be loaded. Default is 1976 std atmosphere. Our ideal gas constant for speed of sound calculation. Default is for air The specific heat ratio for air – used in calculation of the speed of sound The reference altitude in meters above sea level The temperature of the atmosphere in degrees kelvin The pressure of the atmosphere in Pascals (N/m^2) The density of the atmosphere in kg/m^3 The speed of sound in meters per second
Author: Alex Reynolds alex@.nosp@m.attx.nosp@m..tech The peak voltage provided by a single battery (summed to make full pack) The capacity, in W*hr, provided by a single spacecraft battery The % of charge at which power shuts off. Default is 0.0 (no shutoff until capacity is empty) Should be a percent. value in the range 0-->1 indicating the initial charge state of the system The number of batteries configured in series. Determines the system voltage and shutoff The number of batteries configured in parallel. Used with series to determine system capacity The capacity-voltage curve defined by percent capacity against pct max voltage. Default is lithium ion The amount of power generated by the system in the given step, in W The amount of power drawn from the system in the given step, in W The net change in power in the system for the step, in W The depth of discharge, a percentage value denoting the depletion of the battery system. (%) The current voltage of the power system The current draw of the system, in Amps Boolean indicating whether power is available (true) or not (false) from the system
This model defines a solar panel model that accounts for eclipse, pointing, size, and efficiency. This is a combination of the Solar Panel Power, Occultation, and Effective Solar Area moddels to aide in ease of use. Author: Alex Jackson Email: alex..nosp@m.jack.nosp@m.son@a.nosp@m.ttx..nosp@m.tech The mass of the solar panel in kg. Default is massless The solar irradiance at the location of interest in power per area (the default is in W/m^2) The solar panel efficiency on a scale of 0 to 1 where 0 is 0 percent efficiency and 1 is 100 percent efficiency The area of the solar panel. The solar panel normal vector in the body frame. This is used to describe the orientation of the solar panel wrt to the body frame (default is the x axis ) The inertial Sun frame Sun radius in m The parent frame which the body frame is orbiting Planet radius in m (default is Earth radius) Body frame of the spacecraft Whether the solar panel should remain body fixed and perform effective area calculations (true/default), or should assume effective solar area is always 100% of panel size for a simpler calculation (false) The power generated by the panel in watts Fraction of two spherical representations of objects that are visible from the point of view of the observer. 0 is fully occulted, 1 is not occulted, 0-1 is visible fraction of observed object.
This model defines a simple Earth Observation configuration with revisit counts, range, and observation times. The maximum angle off nadir the spacecraft is allowed to look for a valid pass, in radians The frame of the spacecraft object that the ground station will sense The planet rotating frame to which the ground station is attached. Note that the planet rotating frame must be a child of the associated planet inertial frame, which is also used in this model. This is the detic latitude of the target site, in radians The longitude of the target site, in radians The total amount of time, in seconds, that the site has been observable The total number of visits by the spacecraft to the site This is the range of the spacecraft to the target This is the range rate of the spacecraft wrt the target This is the look angle of the spacecraft wrt the target site, in radians This flag indicates whether the targeted ground site is visible or not. 1 = visible
This model calculates the common "vehicle relative" wind effects alpha, beta, mach, v_infinity, and airspeed on the vehicle in the vehicle "aerodynamics frame" which is defined for the purpose of this model as follows:
Such that the vehicle generally moves with positive velocity in x. The body frame state of the vehicle being analyzed The frame in which the input vehicle velocity is measured The frame in which the wind velocity is measured The velocity of the object as measured in the velo frame – for instance, velocity in ECEF The velocity vector of the wind as measured in the wind frame – for instance, wind in NED The speed of sound from the atmospheric model. Default value is 343.0 meters per second The velocity of the aerodynamics frame relative to the oncoming wind, in aero frame coords The relative wind experienced by the aerodynamics frame in aerodynamics coordinates. Opposite of v_aero__aero Angle between velocity vector and body x-axis in x–z plane Angle between velocity vector and body x–z plane Magnitude of air-relative velocity The ratio of the object's speed in relation to the speed of sound.
The frame state sensor model senses the relative state between two frames and outputs that state difference as represented in a third, output frame. It applies basic kinematics using base functions developed in the clockwerk module to generate a step-by-step difference between two frames.
The results output by this model can be described as "the state of target_frame relative to reference_frame as output in output_frame coordinates" The target_frame is the frame state we are sensing – we want to know where target_frame is The reference_frame is the frame relative to which we are sensing. Results are output relative to the reference frame, in either reference frame or output frame coordinates. The output_frame is the frame in which the output results are represented. If it is set to nullptr, reference_frame is used. Not used for attitude. This is the position of the target frame origin wrt the reference frame origin, output in output frame coordinates This is the velocity of our target frame origin as represented IN the reference frame. It is NOT simply the difference in the velocities of their origins, which is different. This value accounts for reference frame rotation. Output is in output coordinates This is the inertial velocity of our target frame origin relative to our reference frame origin, represented in output frame coordinates. It is an inertial differencing of the origins represented in reference, and does not account for reference rotation. This is the attitude of the target frame relative to the reference frame This is the angular velocity of the target frame wrt the reference frame, output in output frame coordinates
This model is a one-stop-shop for useful states of a vehicle relative to a celestial body. It uses the FrameStateSensor and planetrelutils from clockwerk internally then returns results every step. It is primarily a configuration wrapper model – that is, it does the large majority of its work in startup, and adds little to no functionality at runtime, and instead runs the innter frame state sensor and planetrelutils, which do the heavy lifting.
This is a simple model of a spacecraft to spacecraft link. It performs calculations and determines the relative states of two spacecraft and, if link conditions on range, range rate, occultation, and look angle are met, calculates the link between them.
This model assumes the boresight vector for the spacecraft-to-spacecraft link is the spacecraft frame +Y vector, in keeping with the convention maintained by the RangeAzElSensorModel and ground station sensor. See that model for more details on azimuth and elevation definition. The frame of the first spacecraft in the spacecraft to spacecraft link. This is the spacecraft which receives az/el masking and, when configured, must point at the target spacecraft (sc2). The frame of the second spacecraft in the spacecraft to spacecraft link The planet rotating or inertial frame which is used in the internal link occultation model. Planet radius in m (default is Earth radius) The maximum range at which link can be achieved. Default is an arbitrarily large distance, indicating no range restriction. The maximum range rate at which link can be achieved. Default is an arbitrarily large relative velocity, indicating no range rate restriction. The maximum azimuth look angle between spacecraft 1's boresight vector and the other spacecraft for link to be achieved. In RADIANS. The default is arbitrarily large angle with no look angle requirement. The maximum elevation look angle between spacecraft 1's boresight vector and the other spacecraft for link to be achieved. In RADIANS. The default is arbitrarily large angle with no look angle requirement. This is the range between the two spacecraft. Will be zero if not visible. This is the range rate between the two spacecraft. Will be zero if not visible. This is the azimuth look angle between sc1's boresight and sc2. Will be zero if not visible. This is the elevation look angle between sc1's boresight and sc2. Will be zero if not visible. This is the link indicator flag for the two spaecraft. True for visible, False for not visible.
This model perturbs a single output according to a bias and noise value configured at start time. Distribution is gaussian.
This model creates and maintains the LVLH reference frame according to the NASA definition here: https://ntrs.nasa.gov/api/citations/19780010162/downloads/19780010162.pdf
It creates a frame as a child of the parent frame parameterized by parent. It locks position to the parent frame, leaves attitude free, then updates attitude at every derivative step according to the LVLH frame definition.
Definition: +Z axis directed toward the center of the Earth +Y axis perpendicular to the orbit plane with direction opposite angular momentum +X axis completes the right hand frame in the direction of orbit travel
Important: This is a position-only frame. Angular velocity is not updated The inertial parent frame which the target frame is orbiting The reference target frame to which the LVLH frame should attach This is the orbital position of the object for which we're calculating LVLH This is the orbital velocity of the object for which we're calculating LVLH The LVLH frame produced by this model
The model reads from files in the format defined in cpp/test/thrust_text.txt, which is a txt format input.
For values below and above the tabulated time range, the model returns a thrust value of zero to account for time before launch and after engine cutoff.
Text file must be in the format t(s) T(N)
Author: Sam Matez sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h The thrust data file which should be loaded. Default is TBD. The thrust data file which should be loaded. Default is 0N for prelaunch and touchdown purposes. The reference time in seconds since sim start The thrust generated by the engine
| double warptwin::fact | ( | long | n | ) |
Computes the factorial of a non-negative integer.
This helper function calculates the factorial of a given integer n (n!). It is used to normalize spherical harmonics coefficients.
| [in] | n | Non-negative integer for which to calculate the factorial. |
| T warptwin::factorial | ( | int | n | ) |
Wrapper for factorial function with no error code return, only use if confident on valid inputs.
| int warptwin::factorial | ( | int | n, |
| T & | output ) |
Computes the factorial of a non-negative integer. Currently the gamma function is not supported.
| n | Integer input |
| output | Double output |
| bool warptwin::fileExist | ( | const std::string & | name | ) |
Function to quickly check and verify whether a file exists.
| name | The name (or path) of the file to verify |
| int warptwin::framePositionTransform | ( | const clockwerk::CartesianVector< 3 > & | vec_f1__f1, |
| Frame & | f1, | ||
| Frame & | f2, | ||
| clockwerk::CartesianVector< 3 > & | vec_f2__f2 ) |
A function to transform a position vector relative to the origin of f1 to a vector relative to the origin of f2.
| vec_f1__f1 | A vector relative to the origin of f1 |
| f1 | The frame in which vec_f1__f1 is represented |
| f2 | The frame we want to rotate vec_f2__f1 into |
| vec_f1__f2 | Implicit return of our transformed vector |
| int warptwin::frameRelativeInit | ( | Frame & | target, |
| Frame & | reference, | ||
| const CartesianVector3 & | pos_tgt_ref__ref, | ||
| const CartesianVector3 & | vel_tgt_ref__ref ) |
Function to initialize frame target relative to freame reference inertially.
| target | The target frame whose state we want to set |
| reference | The frame we are setting state relative to |
| pos_tgt_ref__ref | The position of target relative to reference, in ref frame coordinates |
| vel_tgt_ref__ref | The inertial velocity of target origin relative to reference origin, in ref frame coords |
| int warptwin::frameRotate | ( | const clockwerk::CartesianVector< 3 > & | vec__f1, |
| Frame & | f1, | ||
| Frame & | f2, | ||
| clockwerk::CartesianVector< 3 > & | vec__f2 ) |
A function to rotate vector vec__f1 from frame f1 into frame f2.
| vec__f1 | A vector represented in frame f1 |
| f1 | The frame in which vec__f1 is represented |
| f2 | The frame we want to rotate vec__f1 into |
| vec__f2 | Implicit return of our rotated vector |
| MODEL(GroundStationModel) public warptwin::FrameStateSensorModel * warptwin::frameStateSensorEnu | ( | ) |
Simple ground station model.
This model is a simple model of a ground station. It uses the FrameStateSensor and RangeAzElSensor internally to create an ENU frame as a child of the parent frame, then returns results every step. It is primarily a configuration wrapper model – that is, it does the large majority of its work in startup, and adds little to no functionality at runtime, and instead runs the innter frame state sensor and range az el sensor model, which do the heavy lifting. The frame of the spacecraft object that the ground station will sense The planet rotating frame to which the ground station is attached. Note that the planet rotating frame must be a child of the associated planet inertial frame, which is also used in this model. This is the equatorial radius of the planet. Default is Earth in meters This is the flattening of the planet, which defines shape. Default is Earth This is the centric latitude of the ground station, in radians The longitude of the ground station, in radians This is the elevation mask value, in radians, for the ground station. Default is zero degrees The position of the spacecraft as measured in the GS East, North, Up frame The velocity of the spacecraft as measured in the GS East, North, Up frame This is the range of the input object to the frame. Will be zero if masked. This is the range rate of the spacecraft to the GS. Will be zero if masked. This is the azimuth of the spacecraft wrt the frame x vector, in radians. Will be zero if masked This is the elevation of the spacecraft wrt the frame x-y plane, in radians. Will be zero if masked. This is the mask flag for the ground station. True for masked, False for visible The position of the ground station as measured in the planet-centered inertial frame The velocity of the ground station as measured in the planet-centered inertial frame Pointer to the ground station model for GUI linking of Ground Station model
| int warptwin::frameVelocityTransform | ( | const clockwerk::CartesianVector< 3 > & | vel_f1__f1, |
| const clockwerk::CartesianVector< 3 > & | pos_f1__f1, | ||
| Frame & | f1, | ||
| Frame & | f2, | ||
| clockwerk::CartesianVector< 3 > & | vel_f2__f2 ) |
A function to transform a velocity vector represented in frame f1 to a vector represented in f2.
| vel_f1__f1 | Velocity represented in frame f1 |
| pos_f1__f1 | The position in f1 at which velocity is represented |
| f1 | The frame in which vel_f1__f1 is represented |
| f2 | The frame we want to represent velocity in |
| vel_f1__f2 | Implicit return of velocity represented in f2 |
| double warptwin::MarkovUncertaintyModel::getBias | ( | ) |
Markov Uncertainty Model.
This model is a higher fidelity model for implementing noise, bias, and other sources of error into an input, with an implied emphesis on sensor measurements.
The foundational equation of this model is: y_meas = (1+s)*y_truth + \eta + b db/dt = \xi Where: \eta = Measurement noise which follows some zero mean Gaussian distribution with standard deviation \sigma_n b = Measurement bias and is not necessarily constant \xi = Bias random walk which follows some zero mean Gaussian distribution with standard deviation \sigma_b s = Scale factor which follows some zero mean Gaussian distribution with standard deviation \sigma_s
The Stochastic Differential Equation (SDE) governing the brownian motion of the bias random-walk (or drift) can be discretized using the Euler-Maruyama Method. The SDE in Itô calculus notation is db(t) = \sigma_b * dW(t) Where: W(t) = Wiener process (standard brownian motion) dW(t) follows a zero mean Gaussian distribution with standard deviation of sqrt(discretization time step)
The Euler-Maruyama Method would suggest a discrete time update (with variable step size) for SDE's of this form to be b_(k+1) = b_(k) + \sigma_b * sqrt(dt_(k)) * \zeta Where: \zeta follows a zero mean Gaussian distribution with standard deviation of one (white process noise)
This can be reduced into a final discrete bias update by relating random varibale multiplication with varaince scaling b_(k+1) = b_(k) + w_(k) Where: w_(k) follows a zero mean Gaussian distribution with standard deviation of \sigma_b * sqrt(dt_(k))
WHEN TO USE CERTAIN NOISE TERMS 1). Measurement noise describes the random fluctuations in measurements (or any input) and is the most basic form of error.
2). Bias is a additive off-set of the measurment or the noise. Bias along with noise describe a Guassian process that has a mean equal to the bias and a standard deviation equal to the that of the noise. Sensors such as accelerometers, GPS, or gyroscopes often have bias.
3). Bias drift describes the random fluctuations in that additive purtabative term over time. This is a good way to model the bias of a sensor drifting with age, temperature, radiative effects, etc. For long operation missions, it is typical for the bias (if present) to drift in a seemingly random manner.
4). Scale factor is a multiplicative error term that is present in a lot of sensors. This error can be thought of a small increments or decrements in the input (e.g. a 0.05 percent increase/decrease). Sensors that convert analog external properties such as pressure/temperature/strain/force into a voltage that then gets converted into a digital signal are almost always prone to scale factor errors to due slight calibration error. Some gyroscopes have scale factor errors provided in degrees per second per volt or degrees per second per bit.
TODO: The model only takes in single value inputs, so for quantities in R^3 like acceleration or angular velocity vectors, the model cannot apply misalignment error
| clockwerk::DCM warptwin::getCompositeRotation | ( | clockwerk::DCM & | dcm_f1_f2, |
| clockwerk::DCM & | dcm_f2_f3 ) |
A function to get the composite rotation generated by subsequent rotations.
| dcm_f1_f2 | The DCM describing the orientation between F1 and F2 |
| dcm_f2_f3 | The DCM describing the orientation between F2 and F3 |
| clockwerk::Quaternion warptwin::getCompositeRotationQuat | ( | clockwerk::Quaternion & | quat_f1_f2, |
| clockwerk::Quaternion & | quat_f2_f3 ) |
A function to get the composite rotation generated by subsequent rotations.
| quat_f1_f2 | The Quaternion describing the orientation between F1 and F2 |
| quat_f2_f3 | The Quaternion describing the orientation between F2 and F3 |
| int warptwin::getFrameRelativeDCM | ( | Frame & | f1, |
| Frame & | f2, | ||
| clockwerk::DCM & | dcm_f1_f2 ) |
A function to get the DCM represnting the relationship [f1/f2].
| f1 | The first frame for our DCM relationship |
| f2 | The second frame for our DCM relationship |
| warptwin::MarkovUncertaintyModel * warptwin::getNoiseModel | ( | ) |
Accessor for the internal noise model.
The initial bias in accelerometer measurement output described as a three-element vector in meters/second^2. Default is no bias. Must be set before model startup. The minimum acceleration that the sensor can record in each axis. Default is -20 g's (meters/second^2) The maximum acceleration that the sensor can record in each axis. Defualt is 20 g's (meters/second^2) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters) The alignment of the accelerometer relative to the mount frame The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantinization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (meters/second^2) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. The frame in which gravity is represented. If this parameter is not set, the gravity frame is assumed to be the root frame of the simulation. Latency of the pressure sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the accelerometer. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the accelerometer. (kg) The one-sigma Gaussian noise in accelerometer measurement output described as a three-element vector in meters/second^2. Default is no noise. The one-sigma Gaussian noise in the accelerometer bias drift described as a three-element vector in meters/second^2/sqrt(second). Default is no walking-bias drift. The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. The gravity vector acting on the sensor as represented in the gravity frame. (meters/second^2) Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame appropriate bias, noise, and rate limiting, with gravity removed. (meters/second^2) The "perfect" output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame without error sources, with gravity removed. This is an informational parameter and is not subject to latency. (meters/second^2) The measured output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame with error sources, with gravity included. (meters/second^2) The "perfect" output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame without error sources, with gravity included. This is an informational parameter and is not subject to latency. (meters/second^2) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) Current bias of the accelerometer. (m/s^2)
The initial bias in gyroscope measurement output described as a three-element vector in radians/second. Default is no bias. Must be set before model startup. The minimum angular velocity that the sensor can record in each axis. Default is -540 degrees/second (radians/second) The maximum angular velocity that the sensor can record in each axis. Default is 540 degrees/second (radians/second) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The alignment of the gyroscope relative to the mount frame The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantinization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (radians/second) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. Latency of the pressure sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the gyroscope. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the gyroscope. (kg) The one-sigma Gaussian noise in gyroscope measurement output described as a three-element vector in radians/second. Default is no noise. The one-sigma Gaussian noise in the gyroscope bias drift described as a three-element vector in radians/second/sqrt(second). Default is no walking-bias drift. The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output angular velocity produced by the gyro describing the angular velocity of the sensor frame relative to the simulation root frame appropriate bias, noise, latency, and rate limiting. (radians/second) The "perfect" output angular velocity produced by the gyro describing the angular velocity of the sensor frame (incl. misalignment) relative to the simulation root frame without bias and noise. This is an informational parameter and thus is not subject to latency. (radians/second) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) Current bias of the gyroscope. (rad/s)
| warptwin::GravityGradientModel * warptwin::gravityGradientModel | ( | ) |
Function to get a handle to the gravity gradient model contained within this model.
| warptwin::Gyroscope * warptwin::Gyroscope | ( | ) |
Function to access the internal gyro model.
| int warptwin::Heaviside | ( | T | input, |
| T & | output, | ||
| T | center = 0.0 ) |
This function is the Heaviside step function (or more colloquially the unit step function). This returns zero for all values less than center and return one for all values greater of equal than the center.
| input | Input to the unary function |
| output | Implicit return of the output |
| center | (OPTIONAL) Activation value of the Heaviside function |
| int warptwin::heikkinenLla | ( | const clockwerk::CartesianVector< 3 > & | pos__pcr, |
| double | r_planet_equatorial, | ||
| double | flattening, | ||
| double & | lat_rad, | ||
| double & | lon_rad, | ||
| double & | alt ) |
Function to calculate detic LLA from PCR state using the Heikkinen algorithm.
| pos__pcr | The position of the spacecraft in PCR frame |
| r_planet_equatorial | The equatorial radius of the planet |
| flattening | The flattening value of the planet |
| lat_rad | Implicit return of latitude in radians |
| lon_rad | Implicit return of longitude in radians |
| alt | Implicit return of altitude |
| warptwin::ImpulseModel * warptwin::impulseModel | ( | ) |
Function to get a handle to the impulse model contained within this model.
| int warptwin::initializeAttitude | ( | clockwerk::Quaternion | quat_sc_frame__frame, |
| CartesianVector3 | ang_vel_sc_frame__sc, | ||
| const std::string & | frame_name ) |
Initialize attitude and angular velocity of the spacecraft body frame.
| quat_sc_frame__frame | The desired attitude of the spacecraft body wrt frame_ptr |
| ang_vel_sc_frame__sc | The desired angular velocity of the spacecraft body wrt frame_ptr in the sc body frame |
| frame_name | The name of the frame relative to which state should be initialized |
| int warptwin::initializeAttitude | ( | clockwerk::Quaternion | quat_sc_frame__frame, |
| CartesianVector3 | ang_vel_sc_frame__sc, | ||
| Frame * | frame_ptr = nullptr ) |
Initialize attitude and angular velocity of the spacecraft body frame.
| quat_sc_frame__frame | The desired attitude of the spacecraft body wrt frame_ptr |
| ang_vel_sc_frame__sc | The desired angular velocity of the spacecraft body wrt frame_ptr in the sc body frame |
| frame_ptr | The frame relative to which state is initialized. Default (nullptr) will init wrt sim root frame |
| int warptwin::Spacecraft::initializeFromOrbitalElements | ( | double | a, |
| double | e, | ||
| double | i, | ||
| double | RAAN, | ||
| double | w, | ||
| double | f ) |
Function to initialize the spacecraftrelative to planet from orbital elements.
| a | Semimajor axis, m |
| e | Orbit eccentricity |
| i | Orbit inclination, radians |
| RAAN | Orbit RAAN, radians |
| w | Orbit argument of periapsis, radians |
| f | Orbit true anomaly, radians |
| MODEL(Spacecraft) public int warptwin::initializePositionVelocity | ( | CartesianVector3 | position_sc_frame__frame, |
| CartesianVector3 | velocity_sc_frame__frame, | ||
| const std::string & | frame_name ) |
Spacecraft Model.
The spacecraft model is a convenient wrapper around a set of high-fidelity models to make building space-based simulation easy. This class is ideal for configuring a simple planet orbiter.
Default models wrapped into the spacecraft model include:
Spacecraft comes with two frames
To configure spacecraft, users must assign the spacecraft planet_ptr to point to a valid instance of CustomPlanet or SpicePlanet. This is the mass of the spacecraft, in the same units as the rest of the simulation. Default is 1 kg. This is the body inertia tensor of the spacecraft, in the same units as the rest of the simulation. Default is identity matrix. The position of the spacecraft in the initialization frame, expressed in init frame. Default behavior is to take input in meters. The velocity of the spacecraft in the initialization frame, expressed in init frame Default behavior is to take input in meters/sec. The frame in which position and velocity are initialized. If not set, defaults to planet inertial frame The attitude of the spacecraft relative to the initialization frame. The angular velocity of the spacecraft relative to the initialization frame, expressed in spacecraft body frame. The frame in which attitude and angular velocity are initialized. If not set, defaults to planet inertial frame A pointer to the planet object, which may be either CustomPlanet or SpicePlanet. This variable must be set, and is cast to a planet internally within the spacecraft model. From the planet, all configuration parameters for gravity and planet relative state models are set. Accessor to the inertial frame of the planet. Set to point to _planet_inertial in constructor. Accessor to the rotating frame of the planet. Set to point to _planet_inertial in constructor. Position wrt planet centered inertial frame. Default is in meters. Velocity wrt planet centered inertial frame. Default is in meters/sec Attitude quaternion wrt planet inertial frame Angular velocity of the spacecraft wrt planet, output in body frame. In rad/s The latitude of the spacecraft wrt planet rotating frame, in radians The longitude of the spacecraft wrt the planet rotating frame, in radians The altitude of the spacecraft wrt planet ellipsoid. Default is in meters The total power input from all sources, in Watts The total power output from all sources, in Watts
Initialize position and velocity of the spacecraft body frame
| position_sc_frame__frame | The desired position of the spacecraft body wrt frame_ptr |
| velocity_sc_frame__frame | The desired velocity of the spacecraft body represented in frame frame_ptr |
| frame_ptr | The frame relative to which state is initialized. Default (nullptr) will init wrt sim root frame |
Initialize position and velocity of the spacecraft body frame
| position_sc_frame__frame | The desired position of the spacecraft body wrt frame_ptr |
| velocity_sc_frame__frame | The desired velocity of the spacecraft body represented in frame frame_ptr |
| frame_name | The name of the frame relative to which state should be initialized |
| bool warptwin::isValidNumber | ( | const std::string & | s | ) |
Checks if the given string is a valid numeric representation.
This function attempts to parse the entire string as a floating-point number (including integers, decimals, and scientific notation).
| s | The string to check. |
| int warptwin::legendre | ( | long | N, |
| long | M, | ||
| double | x, | ||
| double | P[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| double | sd_p[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] ) |
Calculates the associated Legendre functions and their derivatives.
Computes the associated Legendre functions up to degree N and order M with Neumann normalization. This includes calculating scaled derivatives (sdP), which handle singularities by multiplying the derivative by sqrt(1 - x^2).
| [in] | N | Maximum degree of the Legendre functions. |
| [in] | M | Maximum order of the Legendre functions. |
| [in] | x | Argument for Legendre functions, typically cos(theta). |
| [out] | P | Matrix of associated Legendre functions up to degree N and order M. |
| [out] | sd_p | Matrix of scaled derivatives of Legendre functions. |
| std::vector< std::string > warptwin::listDefaultConfigsByModelName | ( | std::string | name | ) |
| void warptwin::loadKernel | ( | std::string | kernel | ) |
A function to load in a sinle spice kernel.
| A | single spice kernel to load |
| double warptwin::lStar | ( | double | r | ) |
Function to return the characteristic length for CR3BP.
| r | The circular orbit radius of the secondary body about the first |
| int warptwin::lvlhFrame | ( | const CartesianVector3 & | pos, |
| const CartesianVector3 & | vel, | ||
| clockwerk::DCM & | lvlh_frame, | ||
| CartesianVector3 & | lvlh_ang_vel__lvlh ) |
Function to generate an LVLH frame attitude DCM from position and velocity.
| pos | Spacecraft position |
| vel | Spacecraft velocity |
| lvlh_frame | DCM describing the LVLH frame attitude |
| lvlh_ang_vel__lvlh | Cartesian vector to return angular velocity of LVLH frame in LVLH coordinates |
| warptwin::LvlhFrameManagerModel * warptwin::lvlhFrameManager | ( | ) |
Function to get a handle to the LVLH frame manager contained within this model.
| int warptwin::max | ( | T * | array, |
| unsigned int | size, | ||
| T & | result ) |
| int warptwin::mean | ( | T * | array, |
| unsigned int | size, | ||
| T & | result ) |
| int warptwin::mean2eccentric | ( | double | mean_anomaly, |
| double | eccentricity, | ||
| double & | eccentric_anomaly, | ||
| double | tol, | ||
| int | max_iter ) |
Function to convert mean anomaly to eccentric anomaly.
| mean_anomaly | |
| eccentricity | The orbit eccentricity |
| eccentric_anomaly | |
| tol | The tolerance for iterative conversion |
| max_iter | The maximum number of iterations after which the solver will exit |
| int warptwin::min | ( | T * | array, |
| unsigned int | size, | ||
| T & | result ) |
| warptwin::MODEL | ( | IMU | ) |
Model of IMU on vehicle which accounts for noise, bias, and drift.
The IMU model is a simple wrapper around the accelerometer and gyro models, wrapping them into a single package. For details on each element of the IMU, see the accelerometer or gyro definitions.
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The initial bias in accelerometer measurement output described as a three-element vector in meters/second^2. Default is no bias. Must be set before model startup. The minimum acceleration that the sensor can record in each axis. Default is -20 g's (meters/second^2) The maximum acceleration that the sensor can record in each axis. Defualt is 20 g's (meters/second^2) The initial bias in gyroscope measurement output described as a three-element vector in radians/second. Default is no bias. Must be set before model startup. The minimum angular velocity that the sensor can record in each axis. Default is -540 degrees/second (radians/second) The maximum angular velocity that the sensor can record in each axis. Default is 540 degrees/second (radians/second) The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters by de fault. pretty much always meters) The alignment of the accelerometer relative to the mount frame The rate at which the sensor generates an output, in hertz. Setting this value to 0 forces the sensor to output at the simulation rate. Value to seed the internal RNG for this model. Value to seed the internal RNG for this model. The frame in which gravity is represented. If this parameter is not set, the gravity frame is assumed to be the root frame of the simulation. The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantinization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (meters/second^2) The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantinization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (radians/second) Latency of the pressure sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the accelerometer. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Power draw of the gyroscope. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the accelerometer. (kg) The one-sigma Gaussian noise in accelerometer measurement output described as a three-element vector in meters/second^2. Default is no noise. The one-sigma Gaussian noise in the accelerometer bias drift described as a three-element vector in meters/second^2/sqrt(second). Default is no walking-bias drift. The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. The one-sigma Gaussian noise in gyroscope measurement output described as a three-element vector in radians/second. Default is no noise. The one-sigma Gaussian noise in the gyroscope bias drift described as a three-element vector in radians/second/sqrt(second). Default is no walking-bias drift. The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. The gravity vector acting on the sensor as represented in the gravity frame Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame appropriate bias, noise, and rate limiting, with gravity removed The "perfect" output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame without error sources, with gravity removed. This is an informational parameter. The measured output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame with error sources, with gravity included. (meters/second^2) The "perfect" output acceleration produced by the accelerometer describing the acceleration of the sensor frame relative to the simulation root frame without error sources, with gravity included. This is an informational parameter The measured output angular velocity produced by the gyro describing the angular velocity of the sensor frame relative to the simulation root frame appropriate bias, noise, and rate limiting The "perfect" output angular velocity produced by the gyro describing the angular velocity of the sensor frame (incl. misalignment) relative to the simulation root frame without bias and noise. This is an informational parameter. Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the accelerometer. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) Power draw of the gyroscope. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts) The bias of the gyroscope. (rad/s) The bias of the accelerometer. (m/s^2)
Function to access the internal accelerometer model
| warptwin::MODEL | ( | MSISAtmosphereModel | ) |
High fidelity atmosphere model utilizing the NRL MSIS implementation.
The MSIS atmosphere model is derived from the c-based MSIS implementation posted at https://git.smce.nasa.gov/ccmc-share/modelwebarchive/-/tree/main/MSIS/NRLMSIS00/nrlmsis00_c_version
It runs in the start step model call and generally takes detic latitude, longitude, and altitude wrt Earth as inputs and outputs density, temperature, and ideal gas pressure. 81 day average, centered on input time, of F10.7 solar activity index Daily F10.7 solar activity for previous day Daily Ap geomagnetic activity index Our R value for ideal gas pressure calculation. Default is for air The detic latitude to query, in radians The longitude to query, in radians The detic altitude above ground level to query, in meters The day of the year (1 to 366) The universal time, in seconds, in the current day. Up to 86400.0 The total atmospheric mass density in kg/m^3 The temperature at the query point in degrees K The ideal gas P=rho*R*T atmospheric pressure at the query point in N/m^2. Derived from MSIS – applicability will vary due to ideal gas assumption.
Set delayed output on MSIS model
| num_steps | The number of steps to delay until starting calculation |
| warptwin::MODEL | ( | PressureSensor | ) |
Accessor for the internal noise model.
The minimum pressure that the sensor can record. (Pascals) The maximum pressure that the sensor can record. (Pascals) The measurement resolution. The output value will be some multiple of this value. If the value is left at zero, an infinite resolution will be assumed, i.e. no data loss/quantinization. From a data sheet, this value can be computed as (measurement range) / 2^(bits per measurement) . (Pascals) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. Latency of the pressure sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the pressure sensor. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the pressure sensor. (kg) Local pressure from an atmosphere model, no incorporated noise. (Pascals) The bias in measurement output described as a double. Default is no bias. This value can change with an external model, i.e. temperature effects. (Pascals) The one-sigma gaussian noise in measurement output described as a double. Default is no noise. This value can change with en external model, i.e. modeling temperature effects. (Pascals) The one-sigma scale percent increase/decrease of the measurement. Default is no scaling. Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output pressure produced by the pressure sensor describing the local pressure of the sensor frame through the configured atmospheric model. Appropiate bias, noise, scaling, rate limiting, deadzoning, and resolution applied. The model outputs zero when in the blackout zone. (Pascals) The measured output pressure produced by the pressure sensor describing the local pressure of the sensor frame through the configured atmospheric model. Appropiate bias, noise, scaling, rate limiting, deadzoning, and resolution applied. The model outputs zero when in the blackout zone. (mbar) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
| warptwin::MODEL | ( | TimedImpulsiveBurnModel | ) |
Model which applies a fixed impulse to a vehicle at a set sim or UTC time.
This model is used for mission planning to program an impulsive burn to occur at a specific time and in a specific frame. The model internally uses a time trigger monitor, ImpulseModel, and node to apply a force to a specific body in the simulation.
Once triggered, the impulsive burn model will not trigger again until reset.
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The body frame of the spacecraft which will be performing the burn The frame in which the burn will be executed. If not set, will execute in the body frame The time of ignition of the burn. This may be in simulation time or ephemeris time, depending on which source the Time input is connected to. The impulsive burn vector, in m/s, to be executed at the time of ignition. This vector will be as represented in the Burn Frame The current time in the same timescale as the parameterized TIG
Function to get a handle to the time trigger monitor contained within this model
| warptwin::MSISAtmosphereModel * warptwin::msisModel | ( | ) |
Function to get a handle to the MSIS atmosphere model contained within this model.
| double warptwin::muStar | ( | double | m1, |
| double | m2 ) |
Function to return the characteristic mass for CR3BP.
| m1 | The mass of the primary body |
| m2 | The mass of the secondary body |
| double warptwin::muWMM | ( | double | input | ) |
Unary functional input to the associated Legendre function specific to the WMM model. This is typically denoted as mu or t in literature such as Winch et al. 2005 or Heiskanen and Moritz 1967, respectively.
For the WMM model, this is defined as:
μ = sin(φ')
Where φ' is the geocentric latitude
| [in] | input | Input to the unary function |
| void warptwin::neumannNormalization | ( | double | cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], |
| double | sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| double | c[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| double | s[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] ) |
Applies Neumann normalization to spherical harmonic coefficients.
This function transforms spherical harmonic coefficients from their original format (typically EGM96 style normalization) to Neumann normalization. The input matrices cbar and sbar contain the cosine and sine coefficients, which are normalized and stored in the output matrices c and s for use in gravitational calculations.
The Neumann normalization ensures that the coefficients are scaled to a standard that provides orthonormality and consistency across spherical harmonics terms.
| [in] | cbar | Matrix of original cosine coefficients. |
| [in] | sbar | Matrix of original sine coefficients. |
| [out] | c | Matrix to store Neumann-normalized cosine coefficients. |
| [out] | s | Matrix to store Neumann-normalized sine coefficients. |
| warptwin::OccultationModel * warptwin::occultationModel | ( | ) |
Accessor for the internal occultation model.
| double warptwin::oddfact | ( | long | n | ) |
Computes the double factorial of an odd integer.
Calculates the product of all odd numbers up to and including the specified integer n. This is used in the Legendre function for terms involving odd factorials.
| [in] | n | Non-negative odd integer for which to calculate the double factorial. |
| int warptwin::orbitInit | ( | Frame & | target, |
| Frame & | planet, | ||
| double | mu, | ||
| double | a, | ||
| double | e, | ||
| double | i, | ||
| double | RAAN, | ||
| double | w, | ||
| double | f ) |
Function to initialize a body's position and velocity from an orbit.
| target | The target frame to initialize |
| planet | The planet frame our orbit is relative to |
| mu | Gravitational parameter of the planet |
| a | Orbit semimajor axis, in meters |
| e | Orbit eccentricity |
| i | Orbit inclination, radians |
| RAAN | Orbit Right Ascention of the Ascending Node, radians |
| w | Orbit argument of periapsis, radians |
| f | Orbit true anomaly, radians |
| int warptwin::parseDefaultConfigFromJson | ( | const std::string & | class_type, |
| const std::string & | default_name, | ||
| nlohmann::json & | j ) |
Parse the default configuration from a JSON file into a PBR JSON object.
| class_type | The class type of the model |
| default_name | The name of the default configuration |
| j | The json object to parse into |
| void warptwin::parseLicenseString | ( | std::string | str, |
| std::string & | licensee, | ||
| int & | year, | ||
| int & | month, | ||
| int & | day ) |
Function to parse license string for relevant data.
| str | The license string to parse (loaded from file) |
| licensee | The licensing organization |
| year | The year when the locally stored license expires |
| month | The month when the locally stored license expires |
| day | The day when the locally stored license expires |
| std::vector< std::vector< double > > warptwin::pcr2lla | ( | const std::vector< double > & | pcr_x, |
| const std::vector< double > & | pcr_y, | ||
| const std::vector< double > & | pcr_z, | ||
| double | a = 6378137.0, | ||
| double | flattening = (1.0/298.257223563) ) |
Wrapper around pcrDeticToLLA for bulk conversion of x, y, z coordinates.
| pcr_x | Vector of x PCR frame values |
| pcr_y | Vector of y PCR frame values |
| pcr_z | Vector of z PCR frame values |
| a | Semimajor axis of the planet. Defaults to WGS84 |
| flattening | Flattening of the planet. Defaults to WGS84 |
| warptwin::FrameStateSensorModel * warptwin::planetInertialStateSensor | ( | ) |
Function to get a handle to the frame state sensor relative to the planet inertial frame.
| warptwin::PlanetRelativeStatesModel * warptwin::planetRelativeModel | ( | ) |
Function to get a handle to the planet relative state model contained within this model.
| warptwin::FrameStateSensorModel * warptwin::planetRotatingStateSensor | ( | ) |
Function to get a handle to the frame state sensor relative to the planet rotating frame.
| int warptwin::poslin | ( | T | input, |
| T & | output ) |
This function is a positive linear transfer function that behaves like a linear function only when x > 0, otherwise the function returns zero.
| input | Input to the unary funciton |
| output | Implicit return of the output |
| std::string warptwin::printArray | ( | const std::array< T, N > & | val | ) |
Debug function to print an array.
| val | The array to print |
| warptwin::TimedImpulsiveBurnModel * warptwin::programManeuver | ( | CartesianVector3 | delta_v__f, |
| double | sim_time, | ||
| Frame * | force_frame_ptr ) |
Function to program a timed impulsive burn into the spacecraft.
| delta_v__f | The impulsive burn vector to execute |
| sim_time | The time at which the burn should occur |
| force_frame_ptr | The frame in which the burn should be executed |
| warptwin::TimedImpulsiveBurnModel * warptwin::programManeuver | ( | CartesianVector3 | delta_v__f, |
| std::string | time_string, | ||
| Frame * | force_frame_ptr ) |
Function to program a timed impulsive burn into the spacecraft.
| delta_v__f | The impulsive burn vector to execute |
| time_string | Time string in an acceptable SPICE format at which burn should occur |
| force_frame_ptr | The frame in which the burn should be executed |
| warptwin::RangeAzElSensorModel * warptwin::rangeAzElSensor | ( | ) |
| warptwin::RateMonitor * warptwin::rateMonitor | ( | ) |
Accessor for the internal rate monitor model.
The initial bias in position measurement output described as a three-element vector in meters. Default is no bias. Must be set before model startup. The initial bias in velocity measurement output described as a three-element vector in meters/second. Default is no bias. Must be set before model startup. The vehicle frame relative to which the sensor is mounted and aligned. This is most typically the body frame of a spacecraft or other vehicle. mount_position__mf and mount_alignment_mf are described relative to this frame. The position of the sensor in the mount frame, represented in the default simulation unit (meters by default. pretty much always meters) The rate at which the sensor generates an output, in hertz. This value must be some positive (non-zero) integer. (Hz) Value to seed the internal RNG for this model. The frame in which the GPS measurements are given relative to. This is the primary planets rotating frame (e.g. ECEF). For now, this must be Earth's rotating frame. Maximum altitude above the WGS84 ellipsoid that the GPS will work. Defaults to 18,000 meters, the maximum altitude set by CoCom for civilian GPS devices. (meters) Minimum altitude above the WGS84 ellipsoid that the GPS will work. (meters) Maximum speed with respect to the rotating primary that the GPS will work. Defaults to 1900 km/hr, the maximum speed set by CoCom for civilian GPS devices. (meters/second) Latency of the gps sensor, millisecond value for the amount of delay in sim time for the correct values to be reflected in the outputs. Must be set before executive startup. Defaults to no delay. (milliseconds) Power draw of the GPS. This value may or may not be the peak power draw provided by most data sheets. This value is the expected power draw of a sensor when operational. (Watts) Mass of the GPS. (kg) The one-sigma Gaussian noise in position measurement output described as a three-element vector in meters. Default is no noise. The one-sigma Gaussian noise in velocity measurement output described as a three-element vector in meters/second. Default is no noise. The one-sigma Gaussian noise in the position bias drift described as a three-element vector in meters/sqrt(second). Default is no walking-bias drift. The one-sigma Gaussian noise in the velocity bias drift described as a three-element vector in meters/second/sqrt(second). Default is no walking-bias drift. Output time tied to measurements. Output time is exactly the navigation time (see SimTimeManager for configuration), without latency (instantaneous) but but with a rate that mirrors output rate The measured output position of the GPS sensor frame with respect to the PCR frame. This is not the position of the body but instead the position of the GPS sensor. This value includes noise, bias, and blackout-zones. The "perfect" output position of the GPS sensor with respect to the PCR frame. This is not the position of the body but instead the position of the GPS sensor. This value does not include noise, bias, or blackout-zones. This is an informational parameter and is not subject to latency. The measured output velocity of the GPS sensor frame with respect to the PCR frame. This is not the velocity of the body but instead the velocity of the GPS sensor. This value includes noise, bias, and blackout-zones. The "perfect" output velocity of the GPS sensor frame with respect to the PCR frame. This is not the velocity of the body but instead the velocity of the GPS sensor. This value does not include noise, bias, or blackout-zones. This is an informational parameter and is not subject to latency. The detic longitude of the GPS sensor frame. Does include sensor noise, bias, and blackout-zones. (rad) The detic latitude of the GPS sensor frame. Does include sensor noise, bias, and blackout-zones. (rad) The detic altitude of the GPS sensor frame. Does include sensor noise, bias, and blackout-zones. (meters) Boolean value to notify if the output measurement is valid (i.e. boolean for blackout-zones). True = not in blackout-zone, False = in blackout-zone. Power draw of the sensor. This value is populated when the model is active, and zero when the model is deactive. Allows the user to create duty cycles and power budgets. (Watts)
| void warptwin::readFileBinarySize | ( | char | buffer[MAX_SIZE_CHAR], |
| char * | size_actual, | ||
| const std::string & | filename ) |
Function to read a buffer of bytes from a file.
| buffer | The buffer of data to read from – max size is the max value of a char |
| buffer_size | The size of the buffer to be written |
| filename | The name of the file to write to |
| int warptwin::readGravityCoefficientsFile | ( | const std::string & | filename, |
| double | cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| double | sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| long int & | n, | ||
| long int & | m ) |
Reads gravitational coefficients from a file and stores them in provided matrices.
This function opens a specified file containing spherical harmonic gravitational coefficients and populates the provided matrices cbar and sbar with these values up to degree and order NMAX_SPHERICAL_HARMONICS. The function checks for the file's existence before attempting to read from it. This code is derived from the open-source NASA 42 simulation.
| [in] | filename | Path to the file containing the gravitational coefficients. |
| [out] | cbar | Matrix to store cosine harmonic coefficients. |
| [out] | sbar | Matrix to store sine harmonic coefficients. |
| [out] | n | Max degree loaded from egm96 file. |
| [out] | m | Max order loaded from egm96 file. |
| NO_ERROR | If the file is successfully read and coefficients are loaded. |
| ERROR_FILE_NOT_FOUND | If the specified file does not exist. |
| int warptwin::readTxtFile | ( | const std::string & | filename, |
| std::vector< std::vector< double > > & | data, | ||
| const std::string & | header_end_mark = "!", | ||
| const std::string & | delimeter = " ", | ||
| unsigned int | num_cols = 10 ) |
Reads a text file and populates a 2D vector with column-based numerical data.
This function opens the specified file, searches for the first line that begins with header_end_mark, and then starts parsing each subsequent line into num_cols columns. Each column is stored in the corresponding sub-vector of data. Lines are split using the given delimiter, and all extracted tokens are validated and converted to double.
The function returns integer codes to indicate success or various error conditions.
| filename | Path to the file containing tabular data. |
| header_end_mark | String indicating the end of the file header. The first line beginning with this string marks where data reading begins. |
| delimiter | The token used to split each data line into columns. |
| num_cols | The expected number of columns per data row. |
| data | A reference to a 2D vector of double where parsed data are stored. The function places each column in a corresponding data[i]. |
NO_ERROR (e.g., 0) on successERROR_NOT_FOUND if the file cannot be opened or foundERROR_DIMENSIONS if a data line does not match the expected number of columnsERROR_CANNOT_CONVERT_STRING if any token is not valid for conversion to double fileExist, splitString, and isValidNumber for file checking, string splitting, and numeric validation, respectively.header_end_mark are ignored.header_end_mark, data remains empty. | int warptwin::readWMMCoefficientsFile | ( | const std::string & | filename, |
| double | g[NUMBER_OF_READ_COEFFICIENTS], | ||
| double | h[NUMBER_OF_READ_COEFFICIENTS], | ||
| double | gdot[NUMBER_OF_READ_COEFFICIENTS], | ||
| double | hdot[NUMBER_OF_READ_COEFFICIENTS], | ||
| double & | epoch ) |
Reads magnetic field coefficients for WMM from a file and stores them in provided matrices.
This function opens a specified file containing spherical harmonic magnetic (WMM) coefficients and populates the provided arrays g, h, 'gdot', and 'hdot' with these values up to degree and order 'MAX_HARMONIC_COEFFICIENTS'. The function checks for the file's existence before attempting to read from it.
| [in] | filename | Path to the file containing the gravitational coefficients. |
| [out] | g | Return by reference array to store g Guass coefficients. (nT) |
| [out] | h | Return by reference array to store h Gauss coefficients. (nT) |
| [out] | gdot | Return by reference array to store g Guass coefficients time derivative. (nT/year) |
| [out] | hdot | Return by reference array to store h Gauss coefficients time derivative. (nT/year) |
| [out] | epoch | Decimal year that the WMM input data is associated to. (decimal year) |
| N | Degree and order of the Legendre polynomials. |
| NO_ERROR | If the file is successfully read and coefficients are loaded. |
| ERROR_FILE_NOT_FOUND | If the specified file does not exist. |
|
virtual |
Function to register apps with the table scheduler.
| app | The app to register |
| slot | The slot to register the app to |
| int warptwin::rv2coe | ( | const CartesianVector3 & | pos, |
| const CartesianVector3 & | vel, | ||
| double | mu, | ||
| CartesianVector6 & | elements ) |
Function to convert cartesian xyz pos/vel to orbital elements.
| pos | The x, y, z position of the reference object |
| vel | The x, y, z velocity of the reference object |
| mu | The gravitational parameter of the reference planet |
| elements | The orbital elements returned as {a, e, i, W, w, f} – angles in radians |
| int warptwin::satlin | ( | T | input, |
| T & | output, | ||
| T | limit = 1.0 ) |
This function is a saturated linear function that behaves like a linear function in the range of [0, limit], everywhere else the function is 0th order and piecewise continuous.
| input | Input to the unary function. |
| output | Implicit return of the output |
| limit | (OPTIONAL) Limit to the linear region, defaults to 1.0 |
| int warptwin::satlins | ( | T | input, |
| T & | output, | ||
| T | limit = 1.0 ) |
This function is a symmetric saturated linear function that behaves like a linear function in the range of [-limit, limit], everywhere else the function is 0th order and piecewise continuous.
| input | Input to the unary function |
| output | Implicit return of the output |
| limit | (OPTIONAL) Limit to the linear region, defaults to 1.0 |
| int warptwin::schmidtSemiNormLegendreSingularityWMM | ( | int | N, |
| double | x, | ||
| double * | PcupS ) |
Computes the Schmidt Semi-Normalized Legendre function outputs provided the maximum degree (N) as a positive integer when the position is at a singularity. The formula's require that N > 0, and abs(input) <= 1.0.
| [in] | N | degree of the Legendre function |
| [in] | x | input to the Legendre function : cos(colatitude_centric) or sin(latitude_centric) |
| [out] | PcupS | implicit output a vector of all the associated polynomials evaluated at input up to N |
| int warptwin::schmidtSemiNormLegendreWMM | ( | int | N, |
| double | x, | ||
| double * | Pcup, | ||
| double * | dPcup ) |
Computes the Schmidt Semi-Normalized Legendre function outputs provided the maximum degree (N) as a positive integer. The formula's require that N > 0, and abs(input) <= 1.0.
| [in] | N | degree of the Legendre function |
| [in] | x | input to the Legendre function : cos(colatitude_centric) or sin(latitude_centric) |
| [out] | Pcup | implicit output a vector of all the associated polynomials evaluated at input up to N |
| [out] | dPcup | derivative of Pcup(x) with respcet to latitude |
| int warptwin::setArrayFromString | ( | const std::string & | s, |
| std::array< T, N > & | retval ) |
Set a std::array from a string.
| s | The string to set our array from. Function assumes a bracket start/end and comma separated values [1.2,3.4,...] |
| retval | The array to set from string |
| int warptwin::setVectorFromString | ( | const std::string & | s, |
| std::vector< T > & | retval ) |
Set a std::array from a string.
| s | The string to set our array from. Function assumes a bracket start/end and comma separated values [1.2,3.4,...] |
| retval | The vector to set from string |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| int warptwin::signum | ( | T | input, |
| T & | output ) |
This function is the signum function (typically denoted sgn). Described simply, it outputs the sign (e.g. negative one, positive one, or zero) or the input.
| input | Input to the unary function |
| output | Implicit return of the output |
| void warptwin::simpleDecrypt | ( | char * | encrypted, |
| char * | unencrypted, | ||
| char | size, | ||
| const std::string & | key ) |
Function to decrypt a buffer of data – companion to simpleEncrypt.
| unencrypted | The encrypted buffer to decrypt |
| encrypted | The unencrypted buffer result |
| size | The size of the buffer |
| key | The encryption key to use for the buffer |
| void warptwin::simpleEncrypt | ( | char * | unencrypted, |
| char * | encrypted, | ||
| char | size, | ||
| const std::string & | key ) |
Function to perform a simple encryption of a buffer of data.
| unencrypted | The unencrypted buffer to encrypt |
| encrypted | The encrypted buffer result |
| size | The size of the buffer |
| key | The encryption key to use for the buffer |
| warptwin::SphericalHarmonicsGravityModel * warptwin::sphericalHarmGravityModel | ( | ) |
Function to get a handle to the spherical harmonics gravity model contained within this model.
| int warptwin::sphericalHarmonics | ( | long | N, |
| long | M, | ||
| double | r, | ||
| double | phi, | ||
| double | theta, | ||
| double | Re, | ||
| double | K, | ||
| double | C[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| double | S[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
| clockwerk::CartesianVector< 3 > & | grad_v ) |
Computes the gradient of the gravitational potential using spherical harmonics.
This function calculates the radial, latitudinal, and longitudinal components of the gravitational potential gradient up to degree N and order M using normalized Legendre coefficients. The result is stored in gradV. The maximum size is 18x18
| [in] | N | Maximum degree of spherical harmonics. |
| [in] | M | Maximum order of spherical harmonics. |
| [in] | r | Radial distance from planet's center. |
| [in] | phi | Longitude (angle from prime meridian in radians). |
| [in] | theta | Colatitude (angle from the north pole in radians). |
| [in] | Re | Reference radius, typically planet's radius in meters. |
| [in] | K | Scaling constant, typically planet's gravitational parameter divided by Re. |
| [in] | C | Normalized Legendre coefficients (cosine terms). |
| [in] | S | Normalized Legendre coefficients (sine terms). |
| [out] | grad_v | Gradient of the gravitational potential [radial, latitudinal, longitudinal]. |
| int warptwin::splitString | ( | const std::string & | text, |
| const std::string & | delimiter, | ||
| std::vector< std::string > & | tokens ) |
Splits a string into a vector of substrings based on a specified string delimiter.
This function searches the input string text for each occurrence of the substring delimiter. For each delimiter occurrence, the substring before the delimiter is extracted and stored in the return vector. The search then continues from just after the end of the last found delimiter. If the delimiter is not found anymore, the final substring from the last search position to the end of the string is appended.
If delimiter is empty, the entire text is returned as a single token (this behavior can be adjusted as needed).
| text | The input string to be split. |
| delimiter | The string delimiter used for splitting text. |
| tokens | Implicit return of all strings separated by delimeter |
|
overrideprotected |
Class to execute logging.
Simulated model of spacecraft communications including losses and gains with comm links.
Simple thruster model.
This event executes logging in the specified logger whenever triggered. The triggering events will be determined by the selected monitor. Our trigger – this is the flag set and unset by the monitor as its ultimate output, and should be used downstream by events, etc.
Set the sim logger run by this event
| logger | The sim logger to tie to this event |
Function to set up and start our logger
This is a simple model of a thruster which applies a thrust force according to mass flow and the specific impulse of the thruster. Force is applied to a node attached to the referenced body frame. The force applied by the thruster will produce a force and moment to the body as determined by the WarpTwin dynamics.
Noise is applied as a gaussian noise which is updated every time the thruster command toggles from off to on.
This model is used to calculate and manage data related to communications systems in a simulation. It provides a structure for handling various parameters, inputs, and outputs related to communications, such as the losses and gains associated with any communication link.
IMPORTANT: Though loss is generally expressed as a negative gain, this model assumes that loses are positive and will subtract accordingly. For example, suppose your receiver system has poor circuitry and you expect the power received to decrease by half. This would be a gain of -3 dB, however this model expects the user to input a loss of positive 3 dB. In general, loss = -gain.
Author: Daniel Krobath Email: danie.nosp@m.l.kr.nosp@m.obath.nosp@m.@att.nosp@m.x.tec.nosp@m.h Revised: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech The transmitter carrier frequency in hertz (Hz) The bandwidth of transmission (Hz) The bit rate in bits per second (bps) The transmit power in Watts (W) Return loss of the transmitter, this value describes ratio of power that is reflected back into the system. Should be input as positive but is normally negative. (dB) The transmit antenna gain in decibels relative to isotropic (dBi) The total transmit system loss in decibels (dB). This is the accumulation of transmitter pointing loss, and transmitter circuit loss. Inputting zero assumes that there is no return loss (despite this actually being 100% return loss). The receive antenna gain in decibels relative to isotropic (dBi) The noise temperature in Kelvin (K). This value is realted to the system noise density by Boltzmann*noise_temp and system noise power by the equation band_width*noise_density. The total receive system loss in decibels (dB). This is the accumulation of receiver side loss such as pointing loss, radome loss, polarization loss, and atmospheric loss. The cross polarization loss in decibels (dB). General rule of thumb, if both RX and TX have same-hand circular or linear (0dB), if there is a circular to linear match (3dB), but a right vs left circular mismatch can result in 20 to 30 dB loss. The energy per bit to noise ratio required in dB. Based on various modulation schemes for a desired bit error rate. For BPSK an Eb/N0 required of about 11 allows for a bit error rate around 1e-6. This is the range of the input object to the frame in meters. Will be zero if masked. This is the mask flag for the ground station. True for masked, False for visible The free space path loss in decibels (FSPL) (dB) The effective isotropic radiated power (EIRP) in decibel-milliWatts (dBm) The receive power in decibel-milliWatts (dBm) The system noise figure (NF) in decibel-milliWatts/Hz (dBm/Hz) The signal-to-noise density ratio (SNR) in decibel (dB) The energy per bit to noise ratio in in decibels (dB) The link margin in decibels (dB)
Compute the receiver gain based based on system parameters
| antenna_diameter | The receive antenna diameter in meters |
| antenna_efficiency | The receive antenna efficiency as a percentage (0 to 100) |
| frequency | The transmitter frequency in hertz (Hz) |
| int warptwin::stdev | ( | T * | array, |
| unsigned int | size, | ||
| T & | result ) |
| std::string warptwin::stringReplace | ( | const std::string & | source, |
| const std::string & | orig_str, | ||
| const std::string & | new_str ) |
Replace the first element of a source string with a new element.
| source | The target string |
| orig | The original string to find and replace |
| new | The replacement for orig |
| std::string warptwin::strip | ( | const std::string & | input | ) |
Removes leading and trailing whitespace characters from a string.
This function mimics the behavior of Python's str.strip() method. It removes all whitespace characters (such as spaces, tabs, newlines) from both the beginning and the end of the input string, leaving the content in between unchanged.
| input | The string to be stripped of leading and trailing whitespace. |
| std::string warptwin::toLower | ( | const std::string & | input | ) |
Function to convert a string to all lower case.
| input | String to be converted |
| std::string warptwin::toUpper | ( | const std::string & | input | ) |
Function to convert a string to all upper case.
| input | String to be converted |
| std::string warptwin::trim | ( | const std::string & | str, |
| const std::string & | whitespace = " \t" ) |
Function to trim leading and trailing whitespace from string.
| str | The string to trim |
| whitespace | The whitespace we're looking to trim off. Defaults to " \t" |
| double warptwin::true2eccentric | ( | double | true_anomaly | ) |
Convert true anomaly to eccentric anomaly.
| true_anomaly | The true anomaly, in radians |
| int warptwin::true2eccentric | ( | double | true_anomaly, |
| double | eccentricity, | ||
| double & | eccentric_anomaly ) |
Function to convert true anomaly to eccentric anomaly.
| true_anomaly | |
| eccentricity | The orbit eccentricity |
| eccentric_anomaly |
| double warptwin::tStar | ( | double | r, |
| double | mu ) |
Function to return the characteristic time for the CR3BP.
| r | The circular orbit radius of the secondary body about the first |
| mu | The mass of the primary body |
| int warptwin::twoBodyPropagate | ( | double | time, |
| double | mu, | ||
| clockwerk::CartesianVector< 3 > | pos_initial, | ||
| clockwerk::CartesianVector< 3 > | vel_initial, | ||
| clockwerk::CartesianVector< 3 > & | pos_final, | ||
| clockwerk::CartesianVector< 3 > & | vel_final ) |
Function to propagate a body between two points in time using a keplerian orbit.
| time | The time for which the orbit should be propagated |
| mu | The gravitational parameter for the central planet |
| pos_initial | The initial position of the body |
| vel_initial | The initial velocity of the body |
| pos_final | The position of the body after propagation |
| vel_final | The velocity of the body after propagation |
| int warptwin::variance | ( | T * | array, |
| unsigned int | size, | ||
| T & | result ) |
| void warptwin::writeFileBinarySize | ( | char * | buffer, |
| char | buffer_size, | ||
| const std::string & | filename ) |
Function to write a buffer of bytes to a file, along with their size.
| buffer | The buffer of data to write to file |
| buffer_size | The size of the buffer to be written |
| filename | The name of the file to write to |
| void warptwin::writeKmlFile | ( | const std::string & | file, |
| const std::vector< std::vector< double > > & | lat, | ||
| const std::vector< std::vector< double > > & | lon, | ||
| const std::vector< std::vector< double > > & | alt, | ||
| const std::vector< std::string > & | colors, | ||
| bool | project_to_ground = true ) |
Function to write a full KML file from trajectory data.
| file | The file to write kml data to |
| lat | A vector of doubles corresponding to latitude |
| lon | A vector of doubles corresponding to longitude |
| alt | A vector of doubles corresponding to altitude |
| colors | A vector of |
| project_to_ground | A bolean indicating whether the trajectory should be projected to the ground |
| std::string warptwin::writeTrajectory | ( | const std::vector< double > & | lat, |
| const std::vector< double > & | lon, | ||
| const std::vector< double > & | alt, | ||
| bool | project_to_ground = true, | ||
| const std::string & | color = "7f00ffff" ) |
Function to write a trajectory into a KML file.
| lat | A vector of doubles corresponding to latitude |
| lon | A vector of doubles corresponding to longitude |
| alt | A vector of doubles corresponding to altitude |
| project_to_ground | A bolean indicating whether the trajectory should be projected to the ground |
| MODEL (OccultationModel) public double warptwin::_a_i |
Occultation model using spherical representations of objects.
This model calculates the occultation fraction of a source from the perspective of an observer using spherical representations of the occulting object and source. The position of the observer in the reference frame f The position of the occulting object in the reference frame f The position of the source object in the reference frame f Fraction of two spherical representations of objects that are visible from the point of view of the observer. 0 is fully occulted, 1 is not occulted, 0-1 is visible fraction of observed object.
| CartesianVector3 warptwin::_accel_grav__spherical |
|
protected |
The IMU accelerometer model.
| double warptwin::_alt |
| double warptwin::_alt_km |
| double warptwin::_altitude_feet |
| double warptwin::_altitude_true |
|
protected |
Record of mapped apps.
|
protected |
|
protected |
|
protected |
| std::vector<std::vector<double> > warptwin::_atmos_table |
| double warptwin::_azimuth |
|
protected |
Internal variable for holding the bias and its deviations from the initial value.
|
protected |
|
protected |
| double warptwin::_c[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] |
|
protected |
Value to hold last thrust command.
|
protected |
The torque coil node.
| double warptwin::_colatitude |
|
protected |
| double warptwin::_cph |
| double warptwin::_cth |
|
protected |
The bias and noise model for current.
| double warptwin::_current_capacity |
| double warptwin::_d |
| double warptwin::_d_1 |
| double warptwin::_d_2 |
| double warptwin::_d_e |
| double warptwin::_d_i |
| double warptwin::_d_o |
|
protected |
Temporary DCM for quaternion calculation.
| clockwerk::DCM warptwin::_DCM_directMeanWindFrame_to_meanWindFrame |
Internal variable for the rotation from the direct mean wind frame to the mean wind vector representation frame.
|
protected |
A DCM relating our sensor frame to root.
| clockwerk::DCM warptwin::_dcm_tmp |
| CartesianVector3 warptwin::_dist_wind__comp |
| double warptwin::_dot_product_normal_solar |
Temporary variable to hold the result of the dot product between the normal vector and solar vector.
|
protected |
|
protected |
|
protected |
Dummy variables for ignoring unneeded function implicit returns.
| CR3BPDynamics warptwin::_dynamics |
|
protected |
|
protected |
The ENU frame created for the GS by this model.
|
protected |
| int warptwin::_err |
| MODEL (LlaDeticStateInit) public int warptwin::_error |
Model to produce position/velocity vector from a set of detic latitude, longitude, altitude coordinates.
| EffectiveSolarAreaModel warptwin::_esa |
|
protected |
| MODEL (EffectiveSolarAreaModel) public CartesianVector3 warptwin::_face_normal_vector__body |
Effective Solar Area model.
This model defines simple solar area of a flat surface. This is computed by taking the dot product of the normal vector of the surface and the solar vector. This value is expected to be negative if the panel is illuminated. If the value is positive, then the value is set to zero. If the value is negative, then the value is negated to become positive. This value is then multiplied by the area of the surface.
Author: Alex Jackson Email: alex..nosp@m.jack.nosp@m.son@a.nosp@m.ttx..nosp@m.tech The solar vector in the solar frame (Sun to spacecraft) The normal vector pointing out of the surface in the body frame The area of the surface The quaternion relating the body frame to the solar frame The effective solar area
Temp variable to hold normalized vector on body
| CartesianVector3 warptwin::_face_normal_vector__sun |
Temporary variable to hold the vector that is normal to the surface after converting to the solar frame.
| CartesianVector3 warptwin::_fe |
|
protected |
|
protected |
|
protected |
| FrameStateSensorModel warptwin::_fss |
|
protected |
The frame state sensor for relative states to the ENU frame.
|
protected |
The frame state sensor for GS state in the PCI frame.
| FrameStateSensorModel warptwin::_fss_sc_s |
|
protected |
|
protected |
|
protected |
| CartesianVector3 warptwin::_ggTorque |
| CartesianVector3 warptwin::_grav_force__planet |
|
protected |
The gravity vector as represented in the sensor frame.
|
protected |
|
protected |
| GroundStationModel warptwin::_gs |
| CartesianVector3 warptwin::_gust_wind__comp |
|
protected |
The IMU gyro model.
|
protected |
|
protected |
|
protected |
| std::vector<double> warptwin::_image_set |
|
protected |
|
protected |
Temporary variable for checking if sensor is in deadzone. Each element of vector corresponds to an axis.
|
protected |
|
protected |
| std::array<double, 6> warptwin::_input_states |
| clockwerk::CartesianVector<3> warptwin::_internal_pos |
| clockwerk::CartesianVector<3> warptwin::_internal_vel |
| Interpolate2D warptwin::_interp_density |
| Interpolate2D warptwin::_interp_pressure |
| Interpolate2D warptwin::_interp_temperature |
| Interpolate2D warptwin::_interp_thrust |
| Interpolate2D warptwin::_interpolate2D_model |
| double warptwin::_K |
| double warptwin::_l_star |
|
protected |
Temporary variable for the latest recorded output added to latency model and dummy output for stepping though latency.
|
protected |
| double warptwin::_lat |
|
protected |
|
protected |
|
protected |
The latency model for servo angle output.
Internal latency model, templated to the sensor output struct.
|
protected |
Temporary value for the return of the latency value.
|
protected |
Handle to our logger object.
| double warptwin::_lon |
| CartesianVector3 warptwin::_lvlh_ang_vel__lvlh |
Temporary variable to hold LVLH angular velociyt in lvlh frame.
| clockwerk::DCM warptwin::_lvlh_attitude__r |
Temporary variable to hold lvlh attitude.
|
protected |
| CartesianVector3 warptwin::_mag_dipole__PCR |
| CartesianVector3 warptwin::_mag_field__PCR |
|
protected |
Temporary DCM for magnetic field transformation.
| double warptwin::_magnitude |
| double warptwin::_max_altitude_km |
| double warptwin::_max_time_s |
|
protected |
The maximum amount that the servo can spin in the time of a single simulation step.
| bool warptwin::_max_warned = false |
| CartesianVector3 warptwin::_mean_wind__comp |
Internal variables for rotated vectors.
| double warptwin::_mean_wind_rot_angle |
Internal variable for the mean wind frame rotation angle.
|
protected |
Temporary variable to hold the measured pressure before bound checks and reolution quantinization.
| double warptwin::_min_altitude_km |
| double warptwin::_min_time_s |
| bool warptwin::_min_warned = false |
|
protected |
Misalignment angle.
|
protected |
|
protected |
| Matrix3 warptwin::_mom_inertia_tensor |
Matrix to hold the moment of inertia tensor of the wheel.
|
protected |
| double warptwin::_mu_star |
| double warptwin::_multiplier |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The bias and noise model for servo angle output.
|
protected |
Our nominal thrust calculation from Isp and the like.
| NormalRandom<double>* warptwin::_normal_random |
| OccultationModel warptwin::_oc |
|
protected |
Occultation model.
| MODEL (OrbitalElementsStateInit) public CartesianVector6 warptwin::_orbital_elements |
Model for sensing the instantaneous orbital elements of a vehicle given its position and velocity.
Model to produce position/velocity vector from orbital elements.
This model takes the xyz cartesian state of a spacecraft and outputs it as keplerian orbital elements This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use The position of the spacecraft in a generic inertial frame The velocity of the spacecraft in a generic inertial frame The semimajor axis of the spacecraft orbit, in meters The orbit eccentricity The orbit inclination, in radians The orbit RAAN, in radians The orbit argument of periapsis The true anomaly, in radians
This model produces the xyz cartesian state of a spacecraft from orbital elements for state initialization. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use The semimajor axis of the spacecraft orbit, in meters. Default is arbitrary 500 km alt orbit at Earth The orbit eccentricity. Default is arbitrary nearly circular orbit. The orbit inclination, in radians. Default is arbitrary 45 degree inclination The orbit RAAN, in radians The orbit argument of periapsis The true anomaly, in radians The position of the spacecraft in a generic inertial frame The velocity of the spacecraft in a generic inertial frame
| bool warptwin::_out_of_range |
|
protected |
|
protected |
|
protected |
|
protected |
Internal variables for function implicit returns.
|
protected |
|
protected |
|
protected |
| double warptwin::_peak_system_voltage |
|
protected |
Value to hold perturbation to current command.
|
protected |
Temporary variable to hold the perturbed acceleration with and without gravity.
|
protected |
|
protected |
Temporary variable to hold the perturbed ang vel.
|
protected |
Temporary variable to hold the perturbed acceleration with and without gravity.
|
protected |
Internal variables for the perturbed position and velocity.
|
protected |
Custom planet consisting of inertial and rotating frame which can be configured with custom rotation rate.
The simple planet model is a simple model of a planet with configurable parameters for initial attitude, angular rate, and the items defined in planet defaults for gravitational parameter, J2, J3, equatorial radius,
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech The angular velocity of the planet rotating frame relative to the inertial frame. Defaults to Earth's rotation rate The angular velocity of the planet rotating frame relative to the inertial frame. Defaults to Earth's rotation rate. Mirrored on the output value. Equatorial radius of the planet, in meters. Default is Earth R per WGS84, in meters. This value is set to reflect user input values. Mirrored on the output value. Flattening for the planet. Default is WGS84 flattening. This value is set to reflect user input values. Mirrored on the output value. Gravitational parameter for planet. Default is WGS84 value, in m^3/s^2. This value is set to reflect user input values. Mirrored on the output value. J2 parameter for planet. Default is derived from WGS84 but inexact. This value is set to reflect user input values. Mirrored on the output value. J3 parameter for planet. Default is derived from WGS84 but inexact. This value is set to reflect user input values. Mirrored on the output value. Mean angular velocity of the planet. Assumes rotation about Z axis. Default is WGS84 Earth in rad/s. This value is set to reflect user input values. Mirrored on the output value. A pointer to the custom planet object itself for easy passing to other models. Is a void pointer and must be cast in downstream model. Nullptr is set to self in constructor. Accessor to the inertial frame of the planet. Set to point to _planet_inertial in constructor. Accessor to the rotating frame of the planet. Set to point to _planet_inertial in constructor. Equatorial radius of the planet, in meters. Default is Earth R per WGS84, in meters. This value is set to reflect user input values. Flattening for the planet. Default is WGS84 flattening. This value is set to reflect user input values. Gravitational parameter for planet. Default is WGS84 value, in m^3/s^2. This value is set to reflect user input values. J2 parameter for planet. Default is derived from WGS84 but inexact. This value is set to reflect user input values. J3 parameter for planet. Default is derived from WGS84 but inexact. This value is set to reflect user input values. Mean angular velocity of the planet. Assumes rotation about Z axis. Default is WGS84 Earth in rad/s. This value is set to reflect user input values.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| double warptwin::_polar_radius |
| CartesianVector3 warptwin::_pos |
| CartesianVector3 warptwin::_pos__pcr |
| MODEL (GravityGradientModel) public CartesianVector3 warptwin::_pos_body_pci__body |
Gravity Gradient Model.
This model calculates the gravity gradient torque force resulting from differences in axial inertia on a spacecraft. The equations used for this calculation come from "Analytical Mechanics of Space Systems (Fourth Edition), by Hanspeter Schaub and John L. Junkins", page 226 (eq. 4.158). The gravity gradient torque calculation is done in the body frame (Body frame position and inertia).
Author: Sam Matez Email: sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use The position of the body with respect to PCI frame, expressed in PCI coordinates The attitude of the body with respect ot the PCI frame, in quaternions The inertia tensor expressed in the body frame The tourque vector acting on the body due to gravity gradient effects wrt to the body frame
|
protected |
Internal variable for the position of the primary orbiter with respect to the sun sensor represented in sun sensor frame coordinates.
|
protected |
Internal variable for the position of the Sun with respect to the sun sensor represented in sun sensor frame coordinates.
|
protected |
|
protected |
Internal variable for the position of the sun sensor with respect to the sun sensor represented in sun sensor frame coordinates. Zero vector always.
|
protected |
|
protected |
|
protected |
|
protected |
Power reflected back into the system in Watts.
|
protected |
|
protected |
Power leaving the transmitter in decibel-milliWats.
|
protected |
| bool warptwin::_prev_com = false |
Boolean to store the previous operational state.
|
protected |
Temporary variable to hold the bias vector at last function call.
|
protected |
Internal variables for the previous bias of the position and velocity measurements.
|
protected |
|
protected |
Model to compute the position of the primary orbiter relative to the sun sensor frame.
|
protected |
Temporary quaternion used for random rotations.
| MODEL (SolarRadiationPressureModel) public double warptwin::_r |
Point mass gravity model.
Solar Radiation Pressure Model.
This model generates forces acting on a body under the influence of a simple point mass gravity field. This is the gravitational parameter of our parent planet. Defaults to Earth's gravitational parameter for ease of use This is the mass of the body, which will be multiplied by our force to get the force calculation... TODO to replace this with accel methods The position of the object body in the reference frame f This is the acceleration due to gravity calculated in the same reference frame as pos_body__f
This model calculates the solar radiation pressure perturbation that acts on a body in orbit. The methods and calculations in this model come from https://freeflyer.com/_help_Files/spherical_srp.htm
Author: Sam Matez Email: sam.m.nosp@m.atez.nosp@m.@attx.nosp@m..tec.nosp@m.h The solar flux , defaults to the mean solar flux at one astronomical unit (W/m^2) The body coefficient of reflectivity () The area of the body subject to solar radiation (the mean area that faces the sun). Defaults to 1 m^2 The body position wrt the Sun in any generic frame. Defaults to 1 AU in meters with sun in X direction The current solar intensity on a scale of 0 to 1 where 0 is eclipse and 1 is direct sunlight The force acting on the body due to solar radiation pressure (N) in the smae generic frame as the input
| double warptwin::_r_pos |
|
protected |
| double warptwin::_radius |
The radius set by the enum centric_by.
|
protected |
The range az el sensor for our actual ground station.
|
protected |
Rate monitor to control the rate at which the sensor runs.
| std::array<double, 6> warptwin::_rates |
|
protected |
| MODEL (ProximityMonitor) public CartesianVector3 warptwin::_rel_position |
The time trigger monitor is a simple implementation of the monitor that triggers continuously after a set time. The time is set upon construction, but may be changed during run via function. This is the variable at what difference between deputy and chief the monitor should trigger Take chief position (position 1) Take deputy position (position 2) The range between the chief and deputy Our trigger – this is the flag set and unset by the monitor as its ultimate output, and should be used downstream by events, etc.
| NormalRandom< double > * warptwin::_rng = nullptr |
RNG to produce our distribution.
| double warptwin::_rps_to_rpm = 60.0/(2*M_PI) |
Conversion between radians per second and revolutions per minute.
| SimpleComAnalysisModel warptwin::_rx_com_analysis_model |
| double warptwin::_s[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] |
| CartesianVector3 warptwin::_s_ob_vec |
| double warptwin::_safesqrtresult |
| CartesianVector3 warptwin::_sc_pos_tmp__root |
| CartesianVector3 warptwin::_sc_pos_tmp__sc |
| clockwerk::Quaternion warptwin::_sc_quat_tmp_root |
| CartesianVector3 warptwin::_sc_vel_tmp__root |
| CartesianVector3 warptwin::_sc_vel_tmp__sc |
|
protected |
Internal variables for the different noise sources.
| double warptwin::_scale_length_u |
| double warptwin::_scale_length_v |
| double warptwin::_scale_length_w |
| double warptwin::_scaling_factor |
|
protected |
Map schedule indices to timing vector.
| bool warptwin::_seen_last_step |
|
protected |
The bias and noise model for sensor output.
|
protected |
The sensor frame in which all measurements will be taken.
|
protected |
The bias and noise model for sensor output.
|
protected |
Temporary value that has perturbations acted upon it.
|
protected |
| double warptwin::_sph |
|
protected |
| SolarPanelPowerModel warptwin::_spp |
|
protected |
Internal variable for 1/sqrt(Hz).
|
protected |
|
protected |
|
protected |
Frame state sensor model of the GPS frame relative to the PCR frame.
|
protected |
|
protected |
| double warptwin::_sth |
|
protected |
Model to compute the position of the sun relative to the sun sensor frame.
| double warptwin::_system_shutoff_capacity |
| double warptwin::_t_star |
|
protected |
|
protected |
Temporary quaternion for misalignment calculation.
|
protected |
Misalignment angle magnitude and unit vector.
Temporary angle used for random rotations.
|
protected |
Value to hold perturbation to thrust.
| std::vector<std::vector<double> > warptwin::_thrust_table |
|
protected |
The bias and noise model for thrust output.
|
protected |
The node at which thrust is applied.
|
protected |
|
protected |
|
protected |
The number of microseconds per app to run.
| double warptwin::_tmp |
| double warptwin::_tmp1 |
| double warptwin::_tmp2 |
| double warptwin::_tmp3 |
| double warptwin::_tmp4 |
| double warptwin::_tmp5 |
|
protected |
| CartesianVector3 warptwin::_tmp_tgt |
| CartesianVector3 warptwin::_tmpvec |
| BiasNoiseModel warptwin::_torque_bias_noise |
The bias and noise model for torque output.
| double warptwin::_torque_perturbation = 0.0 |
Value to hold perturbation to torque.
|
protected |
Value to hold total torque calculation.
|
protected |
Temporary variable to hold total error for gyro.
|
protected |
| double warptwin::_total_system_capacity |
|
protected |
Value to hold total thrust calculation.
| double warptwin::_total_torque = 0.0 |
Value to hold total torque calculation.
|
protected |
|
protected |
Truth altitude used for dead-zone determination.
|
protected |
Temporary variable to hold the truth magnetic field vector in the sensor frame.
|
protected |
Truth speed used for dead-zone determination.
|
protected |
Pointers to table schedulers. These are initialized based on the parameterized table schedule rate value and only one is allocated
|
protected |
|
protected |
|
protected |
|
protected |
| double warptwin::_turb_intensity_u |
| double warptwin::_turb_intensity_v |
| double warptwin::_turb_intensity_w |
|
protected |
The turn direction of the servo for this time step.
| SimpleComAnalysisModel warptwin::_tx_com_analysis_model |
| UniformRandom<double> warptwin::_uniform_random |
|
protected |
Interal model for generating a uniform random number.
| CartesianVector3 warptwin::_unitpos_body_sun_f |
| CartesianVector3 warptwin::_v_obj__aero |
| CartesianVector3 warptwin::_v_wind__aero |
| CartesianVector3 warptwin::_vel |
| Interpolate2D warptwin::_voltage_interp_table |
|
protected |
Temporary vector used for random rotations.
|
protected |
|
protected |
| Node warptwin::_wheel_node |
The reaction wheel node.
| double warptwin::_wind_u_feet |
| double warptwin::_wind_v_feet |
| double warptwin::_wind_w_feet |
|
protected |
|
protected |
|
protected |
Vector to hold temporary axes during orientation calculation.
|
protected |
| const std::string warptwin::ALIAS_END = "]" |
| const std::string warptwin::ALIAS_START = "[" |
| const std::vector<double> warptwin::ALTITUDE_INTERPOLATE = {2000.0, 11000.0, 44000.0, 200000.0} |
| const std::string warptwin::ARG_INDICATOR = "--" |
| const std::string warptwin::AUTHOR_EMAIL_END = "> " |
| const std::string warptwin::AUTHOR_EMAIL_START = " <" |
| clockwerk::DataIO<Body*> warptwin::body = clockwerk::DataIO<Body*>(this, "body", &_body) |
| const std::string warptwin::CODE_LITERAL = "```" |
| const std::string warptwin::CZML_DESCRIPTION = "<<DESCRIPTION>>" |
| const std::string warptwin::CZML_END_INTERVAL = "<<END_INTERVAL>>" |
| const std::string warptwin::CZML_FACILITY_LINK_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "facilitylink.txt" |
| const std::string warptwin::CZML_FACILITY_NAME = "<<FACILITY_NAME>>" |
| const std::string warptwin::CZML_FACILITY_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "facility.txt" |
| const std::string warptwin::CZML_FILE_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "template.txt" |
| const std::string warptwin::CZML_GS_STRINGS = "<<GS_STRINGS>>" |
| const std::string warptwin::CZML_IS_CONNECTED = "<<IS_CONNECTED>>" |
| const std::string warptwin::CZML_LEAD_TIME = "<<LEAD_TIME>>" |
| const std::string warptwin::CZML_LINK_INTERVALS = "<<LINK_INTERVALS>>" |
| const std::string warptwin::CZML_LINK_STRINGS = "<<LINK_STRINGS>>" |
| const std::string warptwin::CZML_LINK_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "link.txt" |
| const std::string warptwin::CZML_MODEL_END = "<<MODEL_END>>" |
| const std::string warptwin::CZML_MODEL_FILE_NAME = "<<MODEL_FILE_NAME>>" |
| const std::string warptwin::CZML_MODEL_START = "<<MODEL_START>>" |
| const std::string warptwin::CZML_PRIMARY_SPACECRAFT_NAME = "<<PRIMARY_SPACECRAFT_NAME>>" |
| const std::string warptwin::CZML_SATELLITE_STRINGS = "<<SAT_STRINGS>>" |
| const std::string warptwin::CZML_SATELLITE_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "satellite.txt" |
| const std::string warptwin::CZML_SECONDARY_SPACECRAFT_NAME = "<<SECONDARY_SPACECRAFT_NAME>>" |
| const std::string warptwin::CZML_SPACECRAFT_ATTITUDE = "<<SPACECRAFT_ATTITUDE>>" |
| const std::string warptwin::CZML_SPACECRAFT_LINK_STRINGS = "<<SPACECRAFT_LINK_STRINGS>>" |
| const std::string warptwin::CZML_SPACECRAFT_LINK_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "spacecraftlink.txt" |
| const std::string warptwin::CZML_SPACECRAFT_NAME = "<<SPACECRAFT_NAME>>" |
| const std::string warptwin::CZML_SPACECRAFT_POSITION = "<<SPACECRAFT_POSITION>>" |
| const std::string warptwin::CZML_START_INTERVAL = "<<START_INTERVAL>>" |
| const std::string warptwin::CZML_TRAIL_TIME = "<<TRAIL_TIME>>" |
| const std::string warptwin::CZML_VISIBLE_INTERVALS = "<<VISIBLE_INTERVALS>>" |
| const int warptwin::DATASOCK_IO_BUFFER_SIZE = 1000 |
| const int warptwin::DAYS_BEFORE_MONTH[12] |
| const unsigned int warptwin::DEFAULT_MAX_MSG = 280 |
Define some standard messages for writing to file.
| const std::string warptwin::DEFAULT_SIMULATION_TIME = "2023 September 26, 12:00:00 MDT" |
This is the default simulation time.
| const std::string warptwin::DOC_REF_START = "xref:" |
|
protected |
| const int warptwin::ERROR_LICENSE = 300 |
| const std::map<int, double> warptwin::FACTORIAL_CACHE |
|
constexpr |
| const double warptwin::GPS_TO_J2000_ET_OFFSET = 630763200.0 |
This is the offset between the GPS and J2000 epochs for calculation of GPS time The GPS epoch is January 6, 1980.
| CartesianVector3 warptwin::grav_force__planet |
| const int warptwin::HASH_ADDER = 3 |
| const int warptwin::HASH_MULTIPLIER = 37 |
| const std::string warptwin::HEADER_ONE = "== " |
| const std::string warptwin::HEADER_TWO = "=== " |
| const std::string warptwin::IMAGE_START = "image::" |
| const std::vector<std::pair<connection_type_e, std::string> > warptwin::INPUT_CONN_TYPES |
Hold all connection type enum values to loop through.
| const std::string warptwin::KEY = "kodasandymoosebuddy" |
| const std::string warptwin::LINK_END = "++" |
| const std::string warptwin::LINK_START = "link:++" |
| clockwerk::DataIO<Body*> warptwin::lvlh = clockwerk::DataIO<Body*>(this, "lvlh", nullptr) |
| const int warptwin::MAX_HARMONIC_COEFFICIENTS = 12 |
| const int warptwin::MAX_ITER = 5 |
| const int warptwin::MAX_SIZE_CHAR = 0xFF |
| const int warptwin::MAX_SPICE_NAME_LENGTH = 33 |
| const std::map<std::string, int> warptwin::MONTH_MAP |
| const double warptwin::NEGATIVE_ELEVEN_OVER_SIX = -11.0/6.0 |
| const double warptwin::NEGATIVE_FIVE_OVER_SIX = -5.0/6.0 |
| const int warptwin::NMAX_SPHERICAL_HARMONICS = 18 |
| const int warptwin::NO_ERROR = 0 |
| const std::vector<std::string> warptwin::NODE_CATEGORIES |
| const double warptwin::NUM_0P00823 = 0.00823 |
| const double warptwin::NUM_0P177 = 0.177 |
| const double warptwin::NUM_1P339 = 1.339 |
| const double warptwin::NUM_2P678 = 2.678 |
| const unsigned int warptwin::NUM_CR3BP_STATES = 6 |
| const int warptwin::NUMBER_OF_READ_COEFFICIENTS = (MAX_HARMONIC_COEFFICIENTS*(MAX_HARMONIC_COEFFICIENTS+1))/2 + MAX_HARMONIC_COEFFICIENTS |
| const int warptwin::NUMBER_OF_SET_POINTS = 16 |
| const double warptwin::ON_STATE = 1e-15 |
| const double warptwin::ORBIT_DOUBLE_TOL = 1e-12 |
| MODEL (SimTableScheduleModel) public Params warptwin::params = Params(this, "params") |
Model of simulated table schedule for flight software emulation.
This model is a simulated version of the table scheduler for running flight software with appropriate timing in WarpTwin. It internally maintains a table schedule model, which it steps in sequence internally within every simulation step.
To schedule apps, the table schedule model should have its registerApp called (as with the real table scheduler).
| const double warptwin::PC_15_2 = 0.5*15.0 |
| const double warptwin::PC_35_2 = 0.5*35 |
| const double warptwin::PC_3_2 = 0.5*3.0 |
| double warptwin::precalc_j2 |
| double warptwin::precalc_j3 |
| const std::vector<double> warptwin::PREIMAGE_SET = {0.0, 1000.0, 2000.0, 3000.0, 4000.0, 5000.0, 6000.0, 7000.0, 8000.0, 9000.0, 10000.0, 20000.0, 30000.0, 40000.0, 50000.0, 100000.0} |
| double warptwin::r |
| const int warptwin::SHMEM_STRING_ALLOC_SIZE = 1000 |
Amount of space reserved for strings in shmem.
| const std::string warptwin::SOCKET_TEMPLATE = warptwinDir() + slash() + "data" + slash() + "czml" + slash() + "template_socket_update.txt" |
| const std::string warptwin::TABLE_HEADER_END = "*]\n" |
| const std::string warptwin::TABLE_HEADER_START = "[\%header,cols=" |
| const std::string warptwin::TABLE_LINE_START = "|" |
| const std::string warptwin::TABLE_MARKER = "|===\n" |
| const std::string warptwin::TITLE = "= " |
| const std::vector<double> warptwin::TURBULENCE_INTERPOLATE = { 10.0, 10.0, 4.0, 4.0} |
| const std::string warptwin::VISUALS_APP_ADDR = warptwinDir() + slash() + "CesiumViz" + slash() + "runVisualsApp.py" |
| const std::string warptwin::VISUALS_FILE_LOC_NAME = warptwinDir() + slash() + "CesiumViz" + slash() + "tmp-data" + slash() + "ms-visuals.czml" |
| const double warptwin::WMM_EARTH_RADIUS = 6371200.0 |