Positioning Record Function Introduction
Positioning software will save the Tag information in sequence each time when they report and save it as .dat every hour to allow playback. When software monitoring is paused, unsaved Tag information will also be saved. Positioning history record will be automatically saved under the Record file in the software execution menu. These records will be saved as days showing records from different times of the day, each record will be named on the hour. For example, the image below shows the 5 records on 11th June 2020, which 14.dat、15.dat、16.dat、17.dat、18.dat indicates the record from hour 14-18
Positioning Record Access Instructions
1. Positioning software saving Procedure
Calculate positioning point when Tag reports and save related information using structural method as below
Save structural information into temporary storage queues
Thread save at every hour or when positioning software paused
Using binary format to save temporary storage queues as dat file
2. Positioning software reading procedure
Search for suitable dat file according to time requirement
Reverse sequence of dat file to obtain queue Tag positioning information
Determine whether the time, Tag ID etc. information in positioning structure are what required
Present positioning information at the software
Tag Data Structure Definition
public class LocateTagInfo
{
public byte[] TagId = new byte[3]; //Tag
public byte[] AnchorId = new byte[3]; //Anchor ID
public byte[] GroupId = new byte[2]; //Map group ID
public byte[] FirmwareType = new byte[4]; //Tag firmware type
public byte[] FirmwareVersion = new byte[4]; //Tag firmware version
public string Name = ""; //Tag name
public Int16 GsensorX, GsensorY, GsensorZ; //Recording G-Sensor value
public byte Batt; //Tag battery level
public UInt16 SleepTime; //Tag sleep time
public int GsensorTime; //Tag static time
public int SerialNum; //Report packet number
public int LastSerialNum; //Previous packet number
public byte LocateType = 0; //Positioning type
public int AbsHeight = int.MinValue; //Tag height
public int ActualUseAlgorithm = -1; //Algorithm used
public int HearRate = int.MinValue; //Heart rate
//Anchor structure, records anchor information
public List<LocateAnchorInfo> LocateAnchorInfoList = new
List<LocateAnchorInfo>();
//Tag coordinate position
public
// Location of Tag
PrecisePositionLibrary.Point TagCoor = new PrecisePositionLibrary.Point();
// Track coordinates, the coordinates of the last five points
public PrecisePositionLibrary.Point TagLastCoor1, TagLastCoor2, TagLastCoor3, TagLastCoor4,TagLastCoor5;
public DateTime ReceTime = new DateTime(); // Tag last reported time
public int LossPack = 0; // Cumulative number of missing tag packets
public int TotalPack = 0; // Cumulative number of Tag packets
// Whether to display the Tag (according to the checkbox check)
public bool IsShowTag = true;
// Whether the tag is displayed in red (emergency packet)
public bool IsTagShowRed = false;
public int ShowRedTick = 0; // The time when the tag starts to show red
public bool IsLowBatt = false; // Whether the tag is in low battery
public bool IsTagLost = false; // Whether the Tag reporting timed out
public bool IsOverTimeNoMove = false; // Whether the tag has not moved over time
// Whether the map does not display the tag when the tag reporting timeout
public bool IsTagLostNotShow = false;
//Whether the Tag is H03 and the strap is loose or disconnected
public bool IsWatchBandLoosen = false;
public bool IsHeartRateAbnormal = false; // Whether the heart rate is abnormal
//Whether the tag generates an alarm of reporting timeout
public bool IsTagLostWarn = false;
public bool IsLowBattWarn = false; // Whether the tag generates a low battery alarm
//Whether the tag generates an alarm for loose or broken strap
public bool IsWatchBandLoosenWarn = false;
// Whether the tag generates an alarm for abnormal heart rate
public bool IsHeartRateAbnormalWarn = false;
// The area collection of restricted areas entered by Tag
public Dictionary<string, LimitArea> TagEnterLimitAreaList = null;
public Kalman KalmanX = null; // Kalman filter element in X coordinate
public Kalman KalmanY = null; // Kalman filter element in Y coordinate
public Kalman KalmanZ = null; // Kalman filter element in Z coordinate
// Whether the tag coordinates are single point coordinates
public bool IsSinglePointCoor = false;
// Random angle when displaying single-point tag coordinates
public double RandomDegree = double.MinValue;
}
Introduction to C# Operation
Positioning Software Storage Procedure
Save the positioning information of reported Tag in LocateTagInfo structure
Save Tag information into temporary storage queue
At fixed time or when monitoring is paused, software will take out and save the positioning information from temporary storage queue
Binary sequence storage
Using C# file to reverse binary sequence for reading - binaryformatter.deserialize
The record file will be stored in the Record folder in the current directory of the executable file. You can see that the file will be saved as a .dat file according to the time and date
Positioning Software Reading Procedure
Use the software's history function
Read related dat files according to time conditions
The current directory file is as follows
Confirm time conditions and file name
Using C# file to reverse binary sequence for reading - binaryformatter.deserialize
Deserialize to obtain card positioning information
Determine whether the received time from Tag information matches the criteria- ReceTime
Determine ID or name matches the criteria - Name,TagId[]
Obtain appropriate packet and play history record