Is there a way to track your location in real time like a standard gps unit?
May be you want to leverage the capabilities of GeoEvent Extension for ArcGIS Server using which you can stream real time data from a GPS device in any Javascript based application of yours. Take a look at the stream service example below in JS API.
https://developers.arcgis.com/javascript/jssamples/layers_streamlayer.html
-Divyam