AMDC (APRS MobileObject Data Client) is a client used to receive info of mobile objects from the APRS2 server, decode and post the data to a database for multiple purposes.
- The source of a message;
- The West/East, degree, minute and hundredths of minutes of Latitude;
- The North/South, degree, minute and hundredths of minutes of Longitude;
- The speed of a moving object;
- The course of a moving object;
- The altitude of a moving object (optional);
- The type of a moving object (optional);
- A MIC-E message (optional).
- Clone the repo and navigate to the folder.
git clone git@github.com:Travelinglight/AMDC.git
cd AMDC
- Install express and body-parser modules with NPM.
npm install express
npm install body-parser
- Run the Server.
node Server.js
- Open another terminal and run the client.
node client.js
- See the result in the Server terminal
- Copy client.js and decode.js to your own repo;
- Use body-parser in your back-end to parse the request data posted by the client;
var bodyParser = require("body-parser");
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.post("/moving_object", function(req, res) {
// use req.body as a json;
});
- The source (CALL) can be obtained from req.body.Source. It is the ID of the object;
- Longitude can be obtained from req.body.Longitude. A positive number means East and a negative one means West;
- Latitude can be obtained from req.body.Latitude. A positive number means North and a negative one means South;
- The speed info can be obtained from req.body.Speed
- The course info can be obtained from req.body.Course
- The altitude info can be obtained form req.body.Altitude. If undefined, it means the object's altitude info is not specified;
- The object type info is stored in req.body.Comments.Type. If undefined, req.body.Destination can be used to determine the type of the object. For more information, please refer to APRS101;
- The MIC-E message can be obtained from req.body.Comments.MicMst;