My Megasquirt adventures over the years

It only fluctuates 100-200RPM and its very random. I'm sure its the IAC. I've been considering swapping over to closed loop idle.

I like what you have done with the table switch on the fuel map and I'm considering doing the same since I do a fair amount of highway driving. Admittedly, I also need to work on the heat soak enrichment. Honestly, the car runs great and I've really haven't messed with the tune much in a while.

The strange thing is the hemi seems much more sensitive to heat soak than my small block did. However, on the small block, I was using a TMAP sensor mounted directly to the aluminum throttle body. On the Hemi, the IAT is in the intake tube.

Yeah, the table switch thing really came about mostly because of trying to make sense of having the two different spark tables. Realistically you could probably get away with splicing the two tables into one if you were more careful about it, but I noticed on the highway in overdrive gears especially that I could get up there in load and start touching cells you'd normally reserve for "power" instead of cruise. I think this setup might simplify acceleration enrichment tuning as well because it kind of builds the extra fuel into the table swap instead of having to link it to pedal rate of change, though hard to say. I haven't really found anything in HP Tuners that looks like acceleration enrichment outside of that one power enrich table, but it might be buried in there somewhere.

I would suggest really looking into the MAT/CLT correction table for your IAT issue. The primary goal of that table as I understand it is to model the "heat soak" of the air as it travels through the intake, which is why it is linked to a "flow" value. I say "flow" because the units are just load x rpm, so it's not actually mass flow in the truest sense of the unit, but has the same effect (high load and low rpm would flow similar mass as high rpm and low load). At the lower flow rates the air stays in the intake longer and has more time to heat up, so with your IAT that far away from the intake valve, it would make sense you're probably actually running hotter in practice than your sensor would say.

The MS is a little limited here though, at least compared to how HP Tuners deals with different temperature effects. The main discrepancy between the two is that I'm not sure the MS can pull fuel relative to coolant temp, or at least I haven't tried it yet. The MS only really cares about coolant temp for warmup enrichment, so it wants the table to end at 100%, or no correction. I'm not sure if it will even accept values less than 100. It wants to do all of the temperature correction in the air density table, which is MAT based. The MAT/CLT correction table basically just adds some percentage of your coolant temp to your air temp value, which pushes you further to the right on the air density correction table. In practice this might be enough, though the way the tables are set up in HP Tuners doesn't quite work that way. In theory I think you might be able to get in some extreme situations where this doesn't work as well, but I need to run some numbers and do some more comparisons to better understand. HP Tuners links fuel enrichment/enleanment to both IAT and CLT through the whole range of temperatures the engine is expected to run in via tables vs the simple curve setup the MS uses. In practice the tables tend to look more like curves anyway though, so maybe it's less important than I think.

I'm sure they must model temperature change through the intake somehow in the OEM setup, but I haven't figured it out yet (nevermind, the CLT table includes rpm and MAP, so that would be similar to how the MS models it). There is a field for the intake volume you can change, so that might be one variable that's involved. The air density correction curve they use doesn't follow the ideal gas law either, so maybe it's baked into that to some degree. I'm still trying to decide if I think the ideal gas law makes sense for the application to begin with. It's just pv=nRT, so the thought is if the pressure changes, the temperature changes in relation to it. The struggle I have with that is the assumption that the volume is constant. I wonder if that's why you can set the intake volume on HP Tuners. However, the intake isn't a closed system. We tend to think of air as only going into the intake, but ultimately speaking the throttle body can let air in or out, so it's not a closed system. If the temperature goes up in the intake, in theory it could push air backwards and out of the throttle body, which would sort of invalidate the ideal gas law assumption. But we're also talking pretty dynamic situations, not static, so lots of assumptions going on.