ReneNulschDE / mbapi2020

Custom Component to integrate MercedesME devices into Home-Assistant
Other
149 stars 29 forks source link

china device track gps location is not right #140

Closed luckywaa closed 11 months ago

luckywaa commented 11 months ago

I think the problem is china need transform coordinate between earth(WGS-84) and mars in china(GCJ-02) image

ReneNulschDE commented 11 months ago

with the code in the master branch, the component has now the option to activate the GCJ-02. Let me know, if you can test this.

The option is in the configure dialog. image

Please restart HA or Reload the component after activating this setting.

ReneNulschDE commented 11 months ago

Part of the 0.9.4 release

luckywaa commented 11 months ago

Part of the 0.9.4 release

the problem is not fixed. I think it need to trans GCJ-02 to WGS-84, not the other way. I bought Gaode Map service in China, the mercedes api return GCJ-02 of china, but in HA, it used WGS-84, so we need trans GCJ-02 to WGS-84 to support HA

luckywaa commented 11 months ago

perhaps you can use this method https://github.com/gaussic/geo_convert/blob/master/converter.py