test_unitStripLocation
- test_unitStripLocation.test_AzElR_rates()[source]
Tests that the Az, El, range rates are correct by using 1-step Euler integration. Uses a stationary strip (start == end at Boulder, CO) to test rate computation, analogous to the groundLocation Az/El/R rate test.
- Returns:
- test_unitStripLocation.test_completedStripStops(pre_imaging_time, moving_planet)[source]
Check that a completed strip remains fixed on the planet with consistent state and access rates.
The spacecraft is fixed in the planet frame. The target must move before completion, then retain only the inertial velocity due to planet rotation and translation. The case without pre-imaging also samples the exact completion time.
- Parameters:
pre_imaging_time – [s] time added before reaching the nominal strip start
moving_planet – whether to use a tilted, rotating, translating planet
- test_unitStripLocation.test_movingStripCoordinateRates(start_lat_lon_deg, end_lat_lon_deg, moving_planet)[source]
Check moving-strip coordinate rates against central differences of published geometry.
Samples are taken inside the strip, away from the endpoint and SEZ singularities. The oblique and meridional cases exercise changes in latitude as well as longitude.
- Parameters:
start_lat_lon_deg – [deg] strip start latitude and longitude
end_lat_lon_deg – [deg] strip end latitude and longitude
moving_planet – whether to use a tilted, rotating, translating planet and a moving spacecraft
- test_unitStripLocation.test_new_start_pre_imaging(show_plots)[source]
Tests that
newpstart()correctly extends the strip backward so that the target reaches the original start point after exactlypreImagingTimeseconds of travel:Verifies that at t=0 the target position equals the extended (new) start point, which sits
preImagingTime * speedarc-length behind the original start along the great circle.Verifies that at t=preImagingTime the target arrives at the original start point (lat=0, lon=0).
Verifies that at the end of the updated traversal the target reaches the original end point (lat=0, lon=90°).
- Returns:
- test_unitStripLocation.test_nonzeroRelativeVelocityOutput()[source]
Tests that the published SEZ relative velocity is populated and consistent with the range rate for a stationary planet, a stationary strip at zero latitude and longitude, and a moving spacecraft.
- Returns:
- test_unitStripLocation.test_planetFixedSpacecraftZeroRates(tilt_deg)[source]
Tests that a spacecraft fixed in the planet frame has zero range, azimuth and elevation rates when observing a stationary strip, with the planet spin axis tilted away from the inertial 3-axis.
- Parameters:
tilt_deg – [deg] angle between the planet spin axis and the inertial 3-axis
- Returns:
- test_unitStripLocation.test_pre_imaging_blocks_access(show_plots)[source]
Tests that access is blocked during the pre-imaging phase:
A strip target with preImagingTime > 0 should deny access during the initial pre-imaging period, even if the spacecraft is geometrically visible.
After the pre-imaging time has elapsed, access should be granted if the elevation/range criteria are met.
- Returns:
- test_unitStripLocation.test_range_degenerate_strip(show_plots)[source]
Tests stripLocation with a degenerate strip (start == end):
Computes range correctly by evaluating slantRange;
Tests whether elevation is correctly evaluated;
Tests whether range limits impact access;
Tests whether multiple spacecraft are supported in parallel.
Checks that unmodeled illumination and glare outputs remain zero for every spacecraft at every recorded time step.
This is the stripLocation equivalent of the groundLocation test_range test, verifying that a strip with identical start and end points behaves like a single ground location.
- Returns:
- test_unitStripLocation.test_rotation_degenerate_strip(show_plots)[source]
Tests whether stripLocation correctly accounts for planet rotation:
Computes the current strip location based on the initial position and the rotation state of the planet it is attached to.
A strip at (0, 10deg) with the planet rotated by -10deg around z should appear at (0, 0) in inertial space, directly beneath a spacecraft on the x-axis.
- Returns:
- test_unitStripLocation.test_strip_target_motion(show_plots)[source]
Tests that the strip target position moves along the great-circle arc from start to end as time progresses (No pre-imaging is considered in this test):
Verifies that the target position at the midpoint of the traversal matches the expected SLERP interpolation on the sphere.
Verifies that the target starts at the start point and finishes at the end point.
Verifies that a spacecraft placed above the midpoint sees ~90deg elevation when the target arrives there.
- Returns:
- test_unitStripLocation.test_strip_velocity_output(show_plots)[source]
Tests that the strip state output message correctly reports the velocity of the moving target along the strip:
For a non-degenerate strip, velocity magnitude should equal the acquisition speed.
The velocity vector should be perpendicular to the position vector (tangent to the sphere).
The velocity vector should lie in the great-circle plane defined by the strip start and end points (i.e. perpendicular to the orbit normal).
The velocity vector should be oriented in the direction of motion (from start toward end), verified by checking that r x v is parallel to the orbit normal.
- Returns: