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

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
Update flighttracker.py
  • Loading branch information
luke-iqt committed Mar 22, 2021
commit e66d0cee2f3577f84b66e336a40120ea390efbd5
14 changes: 7 additions & 7 deletions tracker/flighttracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ def update(self, sbs1msg):
if not self.__planedb_nagged:
self.__planedb_nagged = True
logging.error("icao24 %s not found in the database" % (self.__icao24))

# Calculates the distance from the cameras location to the airplane. The output is in METERS!
distance = utils.coordinate_distance(camera_latitude, camera_longitude, self.__lat, self.__lon)
#Not sure we want to... commented out for now -> Round off to nearest 100 meters
self.__distance = distance = distance #round(distance/100) * 100
self.__bearing = utils.bearing(camera_latitude, camera_longitude, self.__lat, self.__lon)
self.__elevation = utils.elevation(distance, self.__altitude, camera_altitude) # Distance and Altitude are both in meters
if self.__lat and self.__lon and self.__altitude:
# Calculates the distance from the cameras location to the airplane. The output is in METERS!
distance = utils.coordinate_distance(camera_latitude, camera_longitude, self.__lat, self.__lon)
#Not sure we want to... commented out for now -> Round off to nearest 100 meters
self.__distance = distance = distance #round(distance/100) * 100
self.__bearing = utils.bearing(camera_latitude, camera_longitude, self.__lat, self.__lon)
self.__elevation = utils.elevation(distance, self.__altitude, camera_altitude) # Distance and Altitude are both in meters

# Check if observation was updated
newData = dict(self.__dict__)
Expand Down