Tracing a RealObject with GPS
Every RO has a GPSunit
To supply a location each RealObject has a hidden virtual roaf.gps.GPSunit to keep track of GPS coordinates. The GPSunit is a private member and cannot be accessed externally - by design. The RO is responsible for its own (auto) motion: The decision to replay a recorded trace, to simulate motion or to hook up a real GPS device (or a mixture) is private to the RO, and the location can not be accessed and modified externally.
A Use Case
- Imagine you (a body with location, mass, and size) represent the RealObject (RealPerson extends RealObject) carrying a cell phone (a reference for other people to reach you and inquire information) and a GPSunit (hidden in your jacket).
- You are standing on or near a bank of a river (location) and you turn on the GPS device, which is attached to you and retrieves your geographical Position and the universal time (GPSinfo).
- A friend calls you and ask, "Where are you?"
You answer, "I'm at Regen street parallel to the Regen river" (local knowledge).
To be more precise, you look at the GPS and say, "I'm at N49.031, E12.103."
He asks, "What time is it?"
You read it on the GPS, the most precise clock available
and reply, "Let's meet downtown at the cathedral."
- You begin to walk downtown to meet your friend. The GPSunit refreshes your position approximately every second and logs every GPSinfo(lat, lon, elev, time) to its internal memory.
- You're late and jump into a cab. The GPS is now logging the cab's trace along the streets.
The roaf.book.ro.RealObject Implementation
Please be patient!
Due to time constraints the ROAF Online Tutorials are still under construction.