{"id":29021662,"url":"https://github.com/mapiv/llh_converter","last_synced_at":"2026-01-31T08:31:54.836Z","repository":{"id":113748022,"uuid":"483093891","full_name":"MapIV/llh_converter","owner":"MapIV","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-22T00:31:32.000Z","size":24123,"stargazers_count":8,"open_issues_count":1,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-22T13:52:08.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"AGS Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MapIV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-19T04:26:04.000Z","updated_at":"2025-11-20T06:04:42.000Z","dependencies_parsed_at":"2025-04-01T04:37:00.719Z","dependency_job_id":null,"html_url":"https://github.com/MapIV/llh_converter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MapIV/llh_converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fllh_converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fllh_converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fllh_converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fllh_converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MapIV","download_url":"https://codeload.github.com/MapIV/llh_converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fllh_converter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28935403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T07:49:44.436Z","status":"ssl_error","status_checked_at":"2026-01-31T07:49:34.274Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-26T02:07:26.285Z","updated_at":"2026-01-31T08:31:54.822Z","avatar_url":"https://github.com/MapIV.png","language":"AGS Script","readme":"# llh_converter\n\n(Updated 2025/03/17)\n\nThis repository has two class implementation.\n\n* HeightConverter\n* LLHConverter\n\n---\n\n## HeightConverter\n\nConvert height between ellipsoid and orthometric library\n\n### Supported Geoid Models\n\n* EGM2008-1\n* GSIGEO2011 Ver2.1\n* JPGEO2024 + Hrefconv2024\n\n### Usage\n\n```\nllh_converter::HeightConverter hc;\n\nhc.setGeoidType(height_converter::GeoidType::GSIGEO2011); // Select Geoid Model\n// hc.setGeoidType(height_converter::GeoidType::EGM2008);\n\nhc.setGSIGEOGeoidFile(path_to_gsigeo_asc_file);   // Load geoid data file when you select GSIGEO\n// hc.setGSIGEOGeoidFile();  // If called with void, it try to read geoid data files under /usr/share/GSIGEO/\n\ndouble geoid_heith = hc.getGeoid(lat, lon);   // Get geoid heigth with latitude/longitude in decimal degree\n\n// Convert height between ellipsoid and orthometric\ndouble converted_height = hc.convertHeight(lat, lon, h, height_converter::ConvertType::ORTHO2ELLIPS);\ndouble converted_height = hc.convertHeight(lat, lon, h, height_converter::ConvertType::ELLIPS2ORTHO);\n```\n\n---\n\n## LLHConverter\n\nConvert latitude/longitude/altitude into XYZ coordinate system.\n\n### Supported coordinate systems\n\n* Millitary Grid Reference System (MGRS)\n* Japan Plane Rectangular Coordinate System (JPRCS)\n* Transverse Mercator with an arbitrary origin (TM)\n\n### Usage\n\n```\nllh_converter::LLHConverter lc;\nllh_converter::LLHParam param;              // parameter for conversion\nparam.projection_method = llh_converter::ProjectionMethod::TM;\n                                            // set the projection method TM/JPRCS/MGRS\nparam.grid_code = \"9\";                        // set the grid code for JPRCS/MGRS\n                                            // for MGRS, it's required only when reverting to lat/lon\nparam.height_convert_type = llh_converter::ConvertType::ELLIPS2ORTHO;\n                                            // You can also convert height\nparam.geoid_type = llh_converter::GeoidType::EGM2008;\n                                            // Set geoid model\n// The following tm_param is required only when the projection method is TM\nparam.tm_param.inv_flatten_ratio = 298.257222101;\n                                            // Set the inverse flattening ratio\nparam.tm_param.semi_major_axis = 6378137.0; // Set the semi-major axis\nparam.tm_param.scale_factor = 0.9996;       // Set the scale factor\nparam.tm_param.origin_lat_rad = 35.0 * M_PI / 180.;\nparam.tm_param.origin_lon_rad = 139.0 * M_PI / 180.;\n                                            // Set the origin\n\ndouble lat_deg, lon_deg, alt;\ndouble lat_rad = lat_deg * M_PI / 180.;\ndouble lon_rad = lon_deg * M_PI / 180.;\ndouble x, y, z;\n\nlc.convertDeg2XYZ(lat_deg, lon_deg, alt, x, y, z, param);\nlc.convertRad2XYZ(lat_rad, lon_rad, alt, x, y, z, param);\n\nlc.revertXYZ2Deg(x, y, lat_deg, lon_deg, param);\nlc.revertXYZ2Rad(x, y, lat_rad, lon_rad, param);\n```\n\n---\n\n## meridian convergence angle correction\n\nThe meridian convergence angle is the angle of difference between true north and coordinate north.\n\nThe meridian convergence angle is calculated by the `getMeridianConvergence()` function.\n\n\u003cimg src=\"docs/meridian_convergence_angle.png\" width=\"750\"\u003e\n\n### Usage\n\n```\n  llh_converter::LLHConverter lc;\n  llh_converter::LLHParam param;\n  param.projection_method = llh_converter::ProjectionMethod::JPRCS;\n  param.grid_code = \"7\";\n  param.height_convert_type = llh_converter::ConvertType::NONE;\n  param.geoid_type = llh_converter::GeoidType::EGM2008;\n\n  llh_converter::LLA lla;\n  llh_converter::XYZ xyz;\n  lla.latitude = test_lat;\n  lla.longitude = test_lon;\n  lla.altitude = 30.0;\n  llh_converter.convertDeg2XYZ(lla.latitude, lla.longitude, lla.altitude, xyz.x, xyz.y, xyz.z, param);\n  double mca = llh_converter::getMeridianConvergence(lla, xyz, llh_converter, param); // meridian convergence angle\n```\n\n## Install\n\n```\nsudo apt update\nsudo apt install libgeographic-dev geographiclib-tools geographiclib-doc\n\nsudo geographiclib-get-geoids best\n\nmkdir -p test_ws/src\ncd test_ws/src/\ngit clone https://github.com/MapIV/llh_converter.git\nsudo mkdir /usr/share/GSIGEO\nsudo cp llh_converter/data/gsigeo2011_ver2_1.asc /usr/share/GSIGEO/\nunzip llh_converter/data/JPGEO2024.zip\nsudo mv JPGEO2024.isg Hrefconv2024.isg /usr/share/GSIGEO/\ncd ../\ncatkin_make -DCMAKE_BUILD_TYPE=Release\n```\n\n## Geoid model data\n\nThis package contains GSIGEO2011/JPGEO2024 geoid data file which is provided by Geospatial Information Authority of Japan.\n\n[GSI's official website that relies on GSIGEO2011](https://fgd.gsi.go.jp/download/geoid.php)\n\n[GSI's official website that relies on JPGEO2024](https://www.gsi.go.jp/buturisokuchi/grageo_reference.html)\n\n## LICENSE\n\nThis package is provided under the [BSD 3-Clauses](LICENSE) License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapiv%2Fllh_converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapiv%2Fllh_converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapiv%2Fllh_converter/lists"}