The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/math: Improve word choice/clarity

+36 -36
+1 -1
src/xrt/auxiliary/math/m_documentation.hpp
··· 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file 5 - * @brief Header with just documentation. 5 + * @brief Header with only documentation. 6 6 * @author Ryan Pavlik <ryan.pavlik@collabora.com> 7 7 * @ingroup aux_math 8 8 */
+1 -1
src/xrt/auxiliary/math/m_filter_fifo.c
··· 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file 5 - * @brief A fifo that also allows you to dynamically filter. 5 + * @brief A fifo that also lets you dynamically filter. 6 6 * @author Jakob Bornecrantz <jakob@collabora.com> 7 7 * @ingroup aux_math 8 8 */
+2 -3
src/xrt/auxiliary/math/m_filter_fifo.h
··· 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file 5 - * @brief A fifo that also allows you to dynamically filter. 5 + * @brief A fifo that also lets you dynamically filter. 6 6 * @author Jakob Bornecrantz <jakob@collabora.com> 7 7 * @ingroup aux_math 8 8 */ ··· 94 94 m_ff_f64_push(struct m_ff_f64 *ff, const double *sample, uint64_t timestamp_ns); 95 95 96 96 /*! 97 - * Return the sample at the index, zero means the last sample push, one second 98 - * last and so on. 97 + * Return the sample at the index, 0 means the last sample push, 1 second-to-last, etc. 99 98 */ 100 99 bool 101 100 m_ff_f64_get(struct m_ff_f64 *ff, size_t num, double *out_sample, uint64_t *out_timestamp_ns);
+2 -1
src/xrt/auxiliary/math/m_filter_one_euro.c
··· 197 197 { 198 198 199 199 if (filter_one_euro_handle_first_sample(&f->base, ts, false)) { 200 - // First sample - no filtering yet - and we're not committing anything to the filter so just return 200 + // First sample - no filtering yet - and we're not committing anything to the filter so return right 201 + // away 201 202 *out_y = *in_y; 202 203 return; 203 204 }
+1 -1
src/xrt/auxiliary/math/m_imu_pre.h
··· 56 56 }; 57 57 58 58 /*! 59 - * A simple init function that just takes the two ticks_to_float values, all 59 + * A simple init function that takes the two ticks_to_float values, all 60 60 * other values are set to identity. 61 61 */ 62 62 void
+3 -3
src/xrt/auxiliary/math/m_lowpass_float.h
··· 51 51 m_lowpass_float_add_sample(struct m_lowpass_float *mlf, float sample, timepoint_ns timestamp_ns); 52 52 53 53 /*! 54 - * Access the filtered value. 54 + * Get the filtered value. 55 55 * 56 56 * Probably 0 or other meaningless value if it's not initialized: see @ref m_lowpass_float_is_initialized 57 57 * ··· 63 63 m_lowpass_float_get_state(const struct m_lowpass_float *mlf); 64 64 65 65 /*! 66 - * Access the time of last update 66 + * Get the time of last update 67 67 * 68 68 * @param mlf self-pointer 69 69 * ··· 73 73 m_lowpass_float_get_timestamp_ns(const struct m_lowpass_float *mlf); 74 74 75 75 /*! 76 - * Access whether we have initialized state. 76 + * Get whether we have initialized state. 77 77 * 78 78 * @param mlf self-pointer 79 79 *
+6 -6
src/xrt/auxiliary/math/m_lowpass_float.hpp
··· 45 45 * blocked. 46 46 * 47 47 * @param val The value to initialize the filter with. Does not 48 - * affect the filter itself: only seen if you access state 48 + * affect the filter itself: only seen if you get state 49 49 * before initializing the filter with the first sample. 50 50 */ 51 51 explicit LowPassIIR(Scalar cutoff_hz, Value const &val) noexcept ··· 53 53 {} 54 54 55 55 /*! 56 - * Reset the filter to just-created state. 56 + * Reset the filter to newly-created state. 57 57 */ 58 58 void 59 59 reset(Value const &val) noexcept ··· 122 122 123 123 124 124 /*! 125 - * Reset the filter to just-created state. 125 + * Reset the filter to newly-created state. 126 126 */ 127 127 void 128 128 reset() noexcept ··· 146 146 } 147 147 148 148 /*! 149 - * Access the filtered value. 149 + * Get the filtered value. 150 150 */ 151 151 Scalar 152 152 getState() const noexcept ··· 155 155 } 156 156 157 157 /*! 158 - * Access the time of last update. 158 + * Get the time of last update. 159 159 */ 160 160 timepoint_ns 161 161 getTimestampNs() const noexcept ··· 164 164 } 165 165 166 166 /*! 167 - * Access whether we have initialized state. 167 + * Get whether we have initialized state. 168 168 */ 169 169 bool 170 170 isInitialized() const noexcept
+4 -4
src/xrt/auxiliary/math/m_lowpass_float_vector.hpp
··· 44 44 45 45 46 46 /*! 47 - * Reset the filter to just-created state. 47 + * Reset the filter to newly-created state. 48 48 */ 49 49 void 50 50 reset() noexcept ··· 68 68 } 69 69 70 70 /*! 71 - * Access the filtered value. 71 + * Get the filtered value. 72 72 */ 73 73 Vector const & 74 74 getState() const noexcept ··· 77 77 } 78 78 79 79 /*! 80 - * Access the time of last update. 80 + * Get the time of last update. 81 81 */ 82 82 std::uint64_t 83 83 getTimestampNs() const noexcept ··· 86 86 } 87 87 88 88 /*! 89 - * Access whether we have initialized state. 89 + * Get whether we have initialized state. 90 90 */ 91 91 bool 92 92 isInitialized() const noexcept
+2 -2
src/xrt/auxiliary/math/m_lowpass_integer.h
··· 53 53 m_lowpass_integer_add_sample(struct m_lowpass_integer *mli, int64_t sample); 54 54 55 55 /*! 56 - * Access the filtered value. 56 + * Get the filtered value. 57 57 * 58 58 * Probably 0 or other meaningless value if it's not initialized: see @ref m_lowpass_integer_is_initialized 59 59 * ··· 65 65 m_lowpass_integer_get_state(const struct m_lowpass_integer *mli); 66 66 67 67 /*! 68 - * Access whether we have initialized state. 68 + * Get whether we have initialized state. 69 69 * 70 70 * @param mli self-pointer 71 71 *
+6 -6
src/xrt/auxiliary/math/m_lowpass_integer.hpp
··· 44 44 * more influence from new input. @p alpha_.isBetweenZeroAndOne() must be true. 45 45 * 46 46 * @param val The value to initialize the filter with. Does not 47 - * affect the filter itself: only seen if you access state 47 + * affect the filter itself: only seen if you get the state 48 48 * before initializing the filter with the first sample. 49 49 */ 50 50 explicit IntegerLowPassIIR(math::Rational<Scalar> alpha_, Value const &val) ··· 56 56 } 57 57 58 58 /*! 59 - * Reset the filter to just-created state. 59 + * Reset the filter to newly-created state. 60 60 */ 61 61 void 62 62 reset(Value const &val) noexcept ··· 100 100 101 101 /*! 102 102 * A very simple integer low-pass filter, using a "one-pole infinite impulse response" 103 - * design (one-pole IIR), aka exponential filter. 103 + * design (one-pole IIR), also known as an exponential filter. 104 104 * 105 105 * Configurable in scalar type. 106 106 */ ··· 121 121 } 122 122 123 123 /*! 124 - * Reset the filter to just-created state. 124 + * Reset the filter to newly-created state. 125 125 */ 126 126 void 127 127 reset() noexcept ··· 144 144 } 145 145 146 146 /*! 147 - * Access the filtered value. 147 + * Get the filtered value. 148 148 */ 149 149 Scalar 150 150 getState() const noexcept ··· 154 154 155 155 156 156 /*! 157 - * Access whether we have initialized state. 157 + * Get whether we have initialized state. 158 158 */ 159 159 bool 160 160 isInitialized() const noexcept
+2 -2
src/xrt/auxiliary/math/m_quatexpmap.cpp
··· 88 88 return ret.normalized(); 89 89 } 90 90 91 - /// Taylor series expansion of theta over sin(theta), aka cosecant, for 91 + /// Taylor series expansion of theta over sin(theta), also known as cosecant, for 92 92 /// use near 0 when you want continuity and validity at 0. 93 93 template <typename Scalar> 94 94 inline Scalar ··· 112 112 { 113 113 // ln q = ( (phi)/(norm of vec) vec, ln(norm of quat)) 114 114 // When we assume a unit quaternion, ln(norm of quat) = 0 115 - // so then we just scale the vector part by phi/sin(phi) to get the 115 + // so then we scale the vector part by phi/sin(phi) to get the 116 116 // result (i.e., ln(qv, qw) = (phi/sin(phi)) * qv ) 117 117 Scalar vecnorm = quat.vec().norm(); 118 118
+4 -4
src/xrt/auxiliary/math/m_relation_history.cpp
··· 68 68 // if we aren't empty, we can compare against the latest timestamp. 69 69 if (rh->impl.empty() || rhe.timestamp > rh->impl.back().timestamp) { 70 70 // Everything explodes if the timestamps in relation_history aren't monotonically increasing. If 71 - // we get a timestamp that's before the most recent timestamp in the buffer, just don't put it 71 + // we get a timestamp that's before the most recent timestamp in the buffer, don't put it 72 72 // in the history. 73 73 rh->impl.push_back(rhe); 74 74 ret = true; ··· 103 103 if (it == e) { 104 104 // lower bound is at the end: 105 105 // The desired timestamp is after what our buffer contains. 106 - // Aka pose-prediction. 106 + // (pose-prediction) 107 107 int64_t diff_prediction_ns = static_cast<int64_t>(at_timestamp_ns) - rh->impl.back().timestamp; 108 108 double delta_s = time_ns_to_s(diff_prediction_ns); 109 109 ··· 121 121 if (it == b) { 122 122 // lower bound is at the beginning (and it's not an exact match): 123 123 // The desired timestamp is before what our buffer contains. 124 - // Aka a weird edge case where somebody asks for a really old pose and we do our best. 124 + // (an edge case where somebody asks for a really old pose and we do our best) 125 125 int64_t diff_prediction_ns = static_cast<int64_t>(at_timestamp_ns) - rh->impl.front().timestamp; 126 126 double delta_s = time_ns_to_s(diff_prediction_ns); 127 127 U_LOG_T("Extrapolating %f s before the front of the buffer!", delta_s); ··· 145 145 xrt_space_relation result{}; 146 146 result.relation_flags = (enum xrt_space_relation_flags)(predecessor.relation.relation_flags & 147 147 successor.relation.relation_flags); 148 - // First-order implementation - just lerp between the before and after 148 + // First-order implementation - lerp between the before and after 149 149 if (0 != (result.relation_flags & XRT_SPACE_RELATION_POSITION_VALID_BIT)) { 150 150 result.pose.position = m_vec3_lerp(predecessor.relation.pose.position, 151 151 successor.relation.pose.position, amount_to_lerp);
+2 -2
src/xrt/auxiliary/math/m_space.cpp
··· 251 251 */ 252 252 253 253 int new_flags = 0; 254 - // Make sure to not drop a orientation, even if just one is valid. 254 + // Make sure to not drop a orientation, even if only one is valid. 255 255 if (af.has_orientation || bf.has_orientation) { 256 256 new_flags |= XRT_SPACE_RELATION_ORIENTATION_VALID_BIT; 257 257 } 258 258 259 259 /* 260 - * Make sure to not drop a position, even if just one is valid. 260 + * Make sure to not drop a position, even if only one is valid. 261 261 * 262 262 * When position is valid, always set orientation valid to "upgrade" 263 263 * poses with valid position but invalid orientation to fully valid