Module ImportFrom alias identifier ImportFrom alias identifier Import alias ImportFrom alias alias identifier alias identifier ImportFrom alias identifier ImportFrom alias identifier Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults kwarg body Expr Str Assign NameStore TupleLoad BinOpSub NameLoad Call NameLoad keyword Num BinOpAdd NameLoad Call NameLoad keyword Num Assign NameStore TupleLoad BinOpSub NameLoad Call NameLoad keyword Num BinOpAdd NameLoad Call NameLoad keyword Num If Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Str Call NameLoad AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Return NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num AugAssignAdd NameStore NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Str Call NameLoad AttributeLoad NameLoad attr Str Str Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str Str Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad attr Str handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return If UnaryOpNot NameLoad body Return NameLoad If CompareGt AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Str Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Str orelse Expr Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str ClassDef bases body Assign NameStore Str decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list
N/A datetime timedelta py_timedelta django.db models django_models N/A logging services.common simulation misc sn_misc slots sn_slots services.configuration.models segments segment_models services.simulation push simulation_push N/A 
   Copyright 2013, 2014 Ricardo Tubio-Pardavila

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 N/A __author__ rtubiopa@calpoly.edu N/A logger N/A N/A logging getLogger simulation PassManager N/A N/A django_models Manager N/A N/A Database manager
    Manager that contains the helper methods to handle the Pass objects within
    the database.
     N/A _simulator None __init__ N/A N/A self N/A N/A N/A Overriden constructor
        It sets upt the initial orbital simulator.
         N/A N/A self _simulator N/A N/A simulation OrbitalSimulator N/A N/A N/A N/A super PassManager self __init__ N/A create N/A N/A self spacecraft groundstation start end N/A kwargs N/A N/A Overriden method
        Overriden method that creates the provided pass slot in case a similar
        one does not exist.
        :param spacecraft: The spacecraft involved in the operational slot
        :param groundstation: The groundstation for the pass
        :param start: The start datetime object of the pass
        :param end: The end datetime object of the pass
        :param kwargs: Additional parameters
        :return: A reference to the just created object
         N/A s_range N/A N/A start N/A py_timedelta seconds 30 N/A start N/A py_timedelta seconds 30 N/A e_range N/A N/A end N/A py_timedelta seconds 30 N/A end N/A py_timedelta seconds 30 N/A N/A N/A N/A N/A self filter groundstation groundstation spacecraft spacecraft start__range s_range end__range e_range exists N/A N/A N/A N/A logger warn N/A N/A N/A N/A N/A N/A N/A @PassManager.create(), CONFLICTING SLOT:
 	 * slot already exists GS =  N/A str N/A groundstation identifier , start = < N/A N/A start isoformat >, end = < N/A N/A end isoformat > N/A None N/A N/A N/A N/A super PassManager self create spacecraft spacecraft groundstation groundstation start start end end kwargs N/A set_spacecraft N/A N/A self spacecraft N/A N/A N/A 
        Sets the Spacecraft for which the embeded simulator will calculate
        the OperationalSlot set.
        :param spacecraft: The Spacecraft object as read from the Spacecraft
        database.
         N/A N/A N/A N/A self _simulator set_spacecraft N/A spacecraft tle N/A _calculate_passes N/A N/A self spacecraft groundstation window N/A None N/A N/A Private method
        Calculates all the pass slots for the given spacecraft, groundstation
        pair during the simulation window returned by the simulator.
        :param spacecraft: The spacecraft object
        :param groundstation: The groundstation object
        :param window: Start, end tuple that define the simulation window
        :return: Array with the pass slots
         N/A all_slots N/A N/A N/A window N/A N/A window N/A N/A N/A simulation OrbitalSimulator get_simulation_window N/A N/A N/A slots N/A N/A N/A self _simulator calculate_pass_slot N/A window N/A 0 N/A window N/A 1 N/A s slots N/A N/A N/A N/A self create spacecraft spacecraft groundstation groundstation start N/A s N/A 0 end N/A s N/A 1 N/A all_slots slots N/A N/A N/A Exception N/A ex N/A N/A N/A N/A logger exception N/A N/A N/A N/A N/A N/A N/A N/A Error while creating pass slots, context =  sc.id =  N/A str N/A spacecraft identifier tle.id =  N/A str N/A N/A spacecraft tle identifier ex =  N/A str ex ex N/A all_slots N/A create_pass_slots_sc N/A N/A self spacecraft N/A N/A N/A Manager method
        Creates all the passes in the table for this spacecraft with all the
        registered GroundStations.
        :param spacecraft: Spacecraft object
         N/A all_slots N/A N/A N/A N/A self set_spacecraft spacecraft N/A groundstation N/A N/A N/A N/A segment_models GroundStation objects all N/A N/A N/A N/A N/A self _simulator set_groundstation groundstation N/A all_slots N/A N/A self _calculate_passes spacecraft groundstation N/A N/A N/A N/A simulation_push SimulationPush trigger_passes_updated_event N/A all_slots N/A create_pass_slots_gs N/A N/A self groundstation N/A N/A N/A Manager method
        Creates all the passes in the table for this groundstation with all the
        registered Spacecraft.
        :param groundstation: Groundstation object
         N/A all_slots N/A N/A N/A N/A N/A self _simulator set_groundstation groundstation N/A spacecraft N/A N/A N/A N/A segment_models Spacecraft objects all N/A N/A N/A N/A self set_spacecraft spacecraft N/A all_slots N/A N/A self _calculate_passes spacecraft groundstation N/A N/A N/A N/A simulation_push SimulationPush trigger_passes_updated_event N/A all_slots N/A is_duplicated N/A N/A self interval groundstation spacecraft N/A N/A N/A Manager method
        Checks whether the on-going propagation of the passes is a duplicated
        one in the sense that the system has reloaded within the propagation.
        This situation has to be avoided since the generated slot passes will
        be duplicated. This check is done in a pair sc/gs basis so that in case
        the slots where not propagated for this given pair, they do have to get
        propagated now.

        :param interval: Interval for the propagation of the slots
        :param groundstation: Groundstation object
        :param spacecraft: Spacecraft object
        :return: 'True' in case this interval has already been propagated.
         N/A last_pass None N/A N/A N/A last_pass N/A N/A N/A N/A self filter groundstation groundstation spacecraft spacecraft latest start N/A N/A N/A N/A PassSlots DoesNotExist N/A N/A N/A N/A logger info >>> No slots found, skipping N/A N/A N/A last_pass N/A N/A False N/A N/A N/A last_pass end N/A interval N/A 0 N/A N/A True N/A N/A False N/A propagate N/A N/A self interval N/A N/A N/A N/A simulation OrbitalSimulator get_update_window N/A N/A Manager method
        Propagates the pass slots for all the registered groundstation and
        spacecraft pairs.

        @param interval: interval for the propagation
         N/A all_slots N/A N/A N/A N/A logger info N/A >>> @passes.propagate.window =  N/A N/A sn_slots string interval N/A gs N/A N/A N/A N/A segment_models GroundStation objects all N/A N/A N/A N/A logger info N/A >>> @passes.propagate, gs =  N/A str N/A gs identifier N/A N/A N/A N/A self _simulator set_groundstation gs N/A sc N/A N/A N/A N/A segment_models Spacecraft objects all N/A N/A N/A N/A logger info N/A >>> @passes.propagate, sc =  N/A str N/A sc identifier N/A N/A N/A N/A self is_duplicated interval gs sc N/A N/A N/A N/A self set_spacecraft sc N/A all_slots N/A N/A self _calculate_passes sc gs interval N/A N/A N/A logger info N/A N/A sn_misc list_2_string all_slots name @passes.propagate.all_slots N/A N/A N/A N/A logger info >>> @passes.propagate, DUPLICATED N/A all_slots N/A N/A N/A N/A N/A simulation_push SimulationPush trigger_passes_updated_event N/A all_slots N/A remove_pass_slots_sc N/A N/A self spacecraft N/A N/A N/A Manager method
        Removes all the pass slots related to this spacecraft.
        :param spacecraft: Spacecraft object
         N/A N/A N/A N/A N/A self filter spacecraft spacecraft delete N/A N/A N/A N/A simulation_push SimulationPush trigger_passes_updated_event N/A remove_pass_slots_gs N/A N/A self groundstation N/A N/A N/A Manager method
        Removes all the pass slots related to this groundstation.
        :param groundstation: Groundstation object
         N/A N/A N/A N/A N/A self filter groundstation groundstation delete N/A N/A N/A N/A simulation_push SimulationPush trigger_passes_updated_event N/A N/A PassSlots N/A N/A django_models Model N/A N/A Database model
    Model that contains the passes in between the available Spacecraft and
    GroundStations.
     Meta N/A N/A N/A app_label simulation N/A N/A objects N/A PassManager N/A spacecraft N/A N/A django_models ForeignKey N/A segment_models Spacecraft verbose_name Spacecraft linked to this pass N/A groundstation N/A N/A django_models ForeignKey N/A segment_models GroundStation verbose_name GroundStation linked to this pass N/A start N/A N/A django_models DateTimeField Slot start N/A end N/A N/A django_models DateTimeField Slot end __str__ N/A N/A self N/A N/A N/A Unicode string
        :return: Unicode string
         N/A N/A N/A N/A >>> pass:  N/A str N/A self start ,  N/A str N/A self end N/A N/A