Update readme, move map zoom control to top-right.

bearings
Mark Jessop 2019-05-25 21:04:14 +09:30
rodzic 1ed9e32bf2
commit 4406040db5
4 zmienionych plików z 20 dodań i 10 usunięć

Wyświetl plik

@ -1,7 +1,5 @@
# Project Horus - Browser-Based HAB Chase Map
**Note: This is a work-in-progress. Features may be incomplete or non-functional!**
This folder contains code to display payload (and chase car!) position data in a web browser:
![ChaseMapper Screenshot](https://github.com/projecthorus/chasemapper/raw/master/doc/chasemapper.jpg)
@ -16,7 +14,7 @@ On other OSes the required packages should be named something similar.
You also need flask-socketio, which can be installed using pip:
```
$ sudo pip install flask-socketio
$ sudo pip install flask-socketio pytz
```
You can then clone this repository with:
@ -44,7 +42,9 @@ Edit this file with your preferred text editor. The configuration file is fairly
* At least one telemetry 'profile', which defines where payload and (optionally) car position telemetry data is sourced from.
* A default latitude and longitude for the map to centre on.
You can then start-up the horusmapper server with:
The example configuration file includes profiles suitable for receiving data from radiosonde_auto_rx, and from OziMux messages.
Once configured, you can start-up the horusmapper server with:
```
$ python horusmapper.py
```

Wyświetl plik

@ -37,12 +37,13 @@ car_source_port = 55672
# Other profiles can be defined in sections like the following:
[profile_2]
# Example source to take telemetry data from an instance of radiosonde_auto_rx
# emitting Horus UDP packets on port 55673, but still accept car positions via the
# 'standard' Horus UDP port 55672
# emitting Horus UDP packets on port 55673, and accepts car positions from a local
# instance of GPSD
profile_name = auto_rx
telemetry_source_type = horus_udp
telemetry_source_port = 55673
car_source_type = horus_udp
car_source_type = gpsd
# Since we are using GPSD, the car_source_port argument is unused, but still has to be defined.
car_source_port = 55672

Wyświetl plik

@ -313,12 +313,12 @@ def plot_predictor_error(flight_stats, predictor_errors, abort_predictor_errors=
_abort_predict_error.append(_entry[1])
plt.plot(_abort_predict_time, _abort_predict_error, label='Abort Prediction')
plt.legend()
plt.xlabel("Time (minutes)")
plt.ylabel("Landing Prediction Error (km)")
plt.title("Landing Prediction Error - %s" % callsign)
plt.grid()
plt.legend()
@ -328,6 +328,7 @@ if __name__ == "__main__":
parser.add_argument("-c", "--config", type=str, default="horusmapper.cfg", help="Configuration file.")
parser.add_argument("-v", "--verbose", action="store_true", default=False, help="Verbose output.")
parser.add_argument("--predict-error", action="store_true", default=False, help="Calculate Prediction Error.")
parser.add_argument("--abort-predict-error", action="store_true", default=False, help="Calculate Abort Prediction Error.")
parser.add_argument("--landing-lat", type=float, default=None, help="Override Landing Latitude")
parser.add_argument("--landing-lon", type=float, default=None, help="Override Landing Longitude")
args = parser.parse_args()
@ -356,7 +357,10 @@ if __name__ == "__main__":
if args.predict_error:
if (args.landing_lat) != None and (args.landing_lon != None):
_predict_errors = calculate_predictor_error(_telemetry[_call]['predictions'], None, args.landing_lat, args.landing_lon, 0)
_abort_predict_errors = calculate_abort_error(_telemetry[_call]['predictions'], None, args.landing_lat, args.landing_lon, 0)
if args.abort_predict_error:
_abort_predict_errors = calculate_abort_error(_telemetry[_call]['predictions'], None, args.landing_lat, args.landing_lon, 0)
else:
_abort_predict_errors = None
plot_predictor_error(_stats, _predict_errors, _abort_predict_errors, _call)
elif 'landing' in _stats:
@ -365,7 +369,10 @@ if __name__ == "__main__":
_lon = _stats['landing'][2]
_alt = _stats['landing'][3]
_predict_errors = calculate_predictor_error(_telemetry[_call]['predictions'], _time, _lat, _lon, _alt)
_abort_predict_errors = calculate_abort_error(_telemetry[_call]['predictions'], _time, _lat, _lon, _alt)
if args.abort_predict_error:
_abort_predict_errors = calculate_abort_error(_telemetry[_call]['predictions'], _time, _lat, _lon, _alt)
else:
_abort_predict_errors = None
plot_predictor_error(_stats, _predict_errors, _abort_predict_errors, _call)

Wyświetl plik

@ -309,6 +309,8 @@
}
).addTo(map);
map.zoomControl.setPosition('topright');
// Experimental routing control
// Currently disabled, as there is currently not enough control around how the map is re-panned
// after a route is calculated.