/** * <summary> * Returns the current altitude. * <para> * Beware: GPS technology * is very inaccurate regarding altitude. * </para> * <para> * </para> * </summary> * <returns> * a floating point number corresponding to the current altitude * </returns> * <para> * On failure, throws an exception or returns <c>YGps.ALTITUDE_INVALID</c>. * </para> */ public double get_altitude() { double res; if (_func == null) { throw new YoctoApiProxyException("No Gps connected"); } res = _func.get_altitude(); if (res == YAPI.INVALID_DOUBLE) { res = Double.NaN; } return(res); }