Skip to content

Instantly share code, notes, and snippets.

@jkibele
Created August 31, 2021 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkibele/1adba3216f20fdc83fc824e9d5f45fdc to your computer and use it in GitHub Desktop.
Save jkibele/1adba3216f20fdc83fc824e9d5f45fdc to your computer and use it in GitHub Desktop.
Interview Question
dataset_id = '202106300800-LS20' # type: str
def do_ground_placement(dataset_id: str) -> dict[int, GroundPlacement]
gps_data = get_gps_data_for_dataset_id(dataset_id) # type: List[dict]
ground_placement = {} # type: Dict[int, GroundPlacement]
for d in gps_data:
instrument = get_instrument_for_dataset_id(dataset_id) # type: Instrument
elevation = get_elevation_for_lat_lon(d['latitude'], d['longitude']) # type: float
ground_placement[d['timestamp']] = get_ground_placement(
instrument.field_of_view, # type: int
elevation,
d
)
return ground_placement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment