JMRI: RPS Icon
RPS is a system for measuring the positions of rolling stock on your layout. More information on RPS is available on the main RPS help page. RPS Reporter icons move around on the panel to show where the corresponding equipment is on the layout.
This page is still under construction, but the RPS icon
support itself is already present in JMRI. Go ahead and try it out!
RPS icons are a way of putting icons on a panel that will move around as the RPS system finds the location of an associated transmitter.
Adding an RPS Icon to a Panel
Usually, each RPS icon represents one RPS transmitter, hence one locomotive. Currently, you need to add one for each RPS-equipped piece of equipment you want to track. Although this is a pain, it gives you very fine control over which transmitter's positions are displayed and how they are presented. Section still needs lots of workClick "Add RPS reporter" on the panel editor. An RPS icon will appear on the panel at the default location, but it won't work yet until it's calibrated.
Right-click or option-click on the icon to see the popup menu, where you can calibrate the icon.
Calibrating an RPS Icon
When you calibrate an RPS icon, you're specifying how RPS measured locations correspond to positions on the panel.The steps are:
- Stop the RPS system polling, so things won't move around on you.
- Add the icon to the panel.
- Drag the icon until it sits over the position that corresponds to the 0,0 origin of your RPS installation.
- Right-click or option-click on the icon to get the pop-up menu, and select "Set Origin".
- Move the actual locomotive to some other point on the layout, and start the RPS system polling again. Get a good measurement of the position. Stop the RPS system.
- Drag the icon to where you want it to be on the screen when the transmitter is in that location.
- From the icon's popup menu, select "Set Current Location".
- Get the popup menu again. It should no longer say "Not Calibrated", and instead should show you the current position.
Don't forget to save your panel!
If you want to have multiple icons, each showing the position of a single
locomotive, you can configure filters on each icon.
This method is a little tedious, particularly if you have a large roster,
since you'll have to do it manually for each locomotive. And you'll have to
calibrate them all. (One good way to do this is to copy the lines defining
one icon in the panel file, in effect making a bunch of duplicate calibrated icons,
and then set the filters; see below).
But it has the advantage that you can control exactly which locomotives to
display and which not to.
This method also allowes you to attach custom images (e.g. a picture
of a specific locomotive) to the specific icon that represents each ID.
You can use this to e.g. put the icons out of the way initially.
They'll stay in that position until a valid reading moves them, so
you can use this to "park" locomotives that are not on the track
off the active part of the panel.
Popup Menu
The popup menu for an RPS icon contains:
Filtering and Multiple Locomotives
We're still trying to figure out how best to configure multiple icons
on a panel. A single icon, with no special settings, will hop around
as readings come in. It will go to the position of one reading, and then
move directly to the position of the next reading, which might come from
another locomotive transmitter.
Customization
Starting Position
When you first open the panel, the icons are put back to the same
position on the screen that they occupied when the screen was saved to the file.
Displaying a Custom Icon
Although there is not yet a graphical interface for this yet (it's coming!),
you can modify the icon for a transmitter that's being tracked by
the RPS system so that it displays e.g. a small picture of the locomotive.
To do this, you'll edit the panel definition file directly.
(There's more information on the
XML format we use
here) The steps are:
A nice graphical interface for this is coming, but it's not here yet.
<sensoricon x="95" y="150" level="10"
active="resources/icons/smallschematics/tracksegments/circuit-occupied.gif"
error="resources/icons/smallschematics/tracksegments/circuit-error.gif"
rotate="0" forcecontroloff="false" momentary="false"
sxscale="11.849106591612951" syscale="-11.889381744148094"
sxorigin="41" syorigin="768"
class="jmri.jmrit.display.configurexml.RpsPositionIconXml" />
<sensoricon filter="5510" x="95" y="150" level="10"
active="resources/icons/smallschematics/tracksegments/circuit-occupied.gif"
error="resources/icons/smallschematics/tracksegments/circuit-error.gif"
rotate="0" forcecontroloff="false" momentary="false" s
xscale="11.849106591612951" syscale="-11.889381744148094"
sxorigin="41" syorigin="768"
class="jmri.jmrit.display.configurexml.RpsPositionIconXml" />