Skip to content
Snippets Groups Projects
Commit ecacb0ad authored by Taya Snijder's avatar Taya Snijder
Browse files

processed review issues

parent 5b4db729
No related branches found
No related tags found
1 merge request!229Resolve L2SS-554 "Delay pointing unit tests"
......@@ -18,6 +18,8 @@ class TestAttributeTypes(base.TestCase):
reference_itrf = [3826577.066, 461022.948, 5064892.786] # CS002LBA, in ITRF2005 epoch 2012.5
d = delay_calculator(reference_itrf)
self.assertIsNotNone(d)
def test_set_measure_time(self):
# # create a frame tied to the reference position
reference_itrf = [3826577.066, 461022.948, 5064892.786] # CS002LBA, in ITRF2005 epoch 2012.5
......@@ -27,16 +29,13 @@ class TestAttributeTypes(base.TestCase):
timestamp = datetime.datetime(2000, 1, 1, 0, 0, 5)
d.set_measure_time(timestamp)
self.assertIsNotNone(d)
def test_sun(self):
# # create a frame tied to the reference position
reference_itrf = [3826577.066, 461022.948, 5064892.786] # CS002LBA, in ITRF2005 epoch 2012.5
d = delay_calculator(reference_itrf)
# set the antenna position identical to the reference position
speed_of_light = 299792458.0
antenna_itrf = [[reference_itrf[0], reference_itrf[1], reference_itrf[2]]] # CS001LBA, in ITRF2005 epoch 2012.5
for i in range(24):
# # set the timestamp to solve for
timestamp = datetime.datetime(2022, 1, 27, i, 28, 0) # 9:28 sunrise this particular day
......@@ -51,8 +50,6 @@ class TestAttributeTypes(base.TestCase):
pointing = d.measure.direction(*direction)
dir = d.get_direction_vector(pointing)
print(f"time: {i:2}:28,\tdirection: {dir}")
self.assertTrue(0.98 <= sqrt(pow(dir[0],2) + pow(dir[1],2) + pow(dir[2],2)) <= 1.02)
def test_identical_location(self):
......@@ -98,7 +95,6 @@ class TestAttributeTypes(base.TestCase):
# calculate the delays based on the set reference position, the set time and now the set direction and antenna positions.
delays = d.convert(direction, antenna_itrf)
print("One second delay: ", delays)
self.assertTrue(0.98 <= delays[0] <= 1.02)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment