If you read the memory address of a 1541, they are stored here. 1571 would be the same. I was looking at this a while ago and didn't find a universal method so I thought of making 'drivers' for each drive, sharing what I could as core disk drive procedures amoung them. That method would mean transfering blocks of data at a time yourself and controlling that data as it happens -- rather than relying solely on the kernal stuff for automating it all. I don't have access to my 1581 books right now, so I'm not too sure what those address in its ROM would be. The track/sector can be read from the block, itself, as well, which makes things a little more universal in regards to coding a core set of universal functions. I've used that last method when using some low level burst protocals -- the first block using burst can be a little buggy depending on the amount of data in the block on the sector... I'm rambling... sorry.
1541/71: $0016-$0017 Header ID from header of sector last read from disk.
$0018-$0019 Track and sector number from header of sector last read from disk.