server/adapters/TelnetConsole-adapter.js
function (dbresult) {
                if (dbresult === null || dbresult === undefined) {
                    this.Debug (1,"Hoops: no DB info for %s", data.devid);
                    return;
                }
                
                for (var idx = 0; (idx < dbresult.length); idx ++) {
                    var posi= dbresult[idx];
                    posi.lon = posi.lon.toFixed (4);
                    posi.lat = posi.lat.toFixed (4);
                    posi.sog = posi.sog.toFixed (2);
                    posi.cog = posi.cog.toFixed (2);
                    var info=util.format ("> -%d- Lat:%s Lon:%s Sog:%s Cog:%s Alt:%s Acquired:%s\n"
                    , idx, posi.lat, posi.lon, posi.sog, posi.cog, posi.alt, posi.acquired_at);
                    socket.write (info);
                 }
              }
function (dbresult) {
                if (dbresult === null || dbresult === undefined) {
                    this.Debug (1,"Hoops: no DB info for %s", data.devid);
                    return;
                }
                
                for (var idx = 0; (idx < dbresult.length); idx ++) {
                    var posi= dbresult[idx];
                    posi.lon = posi.lon.toFixed (4);
                    posi.lat = posi.lat.toFixed (4);
                    posi.sog = posi.sog.toFixed (2);
                    posi.cog = posi.cog.toFixed (2);
                    var info=util.format ("> -%d- Lat:%s Lon:%s Sog:%s Cog:%s Alt:%s Acquired:%s\n"
                    , idx, posi.lat, posi.lon, posi.sog, posi.cog, posi.alt, posi.acquired_at);
                    socket.write (info);
                 }
              }
function ( dbresult ) { if ( dbresult === null || dbresult === undefined ) { this . Debug ( 1 , "Hoops: no DB info for %s" , data . devid ) ; return ; } for ( var idx = 0 ; ( idx < dbresult . length ) ; idx ++ ) { var posi = dbresult [ idx ] ; posi . lon = posi . lon . toFixed ( 4 ) ; posi . lat = posi . lat . toFixed ( 4 ) ; posi . sog = posi . sog . toFixed ( 2 ) ; posi . cog = posi . cog . toFixed ( 2 ) ; var info = util . format ( "> -%d- Lat:%s Lon:%s Sog:%s Cog:%s Alt:%s Acquired:%s\n" , idx , posi . lat , posi . lon , posi . sog , posi . cog , posi . alt , posi . acquired_at ) ; socket . write ( info ) ; } }
Ask DB backend to display on telnet socket last X position for devid=yyyy
Ask DB backend to display on telnet socket last X position for devid = yyyy