mirror of
https://github.com/OSURoboticsClub/Rover_2017_2018.git
synced 2025-11-08 18:21:15 +00:00
9
.gitignore
vendored
9
.gitignore
vendored
@@ -86,4 +86,11 @@ ENV/
|
|||||||
.spyderproject
|
.spyderproject
|
||||||
|
|
||||||
# Rope project settings
|
# Rope project settings
|
||||||
.ropeproject
|
.ropeproject
|
||||||
|
|
||||||
|
# Google API Key
|
||||||
|
ground_station/resources/core/key
|
||||||
|
|
||||||
|
# Map Images
|
||||||
|
*.jpg
|
||||||
|
*.png
|
||||||
|
|||||||
527
ground_station/.idea/workspace.xml
generated
527
ground_station/.idea/workspace.xml
generated
@@ -1,527 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="a54e79f5-3dba-4e0c-9a8b-f98d636e1a48" name="Default" comment="" />
|
|
||||||
<ignored path=".idea/dataSources.local.xml" />
|
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
|
||||||
<option name="TRACKING_ENABLED" value="true" />
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="CoverageDataManager">
|
|
||||||
<SUITE FILE_PATH="coverage/ground_station$Remote_Launch.coverage" NAME="Remote Launch Coverage Results" MODIFIED="1510962565098" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$USER_HOME$/Github/Rover_2017_2018/ground_station" />
|
|
||||||
</component>
|
|
||||||
<component name="CreatePatchCommitExecutor">
|
|
||||||
<option name="PATCH_PATH" value="" />
|
|
||||||
</component>
|
|
||||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
|
||||||
<component name="FavoritesManager">
|
|
||||||
<favorites_list name="ground_station" />
|
|
||||||
</component>
|
|
||||||
<component name="FileEditorManager">
|
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300" />
|
|
||||||
</component>
|
|
||||||
<component name="FileTemplateManagerImpl">
|
|
||||||
<option name="RECENT_TEMPLATES">
|
|
||||||
<list>
|
|
||||||
<option value="Python Script" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="IdeDocumentHistory">
|
|
||||||
<option name="CHANGED_PATHS">
|
|
||||||
<list>
|
|
||||||
<option value="$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/LoggingSystems/Logger.py" />
|
|
||||||
<option value="$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/StartupSystems/ROSMasterChecker.py" />
|
|
||||||
<option value="$USER_HOME$/Github/Rover_2017_2018/ground_station/RoverGroundStation.py" />
|
|
||||||
<option value="$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoReceiver.py" />
|
|
||||||
<option value="$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoCoordinator.py" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
|
||||||
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
|
||||||
<component name="JsGulpfileManager">
|
|
||||||
<detection-done>true</detection-done>
|
|
||||||
<sorting>DEFINITION_ORDER</sorting>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectFrameBounds">
|
|
||||||
<option name="y" value="16" />
|
|
||||||
<option name="width" value="1920" />
|
|
||||||
<option name="height" value="1044" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
|
||||||
<OptionsSetting value="true" id="Add" />
|
|
||||||
<OptionsSetting value="true" id="Remove" />
|
|
||||||
<OptionsSetting value="true" id="Checkout" />
|
|
||||||
<OptionsSetting value="true" id="Update" />
|
|
||||||
<OptionsSetting value="true" id="Status" />
|
|
||||||
<OptionsSetting value="true" id="Edit" />
|
|
||||||
<ConfirmationsSetting value="0" id="Add" />
|
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectView">
|
|
||||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
|
||||||
<flattenPackages />
|
|
||||||
<showMembers />
|
|
||||||
<showModules />
|
|
||||||
<showLibraryContents />
|
|
||||||
<hideEmptyPackages />
|
|
||||||
<abbreviatePackageNames />
|
|
||||||
<autoscrollToSource />
|
|
||||||
<autoscrollFromSource />
|
|
||||||
<sortByType />
|
|
||||||
<manualOrder />
|
|
||||||
<foldersAlwaysOnTop value="true" />
|
|
||||||
</navigator>
|
|
||||||
<panes>
|
|
||||||
<pane id="ProjectPane">
|
|
||||||
<subPane />
|
|
||||||
</pane>
|
|
||||||
<pane id="Scope" />
|
|
||||||
<pane id="Scratches" />
|
|
||||||
</panes>
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent">
|
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
||||||
<property name="js.eslint.eslintPackage" value="" />
|
|
||||||
<property name="last_opened_file_path" value="$USER_HOME$/Github/Rover_2017_2018/software/ground_station" />
|
|
||||||
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
|
|
||||||
<property name="settings.editor.splitter.proportion" value="0.2" />
|
|
||||||
</component>
|
|
||||||
<component name="RunManager">
|
|
||||||
<configuration default="true" type="DjangoTestsConfigurationType" factoryName="Django tests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="TARGET" value="" />
|
|
||||||
<option name="SETTINGS_FILE" value="" />
|
|
||||||
<option name="CUSTOM_SETTINGS" value="false" />
|
|
||||||
<option name="USE_OPTIONS" value="false" />
|
|
||||||
<option name="OPTIONS" value="" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="PyBehaveRunConfigurationType" factoryName="Behave">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="ADDITIONAL_ARGS" value="" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="PyLettuceRunConfigurationType" factoryName="Lettuce">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="ADDITIONAL_ARGS" value="" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="PARAMETERS" value="" />
|
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="Tox" factoryName="Tox">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
|
||||||
<node-interpreter>project</node-interpreter>
|
|
||||||
<node-options />
|
|
||||||
<gulpfile />
|
|
||||||
<tasks />
|
|
||||||
<arguments />
|
|
||||||
<envs />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
|
|
||||||
<command value="run-script" />
|
|
||||||
<scripts />
|
|
||||||
<node-interpreter value="project" />
|
|
||||||
<envs />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="Attests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="CLASS_NAME" value="" />
|
|
||||||
<option name="METHOD_NAME" value="" />
|
|
||||||
<option name="FOLDER_NAME" value="" />
|
|
||||||
<option name="TEST_TYPE" value="TEST_SCRIPT" />
|
|
||||||
<option name="PATTERN" value="" />
|
|
||||||
<option name="USE_PATTERN" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="Doctests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="CLASS_NAME" value="" />
|
|
||||||
<option name="METHOD_NAME" value="" />
|
|
||||||
<option name="FOLDER_NAME" value="" />
|
|
||||||
<option name="TEST_TYPE" value="TEST_SCRIPT" />
|
|
||||||
<option name="PATTERN" value="" />
|
|
||||||
<option name="USE_PATTERN" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="Nosetests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="CLASS_NAME" value="" />
|
|
||||||
<option name="METHOD_NAME" value="" />
|
|
||||||
<option name="FOLDER_NAME" value="" />
|
|
||||||
<option name="TEST_TYPE" value="TEST_SCRIPT" />
|
|
||||||
<option name="PATTERN" value="" />
|
|
||||||
<option name="USE_PATTERN" value="false" />
|
|
||||||
<option name="PARAMS" value="" />
|
|
||||||
<option name="USE_PARAM" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="Unittests">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="CLASS_NAME" value="" />
|
|
||||||
<option name="METHOD_NAME" value="" />
|
|
||||||
<option name="FOLDER_NAME" value="" />
|
|
||||||
<option name="TEST_TYPE" value="TEST_SCRIPT" />
|
|
||||||
<option name="PATTERN" value="" />
|
|
||||||
<option name="USE_PATTERN" value="false" />
|
|
||||||
<option name="PUREUNITTEST" value="true" />
|
|
||||||
<option name="PARAMS" value="" />
|
|
||||||
<option name="USE_PARAM" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="tests" factoryName="py.test">
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<module name="ground_station" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="" />
|
|
||||||
<option name="CLASS_NAME" value="" />
|
|
||||||
<option name="METHOD_NAME" value="" />
|
|
||||||
<option name="FOLDER_NAME" value="" />
|
|
||||||
<option name="TEST_TYPE" value="TEST_SCRIPT" />
|
|
||||||
<option name="PATTERN" value="" />
|
|
||||||
<option name="USE_PATTERN" value="false" />
|
|
||||||
<option name="testToRun" value="" />
|
|
||||||
<option name="keywords" value="" />
|
|
||||||
<option name="params" value="" />
|
|
||||||
<option name="USE_PARAM" value="false" />
|
|
||||||
<option name="USE_KEYWORD" value="false" />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
<component name="ShelveChangesManager" show_recycled="false">
|
|
||||||
<option name="remove_strategy" value="false" />
|
|
||||||
</component>
|
|
||||||
<component name="SvnConfiguration">
|
|
||||||
<configuration />
|
|
||||||
</component>
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="a54e79f5-3dba-4e0c-9a8b-f98d636e1a48" name="Default" comment="" />
|
|
||||||
<created>1510962234686</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1510962234686</updated>
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="ToolWindowManager">
|
|
||||||
<frame x="0" y="16" width="1920" height="1044" extended-state="6" />
|
|
||||||
<editor active="false" />
|
|
||||||
<layout>
|
|
||||||
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.134375" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
||||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32916668" sideWeight="0.50192416" order="7" side_tool="true" content_ui="tabs" />
|
|
||||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22399151" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32908705" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.18259023" sideWeight="0.49807587" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
|
||||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960325" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
|
||||||
<window_info id="Find" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32908705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
</layout>
|
|
||||||
<layout-to-restore>
|
|
||||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32916668" sideWeight="0.50192416" order="7" side_tool="true" content_ui="tabs" />
|
|
||||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32916668" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960325" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18259023" sideWeight="0.49807587" order="11" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.13468939" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
||||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
|
||||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
|
||||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
</layout-to-restore>
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="processedProjectFiles" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="Vcs.Log.UiProperties">
|
|
||||||
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
|
||||||
<collection />
|
|
||||||
</option>
|
|
||||||
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
|
||||||
<collection />
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsContentAnnotationSettings">
|
|
||||||
<option name="myLimit" value="2678400000" />
|
|
||||||
</component>
|
|
||||||
<component name="XDebuggerManager">
|
|
||||||
<breakpoint-manager>
|
|
||||||
<option name="time" value="1" />
|
|
||||||
</breakpoint-manager>
|
|
||||||
<watches-manager />
|
|
||||||
</component>
|
|
||||||
<component name="editorHistoryManager">
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/LoggingSystems/Logger.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="288">
|
|
||||||
<caret line="21" column="37" selection-start-line="21" selection-start-column="23" selection-end-line="21" selection-end-column="37" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoCoordinator.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="162">
|
|
||||||
<caret line="15" column="9" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="31" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/RoverGroundStation.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="2826">
|
|
||||||
<caret line="167" column="43" selection-start-line="167" selection-start-column="43" selection-end-line="167" selection-end-column="43" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoReceiverOld.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1134">
|
|
||||||
<caret line="74" column="18" selection-start-line="74" selection-start-column="16" selection-end-line="74" selection-end-column="142" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/LoggingSystems/Logger.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="378">
|
|
||||||
<caret line="21" column="37" selection-start-line="21" selection-start-column="23" selection-end-line="21" selection-end-column="37" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoCoordinator.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="72">
|
|
||||||
<caret line="4" column="25" selection-start-line="4" selection-start-column="25" selection-end-line="4" selection-end-column="25" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/RoverGroundStation.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoReceiverOld.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1134">
|
|
||||||
<caret line="74" column="18" selection-start-line="74" selection-start-column="16" selection-end-line="74" selection-end-column="142" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/RoverGroundStation.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/RoverGroundStation.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/.PyCharm2016.3/system/remote_sources/-1418177152/1376253408/cv_bridge/core.py" />
|
|
||||||
<entry file="file://$USER_HOME$/.PyCharm2016.3/system/remote_sources/-1418177152/1376253408/rospy/topics.py" />
|
|
||||||
<entry file="file://$USER_HOME$/.PyCharm2016.2/system/remote_sources/-1418177152/1376253408/rospy/client.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="196">
|
|
||||||
<caret line="349" column="4" selection-start-line="349" selection-start-column="4" selection-end-line="349" selection-end-column="4" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/StartupSystems/ROSMasterChecker.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="774">
|
|
||||||
<caret line="43" column="38" selection-start-line="43" selection-start-column="38" selection-end-line="43" selection-end-column="38" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoReceiverOld.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1134">
|
|
||||||
<caret line="74" column="18" selection-start-line="74" selection-start-column="16" selection-end-line="74" selection-end-column="142" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoReceiver.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="-1219">
|
|
||||||
<caret line="74" column="33" selection-start-line="74" selection-start-column="33" selection-end-line="74" selection-end-column="33" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/VideoSystems/RoverVideoCoordinator.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="359">
|
|
||||||
<caret line="77" column="12" selection-start-line="77" selection-start-column="12" selection-end-line="77" selection-end-column="12" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/Framework/LoggingSystems/Logger.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="18">
|
|
||||||
<caret line="21" column="37" selection-start-line="21" selection-start-column="23" selection-end-line="21" selection-end-column="37" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/Github/Rover_2017_2018/ground_station/RoverGroundStation.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="2826">
|
|
||||||
<caret line="167" column="43" selection-start-line="167" selection-start-column="43" selection-end-line="167" selection-end-column="43" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</component>
|
|
||||||
<component name="webServersAuthStorage">
|
|
||||||
<data>AAAAsNHwc2N+8Zbshoe1tr2XDVkf8aGU/l0YnN7t0gOfSXYMOeQZo2dVv+GbvgrFH5EF+uviJzRPHArF3uX1Vb0CuhmnSE0NSLdGfSjyMrpWsoZyS3WBI979X8Y/8lSe/g2O65pafrceXlU4ySEbA9w/JNU42PtXijURL7sXfaZ8kxhE5bYQlRppUyBo5g/qgzvj275mbp6uuZ5w9ssFsOzrJGsGulioJmZ9L9P6O6PVj2sPT2AEw+jC8eGiiappc0lWOA==</data>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
24
ground_station/resources/core/mappingtest.py
Executable file
24
ground_station/resources/core/mappingtest.py
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import mapping
|
||||||
|
import PIL
|
||||||
|
|
||||||
|
obj = mapping.GMapsStitcher(2000, 2000, 44.567161, -123.278432, 18, 'terrain', None, 20)
|
||||||
|
|
||||||
|
obj.display_image.save("unzoomed.png")
|
||||||
|
# draw = PIL.ImageDraw.ImageDraw(obj.big_image)
|
||||||
|
# draw.rectangle([950, 950, 1050, 1050], fill=128)
|
||||||
|
# lat, lng = obj.move_latlon(44.559919, -123.280723)
|
||||||
|
# draw.rectangle([lng-300, lat-300, lng+300, lat+300], fill=328)
|
||||||
|
# obj.big_image.save("toobig.jpg")
|
||||||
|
# obj.display_image.save("zoomed.jpg")
|
||||||
|
|
||||||
|
obj.add_gps_location(44.559919, -123.280723, "square", 50, (00, 00, 00, 256))
|
||||||
|
obj.add_gps_location(44.565094, -123.276110, "square", 50, (00, 00, 00, 256))
|
||||||
|
obj.add_gps_location(44.565777, -123.278902, "square", 50, (00, 00, 00, 256))
|
||||||
|
obj.display_image.save("box.png")
|
||||||
|
obj.center_display(44.567161, -123.278432)
|
||||||
|
obj.display_image.save("centered.png")
|
||||||
|
obj.big_image.save("toobig.png")
|
||||||
|
|
||||||
|
print obj
|
||||||
333
software/ground_station/Framework/MapSystems/RoverMap.py
Normal file
333
software/ground_station/Framework/MapSystems/RoverMap.py
Normal file
@@ -0,0 +1,333 @@
|
|||||||
|
'''
|
||||||
|
Mapping.py: Objected Orientated Google Maps for Python
|
||||||
|
ReWritten by Chris Pham
|
||||||
|
|
||||||
|
Copyright OSURC, orginal code from GooMPy by Alec Singer and Simon D. Levy
|
||||||
|
|
||||||
|
This code is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
This code is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with this code. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
'''
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Imports
|
||||||
|
#####################################
|
||||||
|
# Python native imports
|
||||||
|
import math
|
||||||
|
import urllib2
|
||||||
|
from io import StringIO, BytesIO
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import PIL.ImageDraw
|
||||||
|
import signing
|
||||||
|
import MapHelper
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Constants
|
||||||
|
#####################################
|
||||||
|
_KEYS = []
|
||||||
|
# Number of pixels in half the earth's circumference at zoom = 21
|
||||||
|
_EARTHPIX = 268435456
|
||||||
|
# Number of decimal places for rounding coordinates
|
||||||
|
_DEGREE_PRECISION = 4
|
||||||
|
# Larget tile we can grab without paying
|
||||||
|
_TILESIZE = 640
|
||||||
|
# Fastest rate at which we can download tiles without paying
|
||||||
|
_GRABRATE = 4
|
||||||
|
# Pixel Radius of Earth for calculations
|
||||||
|
_PIXRAD = _EARTHPIX / math.pi
|
||||||
|
_DISPLAYPIX = _EARTHPIX / 2000
|
||||||
|
|
||||||
|
file_pointer = open('key', 'r')
|
||||||
|
for i in file_pointer:
|
||||||
|
_KEYS.append(i.rstrip())
|
||||||
|
file_pointer.close()
|
||||||
|
|
||||||
|
|
||||||
|
class GMapsStitcher(object):
|
||||||
|
def __init__(self, width, height,
|
||||||
|
latitude, longitude, zoom,
|
||||||
|
maptype, radius_meters=None, num_tiles=4, debug=False):
|
||||||
|
self.helper = MapHelper.MapHelper()
|
||||||
|
self.latitude = latitude
|
||||||
|
self.longitude = longitude
|
||||||
|
self.start_latitude = latitude
|
||||||
|
self.start_longitude = longitude
|
||||||
|
self.width = width
|
||||||
|
self.height = height
|
||||||
|
self.zoom = zoom
|
||||||
|
self.maptype = maptype
|
||||||
|
self.radius_meters = radius_meters
|
||||||
|
self.num_tiles = num_tiles
|
||||||
|
self.display_image = self.helper.new_image(width, height)
|
||||||
|
self.debug = debug
|
||||||
|
|
||||||
|
# Get the big image here
|
||||||
|
self._fetch()
|
||||||
|
self.center_display(latitude, longitude)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
"""
|
||||||
|
This string returns when used in a print statement
|
||||||
|
Useful for debugging and to print current state
|
||||||
|
|
||||||
|
returns STRING
|
||||||
|
"""
|
||||||
|
string_builder = ""
|
||||||
|
string_builder += ("Center of the displayed map: %4f, %4f\n" %
|
||||||
|
(self.center_x, self.center_y))
|
||||||
|
string_builder += ("Center of the big map: %4fx%4f\n" %
|
||||||
|
(self.start_longitude, self.start_longitude))
|
||||||
|
string_builder += ("Current latitude is: %4f, %4f\n" %
|
||||||
|
(self.longitude, self.latitude))
|
||||||
|
string_builder += ("The top-left of the box: %dx%d\n" %
|
||||||
|
(self.left_x, self.upper_y))
|
||||||
|
string_builder += ("Number of tiles genreated: %dx%d\n" %
|
||||||
|
(self.num_tiles, self.num_tiles))
|
||||||
|
string_builder += "Map Type: %s\n" % (self.maptype)
|
||||||
|
string_builder += "Zoom Level: %s\n" % (self.zoom)
|
||||||
|
string_builder += ("Dimensions of Big Image: %dx%d\n" %
|
||||||
|
(self.big_image.size[0], self.big_image.size[1]))
|
||||||
|
string_builder += ("Dimensions of Displayed Image: %dx%d\n" %
|
||||||
|
(self.width, self.height))
|
||||||
|
string_builder += ("LatLong of Northwest Corner: %4f, %4f\n" %
|
||||||
|
(self.northwest))
|
||||||
|
string_builder += ("LatLong of Southeast Corner: %4f, %4f\n" %
|
||||||
|
(self.southeast))
|
||||||
|
return string_builder
|
||||||
|
|
||||||
|
def _grab_tile(self, longitude, latitude, sleeptime=0):
|
||||||
|
"""
|
||||||
|
This will return the tile at location longitude x latitude.
|
||||||
|
Includes a sleep time to allow for free use if there is no API key
|
||||||
|
|
||||||
|
returns PIL.IMAGE OBJECT
|
||||||
|
"""
|
||||||
|
# Make the url string for polling
|
||||||
|
# GET request header gets appended to the string
|
||||||
|
urlbase = 'https://maps.googleapis.com/maps/api/staticmap?'
|
||||||
|
urlbase += 'center=%.4f,%.4f&zoom=%d&maptype=%s'
|
||||||
|
urlbase += '&size=%dx%d&format=png&key=%s'
|
||||||
|
|
||||||
|
# Fill the formatting
|
||||||
|
specs = (self.helper.fast_round(latitude, _DEGREE_PRECISION),
|
||||||
|
self.helper.fast_round(longitude, _DEGREE_PRECISION),
|
||||||
|
self.zoom, self.maptype, _TILESIZE, _TILESIZE, _KEYS[0])
|
||||||
|
filename = 'Resources/Maps/' + ('%.4f_%.4f_%d_%s_%d_%d_%s' % specs)
|
||||||
|
filename += '.png'
|
||||||
|
|
||||||
|
# Tile Image object
|
||||||
|
tile_object = None
|
||||||
|
|
||||||
|
if os.path.isfile(filename):
|
||||||
|
tile_object = PIL.Image.open(filename)
|
||||||
|
|
||||||
|
# If file on filesystem
|
||||||
|
else:
|
||||||
|
# make the url
|
||||||
|
url = urlbase % specs
|
||||||
|
url = signing.sign_url(url, _KEYS[1])
|
||||||
|
result = urllib2.urlopen(urllib2.Request(url)).read()
|
||||||
|
tile_object = PIL.Image.open(BytesIO(result))
|
||||||
|
if not os.path.exists('Resources/Maps'):
|
||||||
|
os.mkdir('Resources/Maps')
|
||||||
|
tile_object.save(filename)
|
||||||
|
# Added to prevent timeouts on Google Servers
|
||||||
|
time.sleep(sleeptime)
|
||||||
|
|
||||||
|
return tile_object
|
||||||
|
|
||||||
|
def _pixels_to_lon(self, iterator, lon_pixels):
|
||||||
|
"""
|
||||||
|
This converts pixels to degrees to be used in
|
||||||
|
fetching squares and generate correct squares
|
||||||
|
|
||||||
|
returns FLOAT(degrees)
|
||||||
|
"""
|
||||||
|
# Magic Lines, no idea
|
||||||
|
degrees = self.helper.pixels_to_degrees((iterator - self.num_tiles / 2)
|
||||||
|
* _TILESIZE, self.zoom)
|
||||||
|
return math.degrees((lon_pixels + degrees - _EARTHPIX) / _PIXRAD)
|
||||||
|
|
||||||
|
def _pixels_to_lat(self, iterator, lat_pixels):
|
||||||
|
"""
|
||||||
|
This converts pixels to latitude using meridian projection
|
||||||
|
to get the latitude to generate squares
|
||||||
|
|
||||||
|
returns FLOAT(degrees)
|
||||||
|
"""
|
||||||
|
# Magic Lines
|
||||||
|
return math.degrees(math.pi / 2 - 2 * math.atan(math.exp(((lat_pixels +
|
||||||
|
self.helper.pixels_to_degrees(
|
||||||
|
(iterator - self.num_tiles / 2)
|
||||||
|
* _TILESIZE, self.zoom))
|
||||||
|
- _EARTHPIX) / _PIXRAD)))
|
||||||
|
|
||||||
|
def fetch_tiles(self):
|
||||||
|
"""
|
||||||
|
Function that handles fetching of files from init'd variables
|
||||||
|
|
||||||
|
returns PIL.IMAGE OBJECT, (WEST, NORTH), (EAST, SOUTH)
|
||||||
|
|
||||||
|
North/East/South/West are in FLOAT(degrees)
|
||||||
|
"""
|
||||||
|
# cap floats to precision amount
|
||||||
|
self.latitude = self.helper.fast_round(self.latitude,
|
||||||
|
_DEGREE_PRECISION)
|
||||||
|
self.longitude = self.helper.fast_round(self.longitude,
|
||||||
|
_DEGREE_PRECISION)
|
||||||
|
|
||||||
|
# number of tiles required to go from center
|
||||||
|
# latitude to desired radius in meters
|
||||||
|
if self.radius_meters is not None:
|
||||||
|
self.num_tiles = (int(
|
||||||
|
round(2 * self.helper.pixels_to_meters(
|
||||||
|
self.latitude, self.zoom) /
|
||||||
|
(_TILESIZE / 2. / self.radius_meters))))
|
||||||
|
|
||||||
|
lon_pixels = _EARTHPIX + self.longitude * math.radians(_PIXRAD)
|
||||||
|
|
||||||
|
sin_lat = math.sin(math.radians(self.latitude))
|
||||||
|
lat_pixels = _EARTHPIX - _PIXRAD * math.log((1+sin_lat)/(1-sin_lat))/2
|
||||||
|
self.big_size = self.num_tiles * _TILESIZE
|
||||||
|
big_image = self.helper.new_image(self.big_size, self.big_size)
|
||||||
|
|
||||||
|
for j in range(self.num_tiles):
|
||||||
|
lon = self._pixels_to_lon(j, lon_pixels)
|
||||||
|
for k in range(self.num_tiles):
|
||||||
|
lat = self._pixels_to_lat(k, lat_pixels)
|
||||||
|
tile = self._grab_tile(lon, lat)
|
||||||
|
big_image.paste(tile, (j * _TILESIZE, k * _TILESIZE))
|
||||||
|
|
||||||
|
west = self._pixels_to_lon(0, lon_pixels)
|
||||||
|
east = self._pixels_to_lon(self.num_tiles - 1, lon_pixels)
|
||||||
|
|
||||||
|
north = self._pixels_to_lat(0, lat_pixels)
|
||||||
|
south = self._pixels_to_lat(self.num_tiles - 1, lat_pixels)
|
||||||
|
return big_image, (north, west), (south, east)
|
||||||
|
|
||||||
|
def move_pix(self, dx, dy):
|
||||||
|
"""
|
||||||
|
Function gets change in x and y (dx, dy)
|
||||||
|
then displaces the displayed map that amount
|
||||||
|
|
||||||
|
NO RETURN
|
||||||
|
"""
|
||||||
|
self._constrain_x(dx)
|
||||||
|
self._constrain_y(dy)
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
def _constrain_x(self, diff):
|
||||||
|
"""
|
||||||
|
Helper for move_pix
|
||||||
|
"""
|
||||||
|
new_value = self.left_x - diff
|
||||||
|
|
||||||
|
if !(new_value > 0 and
|
||||||
|
(new_value < self.big_image.size[0] - self.width)):
|
||||||
|
return self.left_x
|
||||||
|
else:
|
||||||
|
return new_value
|
||||||
|
|
||||||
|
def _constrain_y(self, diff):
|
||||||
|
"""
|
||||||
|
Helper for move_pix
|
||||||
|
"""
|
||||||
|
new_value = self.upper_y - diff
|
||||||
|
|
||||||
|
if !(new_value > 0 and
|
||||||
|
new_value < self.big_image.size[1] - self.height):
|
||||||
|
return self.upper_y
|
||||||
|
else:
|
||||||
|
return new_value
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
"""
|
||||||
|
Function remakes display image using top left corners
|
||||||
|
"""
|
||||||
|
self.display_image.paste(self.big_image, (-self.left_x, -self.upper_y))
|
||||||
|
# self.display_image.resize((self.image_zoom, self.image_zoom))
|
||||||
|
|
||||||
|
def _fetch(self):
|
||||||
|
"""
|
||||||
|
Function generates big image
|
||||||
|
"""
|
||||||
|
self.big_image, self.northwest, self.southeast = self.fetch_tiles()
|
||||||
|
|
||||||
|
def move_latlon(self, lat, lon):
|
||||||
|
"""
|
||||||
|
Function to move the object/rover
|
||||||
|
"""
|
||||||
|
x, y = self._get_cartesian(lat, lon)
|
||||||
|
self._constrain_x(self.center_x-x)
|
||||||
|
self._constrain_y(self.center_y-y)
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
def _get_cartesian(self, lat, lon):
|
||||||
|
"""
|
||||||
|
Helper for getting the x, y given lat and lon
|
||||||
|
|
||||||
|
returns INT, INT (x, y)
|
||||||
|
"""
|
||||||
|
viewport_lat_nw, viewport_lon_nw = self.northwest
|
||||||
|
viewport_lat_se, viewport_lon_se = self.southeast
|
||||||
|
# print "Lat:", viewport_lat_nw, viewport_lat_se
|
||||||
|
# print "Lon:", viewport_lon_nw, viewport_lon_se
|
||||||
|
|
||||||
|
viewport_lat_diff = viewport_lat_nw - viewport_lat_se
|
||||||
|
viewport_lon_diff = viewport_lon_se - viewport_lon_nw
|
||||||
|
|
||||||
|
# print viewport_lon_diff, viewport_lat_diff
|
||||||
|
|
||||||
|
bigimage_width = self.big_image.size[0]
|
||||||
|
bigimage_height = self.big_image.size[1]
|
||||||
|
|
||||||
|
pixel_per_lat = bigimage_height / viewport_lat_diff
|
||||||
|
pixel_per_lon = bigimage_width / viewport_lon_diff
|
||||||
|
# print "Pixel per:", pixel_per_lat, pixel_per_lon
|
||||||
|
|
||||||
|
new_lat_gps_range_percentage = (viewport_lat_nw - lat)
|
||||||
|
new_lon_gps_range_percentage = (lon - viewport_lon_nw)
|
||||||
|
# print lon, viewport_lon_se
|
||||||
|
|
||||||
|
x = new_lon_gps_range_percentage * pixel_per_lon
|
||||||
|
y = new_lat_gps_range_percentage * pixel_per_lat
|
||||||
|
|
||||||
|
return int(x), int(y)
|
||||||
|
|
||||||
|
def add_gps_location(self, lat, lon, shape, size, fill):
|
||||||
|
"""
|
||||||
|
Function adds a shape at lat x lon
|
||||||
|
"""
|
||||||
|
x, y = self._get_cartesian(lat, lon)
|
||||||
|
draw = PIL.ImageDraw.Draw(self.big_image)
|
||||||
|
if shape is "ellipsis":
|
||||||
|
draw.ellipsis((x-size, y-size, x+size, y+size), fill)
|
||||||
|
else:
|
||||||
|
draw.rectangle([x-size, y-size, x+size, y+size], fill)
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
def center_display(self, lat, lon):
|
||||||
|
"""
|
||||||
|
Function centers the display image
|
||||||
|
"""
|
||||||
|
x, y = self._get_cartesian(lat, lon)
|
||||||
|
self.center_x = x
|
||||||
|
self.center_y = y
|
||||||
|
|
||||||
|
self.left_x = (self.center_x - (self.width/2))
|
||||||
|
self.upper_y = (self.center_y - (self.height/2))
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
# def update_rover_map_location(self, lat, lon):
|
||||||
|
# print "I did nothing"
|
||||||
|
|
||||||
|
# def draw_circle(self, lat, lon, radius, fill):
|
||||||
|
# print "I did nothing"
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
#####################################
|
||||||
|
# Imports
|
||||||
|
#####################################
|
||||||
|
# Python native imports
|
||||||
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import rospy
|
||||||
|
|
||||||
|
# Custom Imports
|
||||||
|
import RoverMap
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Global Variables
|
||||||
|
#####################################
|
||||||
|
# put some stuff here later so you can remember
|
||||||
|
|
||||||
|
|
||||||
|
class RoverMapCoordinator(QtCore.QThread):
|
||||||
|
pixmap_ready_signal = QtCore.pyqtSignal(str)
|
||||||
|
|
||||||
|
def __init__(self, shared_objects):
|
||||||
|
super(RoverMapCoordinator, self).init()
|
||||||
|
|
||||||
|
self.shared_objects = shared_objects
|
||||||
|
self.left_screen = self.shared_objects["screens"]["left_screen"]
|
||||||
|
self.mapping_label = self.left_screen.mapping_label
|
||||||
|
|
||||||
|
self.setings = QtCore.QSettings()
|
||||||
|
|
||||||
|
self.logger = logging.getLogger("groundstation")
|
||||||
|
|
||||||
|
self.run_thread_flag = True
|
||||||
|
self.setup_map_flag = True
|
||||||
|
|
||||||
|
# setup map
|
||||||
|
self._setup_map_threads()
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.logger.debug("Starting Map Coordinator Thread")
|
||||||
|
|
||||||
|
while self.run_thread_flag:
|
||||||
|
self.msleep(10)
|
||||||
|
|
||||||
|
self.__wait_for_map_thread()
|
||||||
|
self.logger.debug("Stopping Map Coordinator Thread")
|
||||||
|
|
||||||
|
def __wait_for_map_thread(self):
|
||||||
|
self.map_thread.wait()
|
||||||
|
|
||||||
|
def _setup_map_threads(self):
|
||||||
|
self.map_thread = RoverMap.GMapsStitcher(1280,
|
||||||
|
720, 44.567161, -123.278432,
|
||||||
|
18, 'terrain', None, 20)
|
||||||
|
|
||||||
|
def pixmap_ready_slot(self):
|
||||||
|
self.mapping_label.setPixmap(self.map_thread.display_image)
|
||||||
|
|
||||||
|
def on_kill_threads_requested_slot(self):
|
||||||
|
self.run_thread_flag = False
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import PIL.Image
|
||||||
|
import math
|
||||||
|
|
||||||
|
|
||||||
|
class MapHelper(object):
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def new_image(width, height):
|
||||||
|
"""
|
||||||
|
Generates a new image using PIL.Image module
|
||||||
|
|
||||||
|
returns PIL.IMAGE OBJECT
|
||||||
|
"""
|
||||||
|
return PIL.Image.new('RGBA', (width, height))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def fast_round(value, precision):
|
||||||
|
"""
|
||||||
|
Function to round values instead of using python's
|
||||||
|
|
||||||
|
return INT
|
||||||
|
"""
|
||||||
|
return int(value * 10 ** precision) / 10. ** precision
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def pixels_to_degrees(pixels, zoom):
|
||||||
|
"""
|
||||||
|
Generates pixels to be expected at zoom levels
|
||||||
|
|
||||||
|
returns INT
|
||||||
|
"""
|
||||||
|
return pixels * 2 ** (21-zoom)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def pixels_to_meters(latitude, zoom):
|
||||||
|
"""
|
||||||
|
Function generates how many pixels per meter it
|
||||||
|
should be from the projecction
|
||||||
|
|
||||||
|
returns FLOAT
|
||||||
|
"""
|
||||||
|
# https://groups.google.com/forum/#!topic/google-maps-js-api-v3/hDRO4oHVSeM
|
||||||
|
return 2 ** zoom / (156543.03392 * math.cos(math.radians(latitude)))
|
||||||
53
software/ground_station/Framework/MapSystems/signing.py
Normal file
53
software/ground_station/Framework/MapSystems/signing.py
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
""" Signs a URL using a URL signing secret """
|
||||||
|
|
||||||
|
import hashlib
|
||||||
|
import hmac
|
||||||
|
import base64
|
||||||
|
import urlparse
|
||||||
|
|
||||||
|
def sign_url(input_url=None, secret=None):
|
||||||
|
""" Sign a request URL with a URL signing secret.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
from urlsigner import sign_url
|
||||||
|
|
||||||
|
signed_url = sign_url(input_url=my_url, secret=SECRET)
|
||||||
|
|
||||||
|
Args:
|
||||||
|
input_url - The URL to sign
|
||||||
|
secret - Your URL signing secret
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The signed request URL
|
||||||
|
"""
|
||||||
|
|
||||||
|
if not input_url or not secret:
|
||||||
|
raise Exception("Both input_url and secret are required")
|
||||||
|
|
||||||
|
url = urlparse.urlparse(input_url)
|
||||||
|
|
||||||
|
# We only need to sign the path+query part of the string
|
||||||
|
url_to_sign = url.path + "?" + url.query
|
||||||
|
|
||||||
|
# Decode the private key into its binary format
|
||||||
|
# We need to decode the URL-encoded private key
|
||||||
|
decoded_key = base64.urlsafe_b64decode(secret)
|
||||||
|
|
||||||
|
# Create a signature using the private key and the URL-encoded
|
||||||
|
# string using HMAC SHA1. This signature will be binary.
|
||||||
|
signature = hmac.new(decoded_key, url_to_sign, hashlib.sha1)
|
||||||
|
|
||||||
|
# Encode the binary signature into base64 for use within a URL
|
||||||
|
encoded_signature = base64.urlsafe_b64encode(signature.digest())
|
||||||
|
|
||||||
|
original_url = url.scheme + "://" + url.netloc + url.path + "?" + url.query
|
||||||
|
|
||||||
|
# Return signed URL
|
||||||
|
return original_url + "&signature=" + encoded_signature
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
input_url = raw_input("URL to Sign: ")
|
||||||
|
secret = raw_input("URL signing secret: ")
|
||||||
|
print "Signed URL: " + sign_url(input_url, secret)
|
||||||
@@ -119,7 +119,7 @@ color: #DCDCDC;</string>
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="mapping_label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ class GroundStation(QtCore.QObject):
|
|||||||
|
|
||||||
# ##### Instantiate Threaded Classes ######
|
# ##### Instantiate Threaded Classes ######
|
||||||
self.__add_thread("Video Coordinator", RoverVideoCoordinator.RoverVideoCoordinator(self.shared_objects))
|
self.__add_thread("Video Coordinator", RoverVideoCoordinator.RoverVideoCoordinator(self.shared_objects))
|
||||||
|
self.__add_thread("Map Coordinator", RoverMapCoordinator.RoverMapCoordinator(self.shared_objects))
|
||||||
|
|
||||||
self.connect_signals_and_slots_signal.emit()
|
self.connect_signals_and_slots_signal.emit()
|
||||||
self.__connect_signals_to_slots()
|
self.__connect_signals_to_slots()
|
||||||
|
|||||||
Reference in New Issue
Block a user