#NEWLINE# def test_calculate_groundtrack( self ) : #NEWLINE# #INDENT# 'UNIT test: services.common.simualtion.calculate_groundtrack\n        Simple and easy test that calculates the groundtrack for a given\n        satellite and that validates that calculation by asserting the number\n        of expected points for that groundtrack.\n        ' #NEWLINE# if self . __verbose_testing : #NEWLINE# #INDENT# print ( '>>> test_calculate_groundtrack:' ) #NEWLINE# #UNINDENT# step = timedelta ( minutes = 1 ) #NEWLINE# interval = self . __simulator . get_simulation_window ( ) #NEWLINE# groundtrack = self . __simulator . calculate_groundtrack ( tle_models . TwoLineElement . objects . get ( identifier = self . __sc_1_tle_id ) , interval = groundtrack , timestep = step ) #NEWLINE# if self . __verbose_testing : #NEWLINE# #INDENT# for p in groundtrack : #NEWLINE# #INDENT# print ( ( ( ( ( ( ( '>> @' + str ( p [ 'timestamp' ] ) ) + ', (' ) + str ( p [ 'latitude' ] ) ) + ',' ) + str ( p [ 'longitude' ] ) ) + ')' ) ) #NEWLINE# #UNINDENT# #UNINDENT# e_n_points = int ( math . ceil ( ( ( interval [ 1 ] - interval [ 0 ] ) . total_seconds ( ) / step . total_seconds ( ) ) ) ) #NEWLINE# self . assertEqual ( e_n_points , len ( groundtrack ) , ( ( ( 'Number of points differs! e = ' + str ( e_n_points ) ) + ', a = ' ) + str ( len ( groundtrack ) ) ) )