int lineSize = navaidRadius / 10;
int polyRadius = navaidRadius / 5;
g.setColor(colors.get("NAVAIDS_DETAILED").getColor());
while (it.hasNext()) {
INavaidCoord tmp = (NavaidCoord) it.next();
if (allObjects.get("Navaid: " + tmp.getName())) {
g.drawOval(getX(tmp.getLon()) - navaidRadius, getY(tmp.getLat()) - navaidRadius, navaidRadius * 2, navaidRadius * 2);
double xRaw = getX(tmp.getLon());
double yRaw = getY(tmp.getLat());
for (int i = 0; i < 36; i++) {
if (i != 0 && i % 3 != 0) {
g.drawLine(
(int) (xRaw + (Math.sin((Math.PI / 18) * i)) * (navaidRadius - lineSize)),
(int) (yRaw + (Math.cos((Math.PI / 18) * i)) * (navaidRadius - lineSize)),
(int) (xRaw + (Math.sin((Math.PI / 18) * i)) * navaidRadius),
(int) (yRaw + (Math.cos((Math.PI / 18) * i)) * navaidRadius));
}
}
for (int i = 0; i < 12; i++) {
g.drawLine(
(int) (xRaw + (Math.sin((Math.PI / 6) * i)) * (navaidRadius - lineSize * 2)),
(int) (yRaw + (Math.cos((Math.PI / 6) * i)) * (navaidRadius - lineSize * 2)),
(int) (xRaw + (Math.sin((Math.PI / 6) * i)) * navaidRadius),
(int) (yRaw + (Math.cos((Math.PI / 6) * i)) * navaidRadius));
}
int[] xPointsPoly = new int[6];
int[] yPointsPoly = new int[6];
for (int i = 0; i < 6; i++) {
xPointsPoly[i] = (int) (xRaw + (Math.sin((Math.PI / 3) * i) * polyRadius));
yPointsPoly[i] = (int) (yRaw + (Math.cos((Math.PI / 3) * i) * polyRadius));
}
g.fillRect((int) xRaw - 1, (int) yRaw - 1, 3, 3);
g.drawPolygon(xPointsPoly, yPointsPoly, 6);
g.drawString(tmp.getName(), (float) (xRaw), (float) (yRaw + navaidRadius + 20));
g.drawString(tmp.getFrequency(), (float) (xRaw), (float) (yRaw + navaidRadius + 32));
}
}
}