openstb.simulator.target.points
Classes:
| Name | Description |
|---|---|
PointLine |
A regularly spaced line of points. |
RandomPointRect |
A set of points uniformly distributed within a rectangle. |
RandomPointTriangle |
A set of point targets uniformly distributed within a triangle. |
SinglePoint |
A single point target. |
PointLine
PointLine(num_points, reflectivity, start_position, end_position=None, spacing=None)
Bases: PointTargets
A regularly spaced line of points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_points
|
int
|
The number of points in the line. |
required |
reflectivity
|
float
|
The reflectivity of the targets (the fraction of incident energy that will scatter back to the receiver). |
required |
start_position
|
ArrayLike
|
The position of the first point in the line. |
required |
end_position
|
ArrayLike | None
|
The position of the last point in the line. Cannot be given if |
None
|
spacing
|
ArrayLike | None
|
The spacing between neighbouring points in the line. Cannot be given if
|
None
|
Source code in openstb/simulator/target/points.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
RandomPointRect
RandomPointRect(seed, Dx, Dy, centre, normal, point_density, reflectivity)
Bases: PointTargets
A set of points uniformly distributed within a rectangle.
The points are placed uniformly at a given density within a rectangle of a set size in the x-y plane, and are then translated and rotated to the desired position and orientation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
positive int
|
Seed for the random number generator. |
required |
Dx
|
float
|
Size (in metres) of the rectangle in the x-y plane prior to transformation. |
required |
Dy
|
float
|
Size (in metres) of the rectangle in the x-y plane prior to transformation. |
required |
centre
|
array - like
|
A 3-element vector giving the centre of the final rectangle in global coordinates. |
required |
normal
|
array - like
|
A 3-element vector giving the normal of the final rectangle. Remember that the z axis points down, so an upwards-facing rectangle would have a normal with a negative z value. The vector does not need to have unit length, but cannot have zero length. |
required |
point_density
|
float
|
The density of the points in points per square metre. |
required |
reflectivity
|
(float, {omnidirectional, hemispherical})
|
The reflectivity of the point targets. This is a amplitude scaling factor applied to the incident pulse to get the scattered pulse. The special values "omnidirectional" and "hemispherical" model omnidirectional (uniform scattering over the sphere) and hemispherical (uniform scattering over the hemisphere facing the sonar) scattering and correspond to 1/4pi and 1/2pi respectively. |
required |
Source code in openstb/simulator/target/points.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
RandomPointTriangle
RandomPointTriangle(seed, p1, p2, p3, point_density, reflectivity)
Bases: PointTargets
A set of point targets uniformly distributed within a triangle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
int
|
The seed for the random number generator which places the point targets. |
required |
p1
|
ArrayLike
|
The position of the first corner of the triangle. |
required |
p2
|
ArrayLike
|
The position of the second corner of the triangle. |
required |
p3
|
ArrayLike
|
The position of the third corner of the triangle. |
required |
point_density
|
float
|
The density of the point targets in targets per square metre. |
required |
reflectivity
|
float | Literal['omnidirectional', 'hemispherical']
|
The reflectivity of the point targets. This is a amplitude scaling factor applied to the incident pulse to get the scattered pulse. The special values "omnidirectional" and "hemispherical" model omnidirectional (uniform scattering over the sphere) and hemispherical (uniform scattering over the hemisphere facing the sonar) scattering and correspond to 1/4pi and 1/2pi respectively. |
required |
Source code in openstb/simulator/target/points.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
SinglePoint
SinglePoint(position, reflectivity)
Bases: PointTargets
A single point target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
position
|
array - like
|
The position of the point target in global coordinates. |
required |
reflectivity
|
float
|
The reflectivity of the target (the fraction of incident energy that will scatter back to the receiver). |
required |
Source code in openstb/simulator/target/points.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |