Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono #14

Merged
merged 31 commits into from
Apr 19, 2021
Merged

Mono #14

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changes
  • Loading branch information
luke-iqt committed Mar 22, 2021
commit f2a49293db9bca4a2dfc24edf7ecd20ec0d330d0
14 changes: 7 additions & 7 deletions Config.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,24 @@
},
{
"cell_type": "code",
"execution_count": 63,
"execution_count": 68,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d01047810>"
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d0104a9f0>"
]
},
"execution_count": 63,
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"client.connect(broker)\n",
"data = {}\n",
"data['cameraZoom'] = 5000 # Update this Value\n",
"data['cameraZoom'] = 0 # Update this Value\n",
"json_data = json.dumps(data)\n",
"client.publish(\"skyscan/config/json\",json_data)"
]
Expand Down Expand Up @@ -198,16 +198,16 @@
},
{
"cell_type": "code",
"execution_count": 64,
"execution_count": 65,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d0104a540>"
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d01048a90>"
]
},
"execution_count": 64,
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
5 changes: 3 additions & 2 deletions tracker/flighttracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def getElevation(self) -> int:

def getLoggedDate(self) -> datetime:
return self.__loggedDate

def getLatLonTime(self) -> datetime:
return self.__latLonTime
def getGroundSpeed(self) -> float:
return self.__groundSpeed

Expand Down Expand Up @@ -409,7 +410,7 @@ def __publish_thread(self):
if cur is None:
continue

(lat, lon) = utils.calc_travel(cur.getLat(), cur.getLon(), cur.getLoggedDate(), cur.getGroundSpeed(), cur.getTrack(), camera_lead)
(lat, lon) = utils.calc_travel(cur.getLat(), cur.getLon(), cur.getLatLonTime(), cur.getGroundSpeed(), cur.getTrack(), camera_lead)
distance = utils.coordinate_distance(camera_latitude, camera_longitude, lat, lon)
# Round off to nearest 100 meters
#distance = round(distance/100) * 100
Expand Down