I am new in Geographic area and would like to convert latitude and longitude coordinates into ECEF x,y coordinates so that I could do some linear calculation of line or circle equation. I was able to get the elevation of the coordinate using Google Maps Elevation API and it says that the value is local mean sea level (LMSL). Can I use this value as altitude for ECEF? Or should I also use the geoid height value from EGM2008 or combine both LMSL+geoid height as altitude?
Case in point:
Latitude = 52.394033° N = 52° 23' 38.52" N Longitude = 13.133462° E = 13° 8' 0.46" E GPS ellipsoidal height (Google elevation) = 42.27206802368164 (meters) Geoid height (EGM96) = 40.229 (meters)
Which one I should use as altitude for ECEF?