waypoints: draw big distance and waypoint name
parent
aa7c87dd2e
commit
a5874933fe
|
|
@ -220,17 +220,17 @@ let arrow = {
|
||||||
let distance = this.distanceToWaypoint(currentPos);
|
let distance = this.distanceToWaypoint(currentPos);
|
||||||
let northHeading = this.compassHeading(currentHeading);
|
let northHeading = this.compassHeading(currentHeading);
|
||||||
|
|
||||||
// Format distance
|
|
||||||
let distStr = fmt.fmtDist(distance/1000);
|
|
||||||
|
|
||||||
northHeading = 0;
|
northHeading = 0;
|
||||||
// Draw compass arrow for north
|
// Draw compass arrow for north
|
||||||
this.drawArrow(northHeading, "N", 1);
|
this.drawArrow(northHeading, "N", 1);
|
||||||
|
|
||||||
|
let s = fmt.fmtDist(distance/1000);
|
||||||
// Draw arrow towards waypoint
|
// Draw arrow towards waypoint
|
||||||
if (1)
|
if (1) {
|
||||||
this.drawArrow(waypointBearing, `${distStr}`, 3);
|
this.drawArrow(waypointBearing, s, 3);
|
||||||
|
}
|
||||||
|
|
||||||
if (1) {
|
if (1) {
|
||||||
let s = fmt.fmtSpeed(fix.speed);
|
let s = fmt.fmtSpeed(fix.speed);
|
||||||
this.drawArrow(currentHeading, s, 1);
|
this.drawArrow(currentHeading, s, 1);
|
||||||
|
|
@ -249,6 +249,11 @@ let arrow = {
|
||||||
this.drawArrow(s.azimuth, "Moon", 1);
|
this.drawArrow(s.azimuth, "Moon", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g.setFont("Vector", 30).setFontAlign(-1, 1)
|
||||||
|
.drawString(s, 0, 176)
|
||||||
|
.setFontAlign(1, 1)
|
||||||
|
.drawString(this.name, 176, 176);
|
||||||
},
|
},
|
||||||
|
|
||||||
drawArrow: function(angle, label, width) {
|
drawArrow: function(angle, label, width) {
|
||||||
|
|
@ -258,7 +263,7 @@ let arrow = {
|
||||||
// Arrow parameters
|
// Arrow parameters
|
||||||
let centerX = 88;
|
let centerX = 88;
|
||||||
let centerY = 88;
|
let centerY = 88;
|
||||||
let length = 60; // Arrow length
|
let length = 55; // Arrow length
|
||||||
|
|
||||||
g.drawCircle(centerX, centerY, length);
|
g.drawCircle(centerX, centerY, length);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue