kopia lustrzana https://github.com/projecthorus/chasemapper
Show heading and numSV data in chase car pane
rodzic
9c78b267df
commit
fe7412d4e4
|
@ -109,7 +109,7 @@ class GenericTrack(object):
|
|||
"landing_rate": self.landing_rate,
|
||||
"heading": self.heading,
|
||||
"heading_valid": self.heading_valid,
|
||||
"heading_status": "Unknown",
|
||||
"heading_status": self.heading_status,
|
||||
"turn_rate": self.turn_rate,
|
||||
"speed": self.speed,
|
||||
}
|
||||
|
|
|
@ -841,6 +841,7 @@ def udp_listener_car_callback(data):
|
|||
|
||||
if "heading_status" in data:
|
||||
_car_position_update["heading_status"] = data["heading_status"]
|
||||
|
||||
|
||||
car_track.add_telemetry(_car_position_update)
|
||||
|
||||
|
@ -850,10 +851,8 @@ def udp_listener_car_callback(data):
|
|||
_heading_valid = _state["heading_valid"]
|
||||
_speed = _state["speed"]
|
||||
|
||||
# Push the new car position to the web client
|
||||
flask_emit_event(
|
||||
"telemetry_event",
|
||||
{
|
||||
|
||||
_car_telem = {
|
||||
"callsign": "CAR",
|
||||
"position": [_lat, _lon, _alt],
|
||||
"vel_v": 0.0,
|
||||
|
@ -861,7 +860,16 @@ def udp_listener_car_callback(data):
|
|||
"heading_valid": _heading_valid,
|
||||
"heading_status": _heading_status,
|
||||
"speed": _speed,
|
||||
},
|
||||
}
|
||||
|
||||
# Add in some additional status fields if we have them.
|
||||
if 'numSV' in data:
|
||||
_car_telem['numSV'] = data['numSV']
|
||||
|
||||
# Push the new car position to the web client
|
||||
flask_emit_event(
|
||||
"telemetry_event",
|
||||
_car_telem
|
||||
)
|
||||
|
||||
# Update the Online Position Uploader, if one exists.
|
||||
|
|
|
@ -245,6 +245,17 @@ function handleTelemetry(data){
|
|||
// Update range rings, if they are enabled.
|
||||
recenterRangeRings(data.position);
|
||||
|
||||
// Update Detailed GPS / Heading Info
|
||||
if(data.hasOwnProperty('heading_status')){
|
||||
$("#headingStatus").text(data.heading_status);
|
||||
}
|
||||
|
||||
if(data.hasOwnProperty('numSV')){
|
||||
$("#numSVStatus").text(data.numSV.toFixed(0));
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
|
||||
// Update Chase Car Speed
|
||||
if (document.getElementById("showCarSpeed").checked){
|
||||
if (chase_config['unitselection'] == "imperial") {
|
||||
|
|
|
@ -878,6 +878,14 @@
|
|||
<b>Show Chase Car Heading:</b> <input type="checkbox" class="paramSelector" id="showCarHeading">
|
||||
</div>
|
||||
|
||||
<h3>GPS/Heading Status</h3>
|
||||
<div class="paramRow">
|
||||
<b>SVs Tracked:</b> <div class="predictorModelValue" id='numSVStatus'>---</div>
|
||||
</div>
|
||||
<div class="paramRow">
|
||||
<b>Heading:</b> <div class="predictorModelValue" id='headingStatus'>---</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue