def setnemposition(self, netif, x, y, z):
        ''' Publish a NEM location change event using the EMANE event service.
        '''
        if self.session.emane.service is None:
            if self.verbose:
                self.info("position service not available")
            return
        nemid =  self.getnemid(netif)
        ifname = netif.localname
        if nemid is None:
            self.info("nemid for %s is unknown" % ifname)
            return
        (lat, long, alt) = self.session.location.getgeo(x, y, z)
        if self.verbose:
            self.info("setnemposition %s (%s) x,y,z=(%d,%d,%s)"
                      "(%.6f,%.6f,%.6f)" % \
                      (ifname, nemid, x, y, z, lat, long, alt))
        if self.session.emane.version >= self.session.emane.EMANE091:
            event = LocationEvent()
        else:
            event = emaneeventlocation.EventLocation(1)
        # altitude must be an integer or warning is printed
        # unused: yaw, pitch, roll, azimuth, elevation, velocity
        alt = int(round(alt))
        if self.session.emane.version >= self.session.emane.EMANE091:
            event.append(nemid, latitude=lat, longitude=long, altitude=alt)
            self.session.emane.service.publish(0, event)
        else:
            event.set(0, nemid, lat, long, alt)
            self.session.emane.service.publish(emaneeventlocation.EVENT_ID,
                                           emaneeventservice.PLATFORMID_ANY,
                                           emaneeventservice.NEMID_ANY,
                                           emaneeventservice.COMPONENTID_ANY,
                                           event.export())
dataset/ETHPy150Open coreemu/core/daemon/core/emane/nodes.py/EmaneNode.setnemposition/original