In QField is there a variable to retrieve the altitude: (@position_quotageid) obtained from the vertical grid shit in use

Hello Qfield Teams,

I can easily retrieve X and Y coordinates using the variables:
/x($geometry)/ and /Y($geometry)./

On the other hand, I cannot retrieve the corrected altitude which is
displayed on the Qfield coordinate tracking. If I use for the altitude Z
the variable/z($geometry)/, I have a “Null” value. If I use
/z(position_coordinate)/ I have the altitude relative to the Ellipsoid
in WGS 84.

My problem is to be able to retrieve the altitude corrected by Qfield
and which is displayed in the field on my image.

In which variable is this displayed value stored?

And how can I assign it to fields in my form prepared on Qgis?

Cordially JD



Imported from GitHub discussion by @Desaxo on 2023-03-01T17:49:55Z

This is currently doable in the following way:

  • make sure your layer geometry type is of type PointZ
  • snap the cursor to your current position
  • use z($geometry) as default value

There is room for improvement so the first condition on the layer geometry type is optional and to make it available via position_coordinate.


Imported from GitHub comment by @m-kuhn on 2023-03-04T17:17:04Z