Post Reply 
HP 48GX - Store Coordinates in a List
03-28-2021, 04:21 AM
Post: #1
HP 48GX - Store Coordinates in a List
Suppose I have coordinates representing the topographic features of a piece of commercial property. There will be coordinates representing the property boundary too. These coordinates will be stored by point number, but not in consecutive order, and not starting with point number one. If I want to store the coordinates in a list of lists, these constraints might be a pain to deal with. Each list in the list will have the following format:
Point #, A 2-D vector (Northing (Y-value), Easting (X-value)), Description of the point

Some examples would be:
{100 [5000 5000] "PROP COR"}
{500 [5200 5100] "BLDG COR"}
Stored in a list would be {{100 [5000 5000] "PROP COR"},{500 [5200 5100] "BLDG COR"}}
Assume user is programming in User-RPL.

There's a gap from 1 to 99 and 101 to 499. That's a lot of wasted memory; there are 500 positions available in the list, but only 2 positions are being used. What's the solution? Without knowing the starting position of the first list or the ending position of the last list, the solution isn't easy. Also, when getting a list from the list, point # 100 is in the first position; there's an offset of N+99, if I'm not mistaken.

Maybe I could do something like this after point # 100 is stored:
{100 100 {100 [5000 5000] "PROP COR"}}, where 100 is the starting index and 100 is the ending index.
After point # 500 is stored:
{100 500 {100 [5000 5000] "PROP COR"},{500 [5200 5100] "BLDG COR"}}

A typical point numbering scenario for a survey crew might be:
1 to 99 - control points
100 to 199 - property corners
200 to 499 - underground utilities
500 and above - topographic features

I was thinking points might be stored in banks of 50 points each to conserve memory.
{1 1 50 {100 [5000 5000] "PROP COR"} ... { }}, where 1 is the number of available banks
{2 500 550 [5200 5100] "BLDG COR"} ... { }}, there are now 2 available banks

Does anyone have any suggestions about how this might be done?
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
HP 48GX - Store Coordinates in a List - MNH - 03-28-2021 04:21 AM

User(s) browsing this thread: 1 Guest(s)