You are reading a single comment by @HughB and its replies.
Click here to read the full conversation.
-
Not to worry, I'm more interested in the CASIC controls to get the NAV frequency down to once every 2 minutes.
I doubt it is possible.
I've made code that can set intervals 1000, 500, 200,100,50(yes, 20Hz!). But for other values it returns NACK.function ckSum(len,cls,mid, pldDV){ var cs = (mid<<24)|(cls<<16)|len; for(var i=6; i<pldDV.buffer.length; i+=4){ print(i, pldDV.getUint32(i, true)); cs += pldDV.getUint32(i, true); } print(cs.toString(16)); return cs; } const UD='undefined'; function sendCfgRate(cfg){ const cls=0x06, mid=0x04; var len = (typeof(cfg.interval)!=UD)?4:0; var msg = new ArrayBuffer(6+len+4); var dv = new DataView(msg); dv.setUint8(0,0xBA); dv.setUint8(1,0xCE); dv.setUint16(2, len, true); dv.setUint8(4,cls); dv.setUint8(5,mid); if(typeof(cfg.interval)!=UD){dv.setUint16(6+0,cfg.interval,true);} cs = ckSum(len,cls,mid,dv); dv.setUint32(6+len,cs, true); print(msg); Serial2.write(msg); }
sendCfgRate({interval:10000}) 6 10000 10 0 4062714 new Uint8Array([186, 206, 4, 0, 6, 4, 16, 39, 0, 0, 20, 39, 6, 4]).buffer =undefined { "hdr": 47822, "len": 4, "payload": new Uint8Array([6, 4, 0, 0]).buffer, "payloadBytes": new Uint8Array([6, 4, 0, 0]), "class": 5, "msgId": 0, "checkSum": 168035584, "name": "ACK-NACK" } >
I got CAS06 as product information. I think its CAS03 to set the outputs
None of these attempts worked for me.
I can see gnss.setSentencesAll("0"); in your code, so assume that works for you.
Not to worry, I'm more interested in the CASIC controls to get the NAV frequency down to once every 2 minutes.
I'm working on trying to get a checksum function to work.
I will test it from the output of your parse_casic code.