oh yeah kalassak you had like a question
so the thing in the haki layer isn't like latitude/longitude i guess it's like how high haki is in the sky which nevermind that's latitude but anyways here's the code for generating the map if you wanna play around with it
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.nio.file.Paths;
import java.util.Scanner;
import javax.imageio.ImageIO;
public class HakiCalc {
static final int WORLD_WIDTH = 3078; // width of pavala basemap in pixels
static final int WORLD_HEIGHT = WORLD_WIDTH/2;
static final double R_PAV = 4899.751;
static final double PAV_HAKI_DIST = 42319.854; //Distance from centers of Pavala and Haki
static final double SUBHAKIAN_OFFSET = 34.0134; // difference between subhakian point and prime meridian
static final double HAKI_ANGULAR_DIAMETER = 13.6; // degrees (as viewed from subhaki?)
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
BufferedImage bi = new BufferedImage(WORLD_WIDTH, WORLD_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR);
for(int i = 0; i < bi.getWidth(); i++) {
for(int j = 0; j < bi.getHeight(); j++) {
double elevation = calc((j*1.0/WORLD_HEIGHT*180 - 90)*Math.PI/180, (i*1.0/WORLD_WIDTH*360 - 180 - SUBHAKIAN_OFFSET)*Math.PI/180)*180/Math.PI; // from 90 to -90
int color = (int)((90 + elevation)/180*255);
//System.out.println(color);
boolean draw = false;
int contour = 0;
if(Math.abs((int)elevation - elevation) < 0.2) {
draw = true;
contour = (int)elevation;
}
if(draw && contour % 2 == 0) {
bi.setRGB(i, j, new Color(0, 0, 255).getRGB());
} else if(elevation >= HAKI_ANGULAR_DIAMETER/2) {
//bi.setRGB(i, j, new Color(0, 0, 127).getRGB());
} else if(elevation >= -HAKI_ANGULAR_DIAMETER/2) {
bi.setRGB(i, j, new Color(0, 0, 127).getRGB());
} else {
//bi.setRGB(i, j, new Color(color, color, color).getRGB());
}
}
}
try {
ImageIO.write(bi, "png", new File(Paths.get(".").toAbsolutePath().normalize().toString() + "/out.png"));
System.out.println("Elevation map written!");
} catch(Exception e) {
e.printStackTrace();
}
while(true) {
System.out.print("Latitude: ");
double lat = s.nextDouble()*Math.PI/180;
System.out.print("Longitude: ");
double lon = (s.nextDouble() - SUBHAKIAN_OFFSET)*Math.PI/180;
double elevation = calc(lat, lon);
System.out.println(elevation*180/Math.PI);
System.out.println("Visible: " + (elevation*180/Math.PI + HAKI_ANGULAR_DIAMETER/2 > 0 ? "YES" : "NO"));
}
}
public static double calc(double lat, double lon) {
double h = R_PAV*Math.sin(lat);
double w = R_PAV*Math.cos(lat)*Math.cos(lon);
double z = R_PAV*Math.cos(lat)*Math.sin(lon);
double r = Math.sqrt(Math.pow(PAV_HAKI_DIST - w, 2) + Math.pow(z, 2));
double alpha = Math.atan(Math.sqrt(Math.pow(h, 2) + Math.pow(z, 2))/r);
double elevation = Math.PI/2 - Math.acos(Math.cos(lat)*Math.cos(-lon))-Math.abs(alpha);
//System.out.printf("%f %f %f %f %f\n", h, w, z, r, alpha);
return elevation;
}
}
it's taken from your azimuth calculator and i did a few things like 2 years ago to generate the map