Skip to content

Instantly share code, notes, and snippets.

View ojaha065's full-sized avatar
🐺
Awoo!

Jani Haiko ojaha065

🐺
Awoo!
View GitHub Profile
@ojaha065
ojaha065 / WGS84_to_ETRS89_TM35FIN.java
Last active October 2, 2023 12:35
WGS84 to ETRS-TM35FIN coordinate system converter in Java
public class WGS84_to_ETRS89_TM35FIN {
private static final double F = 1d / 298.257222101d; // Ellipsoidin litistyssuhde
private static final double N = F / (2d - F);
private static final double A1 = (6378137d / (1d + N)) * (1d + (Math.pow(N, 2) / 4d) + (Math.pow(N, 4) / 64d)); // Isoakselin puolikas
private static final double E_POW_SQRT = Math.sqrt((2d * F) - Math.pow(F, 2));
private static final double H1 = (1d / 2d) * N - (2d / 3d) * Math.pow(N, 2) + (5d / 16d) * Math.pow(N, 3) + (41d / 180d) * Math.pow(N, 4);
private static final double H2 = (13d / 48d) * Math.pow(N, 2) - (3d / 5d) * Math.pow(N, 3) + (557d / 1440d) * Math.pow(N, 4);
private static final double H3 = (61d / 240d) * Math.pow(N, 3) - (103d / 140d) * Math.pow(N, 4);
private static final double H4 = (49561d / 161280d) * Math.pow(N, 4);
@ojaha065
ojaha065 / settings.json
Last active June 4, 2023 19:49
My settings for Windows Terminal
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false