Skip to content
Merged
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1778,14 +1778,18 @@ function createHysplit(callsign, adjustment, alt_color) {
vehicle.markers_hysplit[adjustment] = {};
}

// Calculate the solar elevation at this date and time.

var solar_elev_now = (SunCalc.getPosition(current_time, lat, lon, data.prediction[1].trajectory[point].altitude).altitude/rad).toFixed(1);

vehicle.markers_hysplit[adjustment][current_hours] = new L.CircleMarker(position,
{
radius: 6,
fillOpacity: 1,
color: alt_color,
}
).bindPopup(
"<B>Prediction Start Time:</B> " + startDateStr + "<BR><B>Prediction Start Altitude: </B>" + altitude + "<BR><B>Prediction Current time:</B> " + data.prediction[1].trajectory[point].datetime + " (+" + current_hours + " hrs)"
"<B>Prediction Start Time:</B> " + startDateStr + "<BR><B>Prediction Start Altitude: </B>" + altitude + "<BR><B>Prediction Current time:</B> " + data.prediction[1].trajectory[point].datetime + " (+" + current_hours + " hrs)<BR><B>Solar Elevation:</B> " + solar_elev_now + "˚"
);

if(vehicle.prediction_hysplit_visible){
Expand Down